Developer API · plan, guidance, route, report

One key. Four calls.

Before a task, your agent asks which model to start on and what that family's flagship learned. After it, the agent reports how it went, for free. Calls are billed in credits on your account, and none of them runs a model: you keep your own subscription.

01 · Keys

Your API keys

Name each key after where it lives and give it only the access it needs. Revoking a key stops it at once.

Reading your session…

02 · Collector

Connect Claude Code

After each Claude Code session that runs tests, report whether they passed. That is the only thing sent, and it is what Reflections learns from.

Set up the collector

Report your test results from Claude Code, about one minute. Each session sends whether your tests passed, and nothing else. New keys have every box ticked. For the collector alone you can leave only Report only on, so a leaked key can do nothing more than report.

  1. 1. Run this in a terminal. It asks for your key (the text you type stays hidden), adds the hooks to Claude Code, and offers to report your past sessions too. No restart needed. Node 18 or newer is required.

    Any terminal
    npx roundtableci setup
  2. 2. Check it. Shows whether your key is accepted and the hooks are in place.

    Any terminal
    npx roundtableci status

    After your first session that runs tests, the key's "last used" date in the list updates. Setup also adds a small Claude Code skill: say "is Roundtable working?" in a session and Claude walks you through it.

Prefer to do it by hand

Copy collector-core.mjs, config.mjs and the hook script from the roundtableci package and use their folder's absolute path for DIR. Set ROUNDTABLE_API_KEY to your key. Node 18 or newer is required.

Merge this into ~/.claude/settings.json, keeping any hooks you already have.

Claude Code hooks
{ "hooks": {
  "SessionStart":       [ { "hooks": [ { "type": "command", "command": "node", "args": ["DIR/hook-claude-code.mjs"] } ] } ],
  "PostToolUse":        [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "node", "args": ["DIR/hook-claude-code.mjs"] } ] } ],
  "PostToolUseFailure": [ { "matcher": "Bash", "hooks": [ { "type": "command", "command": "node", "args": ["DIR/hook-claude-code.mjs"] } ] } ],
  "SessionEnd":         [ { "hooks": [ { "type": "command", "command": "node", "args": ["DIR/hook-claude-code.mjs"] } ] } ]
} }

Checked against real Claude Code sessions: a pass, a failure, a fix after a failure, and a session with no tests (nothing sent).

Private by default: your reports only shape your own lessons until you switch on sharing under the key form.

Sharing

Private by default

Reports only shape your own lessons until you switch sharing on. Sign in to see the switch.

03 · Plan · the call to make first

Plan a task before it starts

One step at the start of a task: a route call, then a guidance call for that model family. Your agent gets the family, the task category, a short note to put in the prompt, and whether a cheaper model of the same family is worth trying.

MCP · CLIroundtable_plan6 credits · 1 for the route, 5 for guidance once per session_id

In Claude Code, it is already there

npx roundtableci setup registers the roundtable_plan tool. The agent calls it once per task with a session_id. Plan is not a separate endpoint: it makes the route and guidance calls below, so it costs the two together.

What comes back

suggested_tier is cheap when your own reports show the cheaper model holding up on this kind of task, trial when guidance exists but your record is still small, and current otherwise. note is the guidance text, and reason says why, with the counts behind it. A family with no checked lessons answers "known": false instead of guessing.
Set up once
npx roundtableci setup
Plan from a terminal
npx roundtableci plan "Fix the deadlock in my worker pool." --session task-42 --family claude
Report when the task ends
npx roundtableci report --family claude --tier cheap --outcome success --tests-passed --retries 1

04 · Guidance and report · scope reflections:read

Flagship guidance for a cheaper model

When a flagship such as Opus works a task, Reflections notes how it worked, never what it said. A cheaper model in the same family, such as Haiku, reads that guidance before its turn. Families never mix.

POST/v1/reflections/guidance5 credits · once per session_id

1 · Ask before the cheaper model runs

Put the returned note in its system prompt. Send a session_id and you pay once per family for six hours. A family with no checked lessons answers "known": false instead of guessing.

POST/v1/reflections/observeFree

2 · Report how it went

Free. Pass or fail, tokens, retries and up to five short, generic lessons. This is how the family's guidance grows.
Ask for guidance
curl -X POST https://roundtable-main-service-production.up.railway.app/v1/reflections/guidance \
  -H "X-API-Key: rtci_…" \
  -H "Content-Type: application/json" \
  -d '{"family": "claude", "session_id": "task-42", "dimensions": ["planning_patterns", "tool_usage_patterns"]}'
Report the outcome
curl -X POST https://roundtable-main-service-production.up.railway.app/v1/reflections/observe \
  -H "X-API-Key: rtci_…" \
  -H "Content-Type: application/json" \
  -d '{"family": "claude", "tier": "cheap", "outcome": "success", "task_category": "coding_python", "tests_passed": true, "lessons": ["run the full suite before editing fixtures"]}'

05 · Route · scope sage:query

Which model to start on

A route call sorts the task text into one of fourteen task categories and names the model with the strongest record there. Nothing is generated: you run the task yourself, on your own subscription.

POST/v1/sage/route1 credit

Route · get the model, the category and the confidence

Returns a model id, the task category and a confidence. Limit the choice to the families you use with families.

Most models have only a few recorded runs so far, so routing still leans on published benchmark scores. The call that ran a model for you, /v1/sage/query, is switched off.

Route
curl -X POST https://roundtable-sage-production.up.railway.app/v1/sage/route \
  -H "X-API-Key: rtci_…" \
  -H "Content-Type: application/json" \
  -d '{"query": "Fix the deadlock in my worker pool.", "families": ["claude"]}'

06 · Costs and reference

What each call costs

CallScopeCostSchema
Reflections guidancereflections:read5 credits · once per session_idOpen
Report an outcomereflections:observe or reflections:readFreeOpen
Routesage:query1 creditOpen

Plan a task is 6 credits · 1 for the route, 5 for guidance once per session_id. Reading the rankings on this site is free.

Send the key as an X-API-Key header; one key works on both services. Credits come from your plan; see pricing.