Deep Query for AI agents. Faster, cheaper answers from your business data.
Deep Query lets AI agents filter, search and aggregate records kept by StackOne Data Sync, in under a second. The agent gets only the counts and fields it needs, without a call to the source API.
Querying synced records
list_s1query_queryable_fields SAP SuccessFactors user fields sapsuccessfactors_list_users_s1query 6,150 records → 6 averages Average base salary across 6,150 New York employees:
1 query · 6 averages · no provider API call · 4,708 tokens per run
Querying synced records
greenhouse_list_notes_s1query match_phrase "open to relocating to London" → 12 notes 12 candidates are open to relocating to London:
1 query · 12 of 200,000 notes · no provider API call · 4,949 tokens per run
Reading the synced employee record
sapsuccessfactors_list_users_s1query userId: mchen · 2 fields Omar Haddad, your manager, approves it. It's charged to cost center 4400.
Synced SAP SuccessFactors data · no provider API call
Companies already connected through StackOne
Deep Query use cases. Get the records and totals
your task needs.
Deep Query filters and counts synced records inside StackOne and sends your agent only the result, cutting the tokens a task uses by up to 99.9%.
What's the average base salary by department in New York?
SAP SuccessFactors users 30,000 synced employees6,150 match location: New York6 department averages
{
"filter": {"term": {"location": "New York"}},
"aggs": {
"by_department": {
"terms": {"field": "department"},
"aggs": {"average": {"avg": {"field": "salary"}}}
}
}
}Then the agent groups the 6,150 records by department and averages salary for each group itself.
Engineering has the highest average base salary in New York at $168,000, and Support the lowest at $70,500.
One of 200 synced records
{
"userId": "ocole0",
"firstName": "Omar",
"lastName": "Cole",
"department": "Product",
"location": "Berlin",
"managerName": "Sam Nair",
"costCenter": "4430 · Product",
"jobTitle": "Product Manager",
"salary": 73000
}sapsuccessfactors_list_users_s1queryFilter New York employees, average salary by department
{
"filter": {
"term": {
"location": "New York"
}
},
"aggs": {
"by_department": {
"terms": {
"field": "department"
},
"aggs": {
"average": {
"avg": {
"field": "salary"
}
}
}
}
}
}All results
| Engineering | $168,000 |
|---|---|
| Support | $70,500 |
| People | $111,857 |
| Product | $165,714 |
| Finance | $119,500 |
| Sales | $129,400 |
Returned by sapsuccessfactors_list_users_s1query
[
{
"key": "Engineering",
"doc_count": 1200,
"average": {
"value": 168000
}
},
{
"key": "Support",
"doc_count": 1200,
"average": {
"value": 70500
}
},
{
"key": "People",
"doc_count": 1050,
"average": {
"value": 111857
}
},
{
"key": "Product",
"doc_count": 1050,
"average": {
"value": 165714
}
},
{
"key": "Finance",
"doc_count": 900,
"average": {
"value": 119500
}
},
{
"key": "Sales",
"doc_count": 750,
"average": {
"value": 129400
}
}
] Faster tool responses. Read synced data
without waiting on the source API.
Deep Query reads records already stored in StackOne, so your agent gets an answer even while a provider's API is slow or rate-limited.
A live lookup waits 0.2 to 12.7 seconds for the provider API to answer. Deep Query reads the synced records in about 0.2 seconds.
Configure Data Sync. Set how often Data Sync
refreshes your records.
Choose which actions to sync and set a schedule for each one. Deep Query reads those stored records, so the schedule sets how fresh its results are.
Follow the Data Sync setup guide01Pick an actionOpen a Connector Profile and find a list action that supports sync.
WorkdayProfile · HR agent
ActionType
List WorkersRead
Get WorkerRead
List OrganizationsRead
Update WorkerWrite
02Enable Data SyncSelect the sync icon and switch Data Sync on for that action.
Data Sync· List WorkersOptimize
Setup
Enable Data Sync
Preferences
03Set the scheduleChoose how often new and changed records sync, and how often a full re-sync runs.
Data Sync· List WorkersOptimize
Setup
Enable Data Sync
Preferences
04SaveSave the profile to start syncing.
Data Sync· List WorkersOptimize
Setup
Enable Data Sync
Preferences
05StackOne syncsStackOne pages through the provider API on your schedule and keeps the records current.
- Full sync7,200 records
- Incremental38 changed
- Incremental12 changed
06Your agent queriesThe action's query tool is ready over MCP to filter, search and aggregate.
How many active employees are in each US department?
workday_list_workers_s1query1 query
filter: status active, country US aggs: terms department
2,400 active employees in the US, 510 of them in Product.
Sync any list action, including your own.
An action declares Data Sync in its connector's YAML before anyone can turn it on. StackOne's connectors declare it for common records. In your own connector, you choose. Edit the block to see how it changes each sync run and the tool your agent gets.
Valid. The action offers Data Sync.
In the Connector Profile1
Data Sync can't be turned on while allowed is false.
Sync run2
- GET/workers?updated_after=2026-09-24T09:00:00Z100 · next=c_8f2a
- GET/workers?next=c_8f2a&updated_after=2026-09-24T09:00:00Z100 · next=c_90bd
- GET/workers?next=c_90bd&updated_after=2026-09-24T09:00:00Z37 · no next
- Done in 3 requests. Unchanged workers stay as they were.
What your agent gets3
workday_list_workers_s1query Filter, search, sort and count synced Workday workers, in about 0.2 seconds.
departmentstatuscountryjobTitlestartDateprobationEndDate
filtermatchsortaggssource
No query tool. The agent can only page through the live Workday API.
Deep Query syntax. Filter, search and count
on any synced field.
Query tools take OpenSearch-style queries. Your agent looks up each synced field and its type first, then filters, searches and aggregates on it.
Filter
Search text
Aggregate
Shape the result
Deep Query FAQ. How Deep Query works
with your AI agent.
Get started with Deep Query.
Turn on Data Sync for a supported action and your agent gets its query tools over MCP.