Skip to main content
POST
Query
Where /v2/context is one entity, query is many. Pull the last 30 days of email replies, all meetings in a property, every signal from a CRM — and let your agent reason over the corpus. Three composable powers cover most “find me X” questions without adding endpoints:
  1. return: 'entities' groups results by entity (one row per person/company), ranked by most-recent matching activity
  2. without subtracts a second scope from the first — for set-difference queries like “sent but no reply”
  3. rollups.by_value appears when scope.kind = 'state' — counts entities by current value (funnel reports)

Request

Body

object
required
Primary filter for the corpus.
object
Optional set-subtract filter — same shape as scope. Entities matching scope MINUS entities matching without. Use for “did X but not Y” questions.
string
default:"observations"
"observations" — one row per observation (the classic shape). "entities" — one row per entity, ranked by most-recent matching activity. Each row reports its match count + the most-recent matching observation.
string
Your analytical question. Echoed back in the response. When set (and without is not), enables semantic ranking via embeddings.
number
Approximate token budget for item summaries.

Response

return: 'observations' (default)

return: 'entities'

rollups.by_value (when scope.kind = 'state')

Recipe book

The four most common “find me X” patterns:

🔥 Hottest leads — recent replies, grouped

Top 10 entities by most-recent reply.

❄️ Cooled in last 5 days — was active, went silent

Entities with any activity in the last 30 days, minus those with any activity in the last 5 days.

📭 Sent without reply in last 5 days

Entities you sent to in the last 5 days, minus those who replied in the same window.

📊 Full funnel report

Read rollups.by_value for the stage distribution. Pair with since_days to bound the time window.

Pattern-finding belongs to the agent

The graph retrieves and shapes. Your agent does the reasoning. The four recipes above are the most common; combine scope + without + return + rollups.by_value for anything else. For your own GTM profile (ICP, pricing, etc.) use /v2/workspace/facts instead — query is for per-entity observations only.