Skip to main content Announcing Tool Policies: AI agent permissions down to the field Read the announcement

Deep Query for AI agents. Faster, cheaper answers from your business data.

Deep Query gives employees' AI the counts and fields a question needs from synced business data, without calling the source system.

Your agent
What's the average base salary by department in New York?

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:

Engineering$168,000
Product$165,714
Sales$129,400
Finance$119,500
People$111,857
Support$70,500

1 query · 6 averages · no provider API call · 4,708 tokens per run

Ask your agent...

Companies already connected through StackOne

Deep Query use cases. Query any system of record
like a database.

Deep Query filters, counts, sums and groups synced records inside StackOne, so your agent gets totals, breakdowns and trends instead of the records behind them. Pick an example to compare it with the provider's own API.

Pick an example

Which 10 companies have the most open pipeline value?

Pipedrive deals 2,400 synced deals1,500 open10 organization totals

Kestrel Energy $635,000 · 30 deals Meridian Bank $560,000 · 20 deals Tidewater Shipping $465,000 · 60 deals Alder Pharma $440,000 · 30 deals Harbor Analytics $360,000 · 90 deals

pipedrive_list_deals_s1query

{
  "filter": {"term": {"status": "open"}},
  "aggs": {
    "by_organization": {
      "terms": {"field": "org_id", "size": 10, "order": {"total": "desc"}},
      "aggs": {"total": {"sum": {"field": "value"}}}
    }
  }
}

pipedrive_list_organizations_s1query

{
  "filter": {
    "terms": {"id": [7002, 7001, 7004, 7020, 7003, 7033, 7019, 7009, 7005, 7015]}
  },
  "source": ["name", "id"]
}

    Then the agent sums value by org_id across the open deals itself, keeps the top 10 and asks for their names.

    Kestrel Energy has the most open pipeline at $635,000, then Meridian Bank at $560,000.

    All results

    Kestrel Energy$635,000 · 30 deals
    Meridian Bank$560,000 · 20 deals
    Tidewater Shipping$465,000 · 60 deals
    Alder Pharma$440,000 · 30 deals
    Harbor Analytics$360,000 · 90 deals
    Nimbus Cloud$345,000 · 50 deals
    Zephyr Airlines$320,000 · 40 deals
    Redwood Capital$315,000 · 20 deals
    Pinnacle Insurance$290,000 · 40 deals
    Upland Software$277,500 · 80 deals

    Returned by pipedrive_list_deals_s1query

    [
      {
        "key": "7002",
        "doc_count": 30,
        "total": {
          "value": 635000
        }
      },
      {
        "key": "7001",
        "doc_count": 20,
        "total": {
          "value": 560000
        }
      },
      {
        "key": "7004",
        "doc_count": 60,
        "total": {
          "value": 465000
        }
      },
      {
        "key": "7020",
        "doc_count": 30,
        "total": {
          "value": 440000
        }
      },
      {
        "key": "7003",
        "doc_count": 90,
        "total": {
          "value": 360000
        }
      },
      {
        "key": "7033",
        "doc_count": 50,
        "total": {
          "value": 345000
        }
      },
      {
        "key": "7019",
        "doc_count": 40,
        "total": {
          "value": 320000
        }
      },
      {
        "key": "7009",
        "doc_count": 20,
        "total": {
          "value": 315000
        }
      },
      {
        "key": "7005",
        "doc_count": 40,
        "total": {
          "value": 290000
        }
      },
      {
        "key": "7015",
        "doc_count": 80,
        "total": {
          "value": 277500
        }
      }
    ]

    Returned by pipedrive_list_organizations_s1query

    [
      {
        "name": "Meridian Bank",
        "id": 7001
      },
      {
        "name": "Kestrel Energy",
        "id": 7002
      },
      {
        "name": "Harbor Analytics",
        "id": 7003
      },
      {
        "name": "Tidewater Shipping",
        "id": 7004
      },
      {
        "name": "Pinnacle Insurance",
        "id": 7005
      },
      {
        "name": "Redwood Capital",
        "id": 7009
      },
      {
        "name": "Upland Software",
        "id": 7015
      },
      {
        "name": "Zephyr Airlines",
        "id": 7019
      },
      {
        "name": "Alder Pharma",
        "id": 7020
      },
      {
        "name": "Nimbus Cloud",
        "id": 7033
      }
    ]

    These examples run on fictional records. Their token counts, costs and times are modelled from the records each call returns. For measured results, see the Deep Query benchmark.

    Deep Query benchmark. Half the tokens
    on the same tasks.

    On the same 1,345 benchmark tasks, agents with Deep Query used half the tokens. They also completed more of them, because fewer tool responses overflowed the agent's context.

    Tokens used

    All 1,345 tasks

    Lower is better

    50% fewer
    Live actions only 269.7M With Deep Query 134.6M

    Tasks completed

    Share that met their goal

    Higher is better

    +28 points
    Live actions only 57% With Deep Query 85%

    Truncated responses

    Share of tasks over 50 KB

    Lower is better

    −24 points
    Live actions only 29% With Deep Query 5%
    Method. In a StackOne benchmark in September 2026, the same agent ran 1,345 tasks on seven connectors twice, with and without Deep Query. Results vary by agent and model.

    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.

    Live lookup0.2 to 12.7 s
    Agent Provider APIAnswer
    Deep Query About 0.2 s
    Agent Synced recordsAnswer

    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.

    Hear it on a voice call

    Every second an agent waits on a tool is a second of silence for the caller. Press play to hear the same question answered both ways: fetching 500 employees live takes 17 seconds at the median in production.

    CallerHey, how many people do we have in the Berlin office right now?

    SAP SuccessFactors
    Without Deep Query sapsuccessfactors_list_users

    17.2 s of waiting before the answer

    With Deep Query sapsuccessfactors_list_users_s1query

    0.11 s before the answer

    Wait times are production medians: 17 s to fetch 500 employees live, 0.11 s from synced records. The voices are a recreation, so turn your sound on.

    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 guide

    01Pick an actionOpen a Connector Profile and find a list action that supports sync.

    PipedriveProfile · Sales agent

    02Enable Data SyncSelect the sync icon and switch Data Sync on for that action.

    Data Sync· List DealsOptimize

    Setup

    Enable Data Sync

    Preferences

    Sync every 1 hour
    Full re-sync 1 day
    Save Changes

    03Set the scheduleChoose how often new and changed records sync, and how often a full re-sync runs.

    Data Sync· List DealsOptimize

    Setup

    Enable Data Sync

    Preferences

    Sync every 1 hour
    Full re-sync 1 day
    Save Changes

    04SaveSave the profile to start syncing.

    Data Sync· List DealsOptimize

    Setup

    Enable Data Sync

    Preferences

    Sync every 1 hour
    Full re-sync 1 day
    Save Changes Data Sync saved

    05StackOne syncsStackOne pages through the provider API on your schedule and keeps the records current.

    Pipedrive API
    Synced records2,400
    • Full sync2,400 records
    • Incremental38 changed
    • Incremental12 changed

    06Your agent queriesThe action's query tool is ready over MCP to filter, search and aggregate.

    How many open deals are in each pipeline stage?

    pipedrive_list_deals_s1query1 query

    filter: status open
    aggs:   terms stage_id

    1,500 open deals across 5 stages, 380 of them in stage 3.

    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.

    hrportal.workers.s1.partial.yaml
    Tab indents. Press Escape, then Tab, to leave the editor.

    Valid. The action offers Data Sync.

    In the Connector Profile1

    List WorkersSynced hourly · changes only Read

    Data Sync can't be turned on while allowed is false.

    Sync run2

    237workers syncedchanged since the last run

    1. GET/workers?updated_after=2026-09-24T09:00:00Z100 · next=c_8f2a
    2. GET/workers?next=c_8f2a&updated_after=2026-09-24T09:00:00Z100 · next=c_90bd
    3. GET/workers?next=c_90bd&updated_after=2026-09-24T09:00:00Z37 · no next
    4. Done in 3 requests. Unchanged workers stay as they were.

    What your agent gets3

    hrportal_list_workers_s1query

    Filter, search, sort and count your synced workers, in about 0.2 seconds.

    departmentstatuscountryjobTitlestartDateprobationEndDate

    filtermatchsortaggssource

    No query tool. The agent can only page through your system's live 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

    • termequals
    • termsany of
    • rangegt · gte · lt · lte
    • existshas a value
    • wildcardEng*
    • booland · or · not

    Search text

    • matchany of the words
    • match_phrasethe exact phrase
    • search"phrases" +must -not prefix*

    Aggregate

    • termsgroup by
    • date_histogramby day, week, month
    • histogram · range · date_rangebuckets
    • sum · avg · min · max
    • cardinalitydistinct count
    • value_count · stats · percentiles

    Shape the result

    • sortany field, asc or desc
    • sourceonly the fields named
    • page_sizeup to 200
    • skipup to 10,000

    Deep Query FAQ. How Deep Query works
    with your AI agent.

    Get started with Deep Query.

    Turn on Data Sync for one supported list action and ask your agent a counting question.