orxtra v0.13.0 /Configuration Reference
On this page

TOML format reference for agent definitions, workflow definitions, category mappings, run configuration, knowledge files, data tool definitions, and environment variables.

#Configuration Reference

All configuration files use TOML format with a required integer format_version = 1 at the top level. Documents are validated at the load boundary by strictspec-generated validators -- malformed documents produce hard errors with diagnostic paths, never silent degradation.

#agent.toml

Agent definitions live in individual .toml files. Each file defines one agent with its identity, model routing, tool permissions, and optional inline tool declarations. Load with orxtra.agent.load_agent(path) or batch-load a directory with orxtra.agent.load_agents(directory).

Prompt text lives in a separate .md file referenced by the prompt field. The loader resolves the path relative to the TOML file, reads the markdown, and performs include resolution via orxtra.compose.

#[agent] section

[agent] section
FieldTypeRequiredDescription
namestringyesUnique agent identifier. Must be non-empty.
descriptionstringyesHuman-readable description. Must be non-empty.
promptstringyesPath to the .md prompt file, relative to this TOML file. Must be non-empty.
categorystringnoCategory name for model routing via categories.toml. Mutually exclusive with provider/model.
providerstringnoLLM provider name (e.g. "anthropic"). Must be set together with model. Mutually exclusive with category.
modelstringnoLLM model identifier (e.g. "claude-sonnet-4-6"). Must be set together with provider. Mutually exclusive with category.
budgetnumbernoMaximum spend in USD for this agent. Must be >= 0.
write_pathsarray of stringnoAllowed write paths for file operations.
timeoutintegernoAgent-level timeout in seconds. Must be >= 1.

Routing constraints: Exactly one routing form must be present:

  • category alone (resolved against categories.toml at runtime), OR
  • provider AND model together (direct provider/model specification)

Setting both category and provider/model is a validation error. Omitting both is also an error.

#[tools] section

[tools] section
FieldTypeRequiredDescription
allowarray of stringyesTool names or glob patterns the agent may use (e.g. ["read", "write", "custom.*"]).
deferredarray of stringnoTool names to defer-load (excluded from prompt token counting until called).

#[[tools.define]] -- inline tool declarations

Each [[tools.define]] entry declares an inline tool. These are shape-checked at agent-load time; full parameter/execution/output validation is deferred to the DataToolDefinition schema at build time.

[[tools.define]] -- inline tool declarations
FieldTypeRequiredDescription
namestringyesTool name. Must be non-empty. Must be unique within the file.
descriptionstringyesTool description. Must be non-empty.
namespacestringyesTool namespace. Must be non-empty.
deferredbooleanyesWhether to defer-load this tool.
tagsarray of stringnoClassification tags.
paramstablenoParameter definitions (opaque at agent-load; validated at build time).
executiontableyesExecution configuration (opaque at agent-load; validated at build time).
outputtablenoOutput configuration (opaque at agent-load; validated at build time).

#Example

TM toml
format_version = 1

[agent]
name = "coder"
description = "Agent that writes code, runs tests, and commits changes."
prompt = "coder_agent.md"
category = "default"

[tools]
allow = ["read", "write", "edit", "git", "custom.*", "start_task", "end_task"]

[[tools.define]]
name = "pytest"
description = "Run the test suite"
namespace = "custom.exec"
deferred = false

[tools.define.execution]
type = "command"
executable = "pytest"
arg_validation = true
timeout_ceiling = 120

#workflow.toml

Workflow definitions describe a DAG of tasks for the scheduler to execute. Load with orxtra.scheduler.load_workflow(path_or_string).

#[workflow] section

[workflow] section
FieldTypeRequiredDescription
namestringyesWorkflow identifier. Must be non-empty.
descriptionstringyesHuman-readable description. Must be non-empty.
escalation_policystringnoHow to handle task failures. Default: "continue_independent".

**escalation_policy values:**

[workflow] section
ValueBehavior
continue_independentContinue executing tasks that don't depend on the failed task.
haltStop scheduling new tasks but let running tasks finish.
abort_allCancel all running and pending tasks.

#[[tasks]] -- task definitions

Each [[tasks]] entry defines one task. Tasks support exactly one execution mode, determined by which fields are present.

#Identity and common fields

Identity and common fields
FieldTypeRequiredDescription
namestringyesTask name. Must be non-empty. Unique within sibling tasks.
depends_onarray of stringnoNames of sibling tasks that must complete before this task starts. References are validated against declared task names.
variablesarray of stringnoVariable names this task consumes or produces.
categorystringnoOverride the agent's default model category for this task.
budgetnumbernoBudget cap in USD for this task. Must be >= 0.
write_pathsarray of stringnoOverride allowed write paths for this task.
output_schemastringnoJSON Schema reference for structured output validation.
on_successstringnoCallback reference ("module:callable") invoked on task success.
pre_retrystringnoCallback reference ("module:callable") invoked before each retry attempt.

#Execution modes

Exactly one of the following execution mode groups must be present. The modes are mutually exclusive.

Agent mode -- agent + task_prompt (co-present: both required together):

Execution modes
FieldTypeRequiredDescription
agentstringyes (agent mode)Name of the agent to execute this task.
task_promptstringyes (agent mode)The prompt/instructions for the agent.
timeoutintegerconditionally requiredTimeout in seconds. Required when agent is present. Must be >= 1.
context_refinementbooleanconditionally requiredWhether to apply context refinement. Required when agent is present.

Callable mode -- a Python callable reference:

Execution modes
FieldTypeRequiredDescription
callablestringyes (callable mode)Python callable reference ("module:function").

Subtasks mode -- nested task tree:

Execution modes
FieldTypeRequiredDescription
subtasksarray of taskyes (subtasks mode)Nested child tasks (recursive structure).

Wait-for mode -- event-driven waking:

Execution modes
FieldTypeRequiredDescription
wait_forstringyes (wait_for mode)Event type to wait for before proceeding.

Decision-point mode -- human/overseer decision gate:

Execution modes
FieldTypeRequiredDescription
decision_pointbooleanyes (decision_point mode)Marks this task as requiring a decision.

#Retry fields

These fields become conditionally required when retry is set to a non-zero value.

Retry fields
FieldTypeRequiredDescription
retryintegernoNumber of retry attempts. Default: 0. Must be >= 0.
retry_resumebooleanconditionally requiredWhether to resume the agent's context on retry (vs. clean restart). Required when retry > 0.
retry_inject_failurebooleanconditionally requiredWhether to inject failure context into the retry prompt. Required when retry > 0.

#For-each fields

These fields become conditionally required when for_each is present.

For-each fields
FieldTypeRequiredDescription
for_eachstringnoVariable name to iterate over (fan-out).
for_each_abort_on_failurebooleanconditionally requiredWhether to abort remaining iterations on failure. Required when for_each is present.
max_concurrencyintegerconditionally requiredMaximum parallel iterations. Required when for_each is present. Must be >= 1.

#Pre-checks and post-checks

Both [tasks.prechecks] and [tasks.postchecks] share the same structure. They define verification gates for task entry and exit.

Pre-checks and post-checks
FieldTypeRequiredDescription
scriptsarray of stringnoPython callable references ("module:callable"). Each callable receives a CheckContext and returns a CheckResult.
agentsarray of tablenoAgent-based checks (read-only reviewer agents).

Each agent check entry:

Pre-checks and post-checks
FieldTypeRequiredDescription
agentstringyesName of the reviewer agent.
taskstringyesReview task prompt.
block_thresholdstringyesMinimum severity that blocks. One of: "critical", "major", "minor", "nit".
variablesarray of stringnoVariables to pass to the reviewer.

#[dependencies] section (optional)

A top-level dependency map as an alternative to per-task depends_on. Keys are task names, values are arrays of dependency task names. The loader merges these into each task's depends_on field.

TM toml
[dependencies]
test = ["implement"]
lint = ["implement"]

#[[services]] -- long-running process declarations (optional)

[[services]] -- long-running process declarations (optional)
FieldTypeRequiredDescription
namestringyesService identifier.
start_commandstringyesShell command to start the service.
stop_commandstringyesShell command to stop the service.
health_check_commandstringnoShell command to check service health.
portintegernoPort the service listens on.
ready_timeoutintegernoSeconds to wait for the service to become ready. Default: 30. Must be >= 0.

#Example

TM toml
format_version = 1

[workflow]
name = "feature-pipeline"
description = "Implement a feature with tests and lint check."

[[tasks]]
name = "implement"
agent = "coder"
task_prompt = "Implement the feature described in the project spec."
timeout = 600
context_refinement = true

[[tasks]]
name = "test"
agent = "coder"
task_prompt = "Write tests for the implementation."
depends_on = ["implement"]
timeout = 600
context_refinement = true

[tasks.postchecks]
scripts = ["myproject.checks:pytest_passes"]

[[tasks]]
name = "lint"
agent = "coder"
task_prompt = "Fix any lint issues found by ruff."
depends_on = ["implement"]
timeout = 600
context_refinement = true

[tasks.postchecks]
scripts = ["myproject.checks:ruff_passes"]

#categories.toml

Maps category names to "provider/model" strings. Categories provide a layer of indirection for model routing -- agents reference a category name, and the categories file resolves it to a concrete provider and model.

Load with orxtra.agent.load_categories(path). Resolve with orxtra.agent.resolve_category(agent, categories).

#[categories] section

A map of category name to model string. Keys must match ^[A-Za-z0-9_.-]+$. Values are "provider/model" strings and must be non-empty.

#Example

TM toml
format_version = 1

[categories]
default = "anthropic/claude-sonnet-4-6"
reasoning = "anthropic/claude-opus-4-6"
fast = "openai/gpt-4o-mini"

#Run configuration (run_config.toml)

Run configuration files drive start_run_from_file in orxtra.services. They bundle all paths, database connection, provider credentials, budget, and autonomy policy for a single run.

All fields are validated by a strictspec gate at load time. Path strings are coerced to Path objects and budget strings to Decimal after validation.

Run configuration (run_config.toml)
FieldTypeRequiredDescription
workflow_pathstringyesPath to the workflow TOML file. Must be non-empty.
agents_dirstringyesPath to the directory containing agent TOML files. Must be non-empty.
knowledge_dirstringyesPath to the directory containing knowledge constraint files. Must be non-empty.
categories_pathstringyesPath to the categories TOML file. Must be non-empty.
read_rootstringyesRoot path for file read operations (sandbox boundary). Must be non-empty.
db_urlstringyesPostgreSQL connection URL (e.g. "postgres://user:pass@host/db"). Must be non-empty.
provider_configsmap of mapyesProvider configuration. Outer keys are provider names, inner maps contain provider-specific settings.
budgetstringyesTotal run budget in USD (parsed as Decimal). Must be non-empty.
autonomy_levelstringyesHow much autonomy the Overseer has. Must be non-empty.
budget_exhaustion_policystringnoWhat happens when the budget runs out. Default: "unlimited".
secrets_envmapnoMaps secret names to environment variable names for {{secret:NAME}} substitution.
tools_dirstringnoPath to the directory containing data-defined tool TOML files. Must be non-empty when present.

#provider_configs format

Each provider entry is a map with a required type field and provider-specific settings:

TM toml
[provider_configs.anthropic]
type = "anthropic"
api_key = "sk-ant-..."

[provider_configs.openai]
type = "openai"
api_key = "sk-..."

Supported provider types and their fields:

provider_configs format
Provider typeFieldsDefault
anthropicapi_key, base_url, api_version, max_tokensbase_url = "https://api.anthropic.com", api_version = "2023-06-01", max_tokens = 128000
openaiapi_key, base_urlbase_url = "https://api.openai.com/v1"
googleapi_key, base_urlbase_url = "https://generativelanguage.googleapis.com/v1beta"

If api_key is omitted from the provider config, the provider reads it from the corresponding environment variable (see Environment Variables below).

#autonomy_level values

autonomy_level values
ValueAutonomous actions
lowread_only
mediumread_only, retry, budget_reallocation, concurrency, task_assumption
highAll of medium plus scope_change, architecture_decision, understanding_assumption
maxAll actions

#budget_exhaustion_policy values

budget_exhaustion_policy values
ValueBehavior
block_newBlock creation of new tasks.
cancel_allCancel all running tasks.
timeout_graceAllow a grace period before cancelling.
unlimitedNo budget enforcement (default).

#Example

TM toml
format_version = 1

workflow_path = "./workflows/pipeline.toml"
agents_dir = "./agents/"
knowledge_dir = "./knowledge/"
categories_path = "./categories.toml"
read_root = "/home/user/project"
db_url = "postgres://orxtra:password@localhost:5432/orxtra"
budget = "10.00"
autonomy_level = "medium"
budget_exhaustion_policy = "block_new"
tools_dir = "./tools/"

[provider_configs.anthropic]
type = "anthropic"
api_key = "sk-ant-..."

[secrets_env]
GITHUB_TOKEN = "GITHUB_TOKEN"
SLACK_WEBHOOK = "SLACK_WEBHOOK_URL"

#Knowledge files (knowledge.toml)

Knowledge files inject constraints into a run's constraint memory. Place them in the knowledge_dir referenced by the run configuration. Load with orxtra.overseer.load_knowledge_files(directory).

#[[constraints]]

[[constraints]]
FieldTypeRequiredDescription
textstringyesThe constraint text. Must be non-empty.
tierstringyesConstraint tier (passed through to write_constraint). Must be non-empty.
kindstringyesConstraint kind (passed through to write_constraint). Must be non-empty.

#Example

TM toml
format_version = 1

[[constraints]]
text = "All database migrations must be backward-compatible."
tier = "hard"
kind = "architecture"

[[constraints]]
text = "Prefer composition over inheritance."
tier = "soft"
kind = "style"

#Data tool definitions (tool.toml)

Data-defined tools are standalone TOML files in the tools_dir. They define custom tools with typed parameters and one of three execution backends: HTTP, Monty (sandboxed Python), or command. Load with orxtra.tool.load_tool_definitions(directory).

#[tool] section

[tool] section
FieldTypeRequiredDescription
namestringyesTool name. Must be non-empty.
descriptionstringyesTool description. Must be non-empty.
namespacestringyesMust start with custom. (regex: ^custom\.).
deferredbooleanyesWhether to defer-load this tool.
tagsarray of stringnoClassification tags (e.g. "readonly", "mutation").

#[params] section (optional)

A map of parameter name to parameter definition. Keys must match ^[A-Za-z_][A-Za-z0-9_]*$.

Each parameter:

[params] section (optional)
FieldTypeRequiredDescription
typestringyesOne of: "string", "integer", "number", "boolean".
descriptionstringyesParameter description.
requiredbooleanyesWhether the parameter is required.
patternstringnoRegex pattern for string validation.

#[execution] section

A discriminated union on the type field. Exactly one execution type must be configured.

#HTTP execution (type = "http")

HTTP execution (type = "http")
FieldTypeRequiredDescription
typeliteralyesMust be "http".
methodstringyesHTTP method. One of: "GET", "HEAD", "POST", "PUT", "DELETE", "PATCH".
urlstringyesURL template. Must be non-empty. Supports {{param}} substitution.
headersmap of stringnoHTTP headers. Supports {{secret:NAME}} substitution.
body_templatestringnoRequest body template with {{param}} substitution.

#Monty execution (type = "monty")

Monty execution (type = "monty")
FieldTypeRequiredDescription
typeliteralyesMust be "monty".
codestringyesPython code to execute in the Monty sandbox. Must be non-empty.
capabilitiesarray of stringyesRequired sandbox capabilities.
limitstableyesResource limits.

Limits table:

Monty execution (type = "monty")
FieldTypeRequiredDescription
max_duration_secsintegeryesMaximum execution time in seconds.
max_allocationsintegernoMaximum memory allocations.
max_memoryintegernoMaximum memory usage in bytes.

#Command execution (type = "command")

Command execution (type = "command")
FieldTypeRequiredDescription
typeliteralyesMust be "command".
executablestringyesExecutable name or path. Must be non-empty.
arg_validationbooleanyesWhether to validate arguments.
timeout_ceilingintegeryesMaximum execution time in seconds.

#[output] section (optional)

[output] section (optional)
FieldTypeRequiredDescription
schematableyesJSON Schema object for output validation (validated at execution time by jsonschema).

#A2A skill definitions (skill.schema.toml)

A2A skill descriptors map A2A protocol skill IDs to orxtra capabilities.

A2A skill definitions (skill.schema.toml)
FieldTypeRequiredDescription
idstringyesA2A skill identifier. Must be non-empty.
namestringyesHuman-readable skill name. Must be non-empty.
descriptionstringyesSkill description. Must be non-empty.
capability_namestringyesName of the orxtra capability this skill maps to. Must be non-empty. Validated at load time against registered capabilities.
input_modesarray of stringnoAccepted input MIME types.
output_modesarray of stringnoProduced output MIME types.

#Environment variables

#LLM provider API keys

These are read by the transport providers when api_key is not explicitly passed in the provider configuration:

LLM provider API keys
VariableUsed by
ANTHROPIC_API_KEYAnthropicProvider (required if api_key not in provider config)
OPENAI_API_KEYOpenAIProvider (required if api_key not in provider config)
GOOGLE_API_KEYGoogleProvider (required if api_key not in provider config)

Missing environment variables when the provider needs them produce a KeyError, not a silent fallback.

#Worker environment variables

These are set inside Docker worker containers by DockerWorker:

Worker environment variables
VariableDescription
ORXTRA_BRAIN_URLWebSocket URL for the brain connection.
ORXTRA_API_KEYAPI key for worker authentication.
ORXTRA_ROOTProject root path inside the container (always /project).

#Secret substitution

Secret references in tool arguments ({{secret:NAME}}) are resolved by the secrets module. The secrets_env map in run configuration defines which environment variables back which secret names. The create_secret_registry factory reads each mapped environment variable from os.environ -- a missing variable is a hard error (KeyError), never a silent default.

#Database configuration

orxtra uses PostgreSQL (via asyncpg) for persistent state. The database URL is specified in the run configuration's db_url field as a standard PostgreSQL connection string:

postgres://user:password@host:port/database

Both userinfo passwords (postgres://u:pw@host/db) and query-parameter passwords (postgres://host/db?password=pw) are supported. Passwords are redacted in serialized run configs stored in the database.

Each module owns its own schema, managed by pgdesign via TOML schema files in the schema/ directory:

Database configuration
Schema fileOwner moduleTables
schema/trace.tomltraceevents, runs, tasks, transcripts, decisions, constraints
schema/dispatch.tomldispatchsources, subscriptions, subscription_actions, accumulator_buffer
schema/identity.tomlidentityprincipals
schema/auth.tomlauthconsumers, credentials
schema/notification.tomlnotificationnotification deliveries
Search