Brain · Ask with your own key
Ask your tools with your own key
Ask a plain-language question about your own usage, and get a grounded answer. In Brain, Ask the brain, switch to Telemetry mode. A deterministic resolver answers metric questions for free. Anything it cannot match runs a bounded tool loop over your telemetry, on your own Anthropic key, so the reasoning happens on your account and nowhere else.
Start here if you want to ask your brain a question in plain language: Ask the brain.
Where it runs
Open Ask the brain (Memory in the sidebar, then Ask the brain under All tools, in the Evidence readers group), then flip the mode toggle from Brain to Telemetry. Brain mode searches your brain and docs markdown. Telemetry mode runs analytics over your usage aggregates and posts to POST /api/brain/ask/telemetry.
Your key, your loop
The tool loop calls Anthropic with your key. Set ANTHROPIC_API_KEY in Local settings under Anthropic API key (stored in the RepoOps data-dir .env, never in git), or as an environment variable. The loop is bounded on purpose:
- Up to 6 tool calls per question, 1,024 output tokens per model call, and a per-day token cap shared with brain synthesis (50,000 tokens by default, the
synthDailyCapTokensaccount setting). - Ten narrow, read-only tools over your aggregates: telemetry rollups and daily series, spend-to-outcome, session signals, tool and MCP inventory, Billing Guard, spend efficiency, app LLM calls, and spend by topic.
- It runs on Claude Sonnet by default. Set
REPOOPS_TELEMETRY_CHAT_CHEAP=1in the environment to run it on Haiku instead, orREPOOPS_TELEMETRY_CHAT_MODELto name a model. - Only
ANTHROPIC_API_KEYis read here. OpenAI and OpenRouter keys are not used by this loop (they drive BYOK embeddings, a separate feature).
Free path, then paid path
The deterministic resolver runs first and short-circuits before any model call, so a metric question costs nothing and badges deterministic resolver, zero LLM cost. A question the resolver cannot answer runs the tool loop and badges BYOK tool loop with the model and the number of tool calls it used. Every model call the loop makes is recorded into your own AI-calls telemetry (surface repoops-chat), so the spend shows up on the same surfaces it reports on.
Without a key
- A question that needs the loop returns
503with a hint to paste your Anthropic key in Local settings, then ask again. - Deterministic metric questions keep working with no key.
- If the shared daily token cap is spent, the loop returns
429until the next day.
Read more
Last updated