upstack calls. No LLM ever runs server-side in Upstack.
Example session
upstack measures, then issues a single build call. Same result as the API quickstart, in one structured command.
Filters: discover before you construct
When the user asks for a scoped query — “MER for new customers only”, “spend on Meta campaigns containing ‘spring’”, etc. — the agent should callupstack filters first to enumerate valid filter fields, operators, and contexts before guessing field ids:
orders.customer_type), its supported operators, and the set of applicable contexts all come from the discovery endpoint — no hard-coding.
Why this works
- Discovery is free.
upstack measuresandupstack filtersrequire onlyanalytics:read. An agent can introspect what’s available before constructing a request. - The CLI is structured input for the agent’s structured output. Flags are JSON-shaped (
--measures m1,m2,m3,--from-file payload.json). No shell-quoting gymnastics for natural-language prompts. - Every command can be replayed. Pass
--from-fileto load a JSON body, then iterate via flags. The agent doesn’t need to remember state — it can re-issue.
What the agent should NOT do
- Don’t ask the user for their API key over chat. Credentials are already in
~/.upstackrc; the CLI handles auth automatically. - Don’t hand-construct API request bodies in chat. Use the CLI as the structured interface — it’s already typed and validated.