Everything the Console Does, Your Code Can Do.

Create, configure and invoke agents over a REST API with streamed execution events. No capability is console-only, and every call lands in the same audit trail your operators use.

Transport
REST + server-sent events
Auth
Scoped keys, per-agent grants
Residency
Single-tenant VPC or your cloud
API explorerSandbox key Pick an endpoint, or send it again
POST/v1/agents
Authorization: Bearer tt_test_••••••••9a08Content-Type: application/json {"template": "support_triage","name": "renewal-assistant","knowledge_bases": ["legal", "sales"],"guardrails": { "pii_redaction": true }}
201 Createdin 80 ms
POST/v1/agents/agt_7Q2f/invoke
Authorization: Bearer tt_test_••••••••9a08Content-Type: application/json {"input": "draft a renewal email for Acme Co","mode": "agent","session_id": "sess_41c8","stream": true}
200 OKin 1.4 s
PATCH/v1/agents/agt_7Q2f
Authorization: Bearer tt_test_••••••••9a08Content-Type: application/json {"model": "claude-sonnet-4-6","memory": { "window": 20 },"knowledge_bases": { "detach": ["sales"] }}
200 OKin 50 ms
POST/v1/agents/agt_7Q2f/tools
Authorization: Bearer tt_test_••••••••9a08Content-Type: application/json {"type": "mcp_server","url": "https://tools.internal/mcp","allow": ["get_account", "create_ticket"],"auth": { "mode": "client_credentials" }}
201 Createdin 240 ms
Event streamidle
  1. agent.createdid=agt_7Q2f · template support_triage
  2. kb.attachedlegal (4,182 docs), sales (2,910 docs)
  3. guardrails.appliedpii_redaction, refusal policy v3
  4. agent.ready201 Created · invocable immediately

Idempotent on name: a repeat call returns the existing agent.

Written to the audit logcall_2f9a · POST /v1/agents
  1. agent.thinkingplanning: retrieve contract terms, then draft
  2. retrieval.hit3 passages · MSA v6 §11.2 (0.94)
  3. tool.callget_account(id="acme-co") → 200 in 62ms
  4. token.deltastreaming draft… 214 tokens
  5. agent.responsecomplete · 2 citations attached

Same event contract the console UI consumes.

Written to the audit logcall_41c8 · renewal-assistant · support-widget
  1. config.diff3 fields changed vs. version 11
  2. kb.detachedsales · in-flight sessions unaffected
  3. config.applied200 OK · version 12 · no redeploy

Config changes are versioned and revertable by version id.

Written to the audit logcall_7d10 · PATCH agt_7Q2f · version 12
  1. mcp.handshaketools.internal · 9 tools advertised
  2. schema.validated2 allowlisted, 7 rejected by policy
  3. tools.registered201 Created · callable this session

Anything outside the allowlist is unreachable, even if advertised.

Written to the audit logcall_93be · POST agt_7Q2f/tools

Send the request to open the stream.

01 Surface parity

One agent behind every surface you ship.

The same configured agent answers a support widget, a queue worker and an internal Slack bot. One integration, one permission model, one place to change the prompt.

Customer-facing chat

Embed a support agent in your product and stream its reasoning into your own UI.

REST + SSE

Backend workflows

Trigger an agent from a queue worker, cron job or webhook with an idempotency key.

REST

Third-party integrations

Route Slack, email or ticketing events into the same agent without a second integration.

Webhook

Agent-to-agent chains

One agent’s structured output becomes another’s input, with the chain logged end to end.

REST + SSE
renewal-assistantagt_7Q2fready
One permission model

Scoped keys decide which agents a caller can reach, the same way on every surface.

One place to change it

Edit the agent once. Every surface picks up the change on its next call.

One audit trail

Every call from every surface is written to the same log.

Rate limits, retries and idempotency keys behave identically across surfaces.

02 Keys & scopes

A key can only reach the agents you grant it.

Keys are scoped per environment and per agent. Revoking a grant takes effect on the next request, with no redeploy and no rotation window.

API keysChange a grant, then save
Keys

Granted agents

Sample keys and agents. Grants shown here are illustrative.

03 Audit

Every invocation is replayable.

Each call stores its inputs, retrieved context, tool calls and final output. When a customer disputes an answer, you can show exactly what the agent saw.

Audit · invocationsOpen a row to replay it

Execution tracecall_41c8

Input

“draft a renewal email for Acme Co” · mode agent · session sess_41c8

Retrieved context

3 passages · MSA v6 §11.2 (0.94), Renewal playbook §3, Acme account notes

Tool calls

get_account(id="acme-co") → 200 in 62ms

Output

Draft renewal email · 214 tokens · 2 citations attached

Execution tracecall_3b07

Input

New ticket: “Invoice shows a duplicate charge”

Retrieved context

2 passages · Billing FAQ (0.91), Refund policy §2

Tool calls

classify_ticket → billing · 40ms

Output

Routed to the Billing queue · priority normal

Execution tracecall_e5a2

Input

“Review the Calloway MSA for liability caps”

Retrieved context

None retrieved

Tool calls

None called

Refusal

Sandbox keys cannot reach production knowledge bases.

Execution tracecall_90d4

Input

“Summarise renewal terms for account acme-co”

Retrieved context

2 passages · MSA v6 §11.2 (0.94), Order form 2025-03

Tool calls

get_account(id="acme-co") → 200 in 58ms

Output

Four-line renewal summary · 1 citation attached

Execution tracecall_c61f

Input

“why was I charged twice this month?”

Retrieved context

1 passage · Billing policy v4 §2 (0.89)

Tool calls

None called

Output

Plain-language explanation · 1 citation attached

Execution tracecall_2a8e

Input

“where is my invoice for September?”

Retrieved context

1 passage · Billing FAQ (0.88) · kept for replay

Tool calls

lookup_invoice → timed out after 10s

Error

Tool call timed out. No answer was returned to the caller.

Showing the last 6 of 41,208 invocations today. Each row expands to the full execution trace.

Sample records for illustration.

04 Infrastructure

Infrastructure, not just an interface.

The parts a platform team asks about before anything ships.

Streamed by default

Thoughts, tool calls and tokens arrive as server-sent events, so your own interface can show progress instead of a spinner.

text/event-stream

Configuration without deploys

Models, guardrails, attached knowledge bases and tool grants are all PATCHable. Nothing about an agent requires shipping code.

PATCH /v1/agents/:id

Tool registration you control

Register MCP servers or your own endpoints as callable tools, with an allowlist per agent and a schema checked on every call.

allowlist per agent

Isolation you can prove

Per-tenant data boundaries, scoped keys and an immutable execution log: the artefacts a security review actually asks for.

scoped keys + execution log
05 First call

From nothing to a streaming agent in three steps.

Request shapes below are the same ones the explorer sends.

  1. 1

    Get a sandbox key

    Sandbox keys are issued instantly and scoped to a demo agent, so you can call it before anything is connected.

    Sandbox key issuedtt_test_••••••••9a08demo-agent
  2. 2

    Create an agent

    Start from a template and attach what it should know. Repeating the call returns the same agent.

    curl
    curl -X POST "$THINKSTACK_API/v1/agents" \
      -H "Authorization: Bearer $THINKSTACK_KEY" \
      -H "Content-Type: application/json" \
      -d '{"template": "support_triage",
           "name": "renewal-assistant",
           "knowledge_bases": ["legal", "sales"]}'
  3. 3

    Invoke it and stream the result

    Events arrive as the agent works: thinking, retrieval, tool calls, then the answer.

    agent.thinkingretrieval.hittool.calltoken.deltaagent.response
    curl
    curl -N -X POST "$THINKSTACK_API/v1/agents/agt_7Q2f/invoke" \
      -H "Authorization: Bearer $THINKSTACK_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input": "draft a renewal email for Acme Co",
           "mode": "agent",
           "stream": true}'

Illustrative request shapes. Base URL and auth header will be confirmed with the API reference.