Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration (TOML)

This page lists every key of the TOML files troupekit reads: persona files, workflow files, route policies and the three catalogs. Come here when you write one of those files by hand and want the exact name, range or default of a key.

Every one of these files refuses unknown keys. A misspelled key fails at load, and the error names the file and the key, instead of being ignored and leaving you with a default you did not ask for.

Persona files

A persona file is one agent. Here is one with most keys set:

name = "coach"
display_name = "Coach"
role = "Plans training weeks."
goal = "A safe weekly plan."
instructions = "Plan the week."
context = "The owner trains at home."
model = "anthropic/claude-opus-5-5"
tools = ["web_search"]
guardrails = ["No medical advice."]
evals = ["min_items(actions, 1)", "judge('Plan is safe', 7)"]
max_turns = 6
budget = { call_usd = 0.05, run_usd = 0.5 }

[output]
actions = "list<{name, minutes: int}>"
KeyRuleDefault
name1 to 64 of [a-z0-9-], not starting with -required
display_nameshown in the system promptrequired
rolerole linerequired
goalgoal linerequired
instructionsthe instructions textone of instructions or instructions_file is required
instructions_filea relative path inside the persona foldersee instructions
contextextra context for the system promptempty
modelvendor/model, or a role alias of [a-z0-9_-] such as defaultrequired
toolstool names, 1 to 64 of [A-Za-z0-9_-], no repeatsnone
guardrailsrules added to the system prompt, not blanknone
evalseval calls such as min_items(sources, 1) or judge('Plan is safe', 7)none
[output]typed output fields, see Agents and personasplain text
max_turns2 to 508
max_tokens1 to 200 0004096
budget{ call_usd, run_usd } in dollarsno budget
trace, trace_content, trace_filesee Tracing and budgetsoff

Workflow files

A workflow file is one graph. Workflows and graphs walks through a full example; the keys are:

Top-level keyRuleDefault
nameworkflow namerequired
startid of the first noderequired
max_steps1 to 10 000200
max_retries0 to 505
[state]typed state keysnone
[[nodes]]the nodes, see below; at least onerequired
[[edges]]the edges between nodesnone
trace, trace_content, trace_filesee Tracing and budgetsoff

Each node uses some of these keys, depending on its kind:

Node keyUsed by
id, kindevery node
persona, promptagent
tooltool
ask, prompthuman
conditionrouter
reads, writesagent, tool, human

An edge has from and to. An edge that leaves a router also has when, the router output that selects it.

Route policies

A route policy decides, per model call, whether a local or a cloud target answers. Its keys are documented with examples in Local models and routing.

Provider catalog

crates/troupekit-providers/catalog/providers.toml is the built-in list of vendors, models and prices. You only edit a copy of it when you add a vendor or a model, or point an agent at your own catalog. It has three kinds of rows; this is a vendor row:

[[vendor]]
id = "anthropic"
name = "Anthropic"
protocol = "anthropic"
base_url = "https://api.anthropic.com"
auth = "x-api-key"
price_source = "https://platform.claude.com/docs/en/about-claude/pricing"
quirks = { temperature = false }
search_usd_micros = 10000
RowKeys
[[vendor]]id, name, protocol (anthropic, openai, gemini or openai_compatible), base_url, auth, price_source, quirks, search_usd_micros, open_models
[[vendor.model]]id, context_window, input_usd_micros_per_mtok, output_usd_micros_per_mtok, price_verified, long_context
[[embedding]]vendor, id, dims, max_batch, input_usd_micros_per_mtok, price_verified

Prices are in millionths of a dollar per million tokens.

Search catalog

crates/troupekit-tools/catalog/search.toml lists the web search back ends the web_search tool can use, one [[instance]] row each:

KeyMeaning
nameinstance name
adapterbrave or searxng
base_urlwhere the instance answers
key_envthe environment variable that holds the API key; an instance whose key is missing is skipped
allow_privatelets the instance reach a private network address; off by default

Tools shows how an agent uses it.

Local model catalog

crates/troupekit-local/catalog/local.toml lists the GGUF models troupekit knows how to download and check, one [[model]] row each. The keys are id, url, sha256, bytes, ram_bytes, context, class, licence, embeddings and recommended. Local models and routing explains how an agent picks one.