Agent Setup For TrustedRouter
Configure coding agents for TrustedRouter with the API base URL, environment variables, model aliases, privacy routes, quick smoke tests, and migration notes.
Agent setup
OpenAI compatibleUse this when a coding agent needs to switch a project to TrustedRouter without changing the app architecture.
export TRUSTEDROUTER_API_KEY="sk-tr-v1-..."
export OPENAI_API_KEY="$TRUSTEDROUTER_API_KEY"
export OPENAI_BASE_URL="https://api.trustedrouter.com/v1"
# Anthropic SDKs use the non-/v1 base URL.
export ANTHROPIC_API_KEY="$TRUSTEDROUTER_API_KEY"
export ANTHROPIC_BASE_URL="https://api.trustedrouter.com"
Already integrated against api.quillrouter.com? It stays a permanent working alias — no migration needed. Both hostnames terminate inside the same attested gateway.
Smoke test
before editing codecurl https://api.trustedrouter.com/v1/chat/completions \
-H "Authorization: Bearer $TRUSTEDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "trustedrouter/zdr",
"messages": [{"role": "user", "content": "Reply with PONG only."}],
"max_tokens": 4
}'
The response should contain PONG. Use this check before moving evals or production traffic.
Model aliases
recommended- trustedrouter/zdr: zero-data-retention routes first. Good default for legal and sensitive work.
- trustedrouter/e2e or trustedrouter/confidential: end-to-end encrypted route pool, currently centered on confidential providers.
- trustedrouter/eu: EU-focused routing. Use with https://api-europe-west4.quillrouter.com/v1 for the EU regional gateway.
- trustedrouter/auto: broad provider fallback when availability matters more than the strictest privacy filter.
- trustedrouter/cheap: low-cost paid route pool for cost-sensitive tests.
- trustedrouter/socrates: rolling named advisor model. Use trustedrouter/socrates-1.1 for the current pinned version; trustedrouter/socrates-1.0 remains available only for old pinned integrations.
- trustedrouter/subagent: primitive for OpenRouter-compatible subtask delegation. Use a concrete parent model with a trustedrouter:subagent or openrouter:subagent tool.
- trustedrouter/iris-2.0, trustedrouter/prometheus-2.0, trustedrouter/zeus-1.0: versioned budget, open, and frontier Synth presets inside the attested gateway.
- trustedrouter/openpatcher-s2: Kimi K3 and GLM 5.2 synthesis with judge and final fallbacks.
- trustedrouter/openpatcher-g2: Kimi K3 worker with parallel Gemma 4 and Prometheus 2.0 advisors.
- trustedrouter/plato-pro-2.0: GLM 5.2 worker advised by Prometheus 2.0.
- trustedrouter/iris-code-1.0, trustedrouter/prometheus-code-1.0, trustedrouter/zeus-code-1.0: versioned code-tuned Synth presets for implementation-heavy agent turns.
Agent prompt
copyMigrate this project to TrustedRouter.
Use base_url "https://api.trustedrouter.com/v1".
Read the API key from TRUSTEDROUTER_API_KEY.
Use trustedrouter/zdr by default unless the user asks for broad fallback.
For Europe-focused workloads, use base_url "https://api-europe-west4.quillrouter.com/v1" and model trustedrouter/eu.
Use trustedrouter/prometheus-2.0 for hard prompts, evals, or synthesis where multiple model calls are worth the cost and a 1M context window matters.
Use trustedrouter/prometheus-code-1.0 for implementation-heavy agent turns.
Use trustedrouter/socrates for the current rolling advisor model, or trustedrouter/socrates-1.1 when you need the current pinned version.
Run a PONG smoke test before editing app code.
Socrates prompt
advisor orchestrationtrustedrouter/socrates is the rolling named advisor model, currently pointing at trustedrouter/socrates-1.1. The worker gets one private zero-argument tool, _trustedrouter_get_advice, and should call it only when stuck, uncertain, or facing a high-stakes decision. Use the generic trustedrouter/advisor primitive only when you provide explicit worker and advisor models yourself.
{
"model": "trustedrouter/socrates-1.1",
"messages": [{"role": "user", "content": "Review this migration plan for production risk."}],
"tools": [{
"type": "trustedrouter:advisor",
"parameters": {
"depth": 2,
"advisor_models": ["anthropic/claude-opus-4.8"],
"max_get_advice_calls": 1,
"advisor_max_tokens": 4096,
"advisor_timeout_ms": 90000
}
}]
}
The advisor sees the same prompt context as the worker. Use provider.min_privacy = "zdr" for a hard zero-retention floor or provider.min_privacy = "confidential" to require both provider-side confidential compute and E2EE. The trustedrouter/zdr and trustedrouter/e2e aliases select those pools. If the advisor is itself a Synth model such as trustedrouter/zeus-1.0, TrustedRouter decrements orchestration depth automatically.
Subagent prompt
server tooltrustedrouter/subagent lets a parent model delegate self-contained subtasks to a worker model during the same generation. The worker sees only the task description that the parent model writes.
{
"model": "anthropic/claude-sonnet-5",
"messages": [{"role": "user", "content": "Research the options, then propose one implementation."}],
"tools": [{
"type": "openrouter:subagent",
"parameters": {
"model": "deepseek/deepseek-v4-flash",
"instructions": "Be concise. Return only useful findings.",
"max_tool_calls": 4,
"max_completion_tokens": 800
}
}]
}
The private function exposed to the parent model is _trustedrouter_subagent with task_name and task_description. Function tools inside the subagent worker are rejected; recursive subagents are blocked.
Agent skill
model advisorUse the trustedrouter-model-advisor playbook when Codex, Claude Code, Hermes, Cursor, or another coding agent needs to choose a model, estimate cost and speed, weigh privacy tiers, connect MCP, or decide whether prompt caching makes one stable model cheaper than broad routing.
# Codex native skill
Use $trustedrouter-model-advisor to choose the best TrustedRouter model for this task.
# Claude Code, Hermes, Cursor, or any agent that can read a URL
Read https://raw.githubusercontent.com/Lore-Hex/LLM-advisor/main/SKILL.md and follow it.
Consider speed, cost, AI IQ, privacy, context length, prompt caching, and recent provider health before making calls.
Skill source: GitHub folder. Raw instructions for any agent: SKILL.md.
Synth prompt
hard promptsFor a hard prompt, use model trustedrouter/synth.
Attach one tool:
{
"type": "trustedrouter:synth",
"parameters": {
"preset": "quality",
"selection_strategy": "synthesize_non_refusals",
"fallback_judges": ["~anthropic/claude-latest", "~google/gemini-pro-latest", "~zai/glm-latest"],
"fallback_final_models": ["~anthropic/claude-latest", "~google/gemini-pro-latest", "~kimi/latest"],
"max_completion_tokens": 800
}
}
Read the full behavior at https://trustedrouter.com/docs/synth.
Useful references
Agents should read the compact context first, then use the full context when choosing models or providers.