Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Configuration files

Reference for Toolang TOML configuration and environment loading.

Toolang reads TOML configuration from the root and the current agent home. For standalone roaming .too files, a sibling toolang.toml is linked into the materialized agent home as config.toml.

Locations

FileScope
${TOOLANG_ROOT}/config.tomlRoot configuration shared by agents in the root
${TOOLANG_ROOT}/agents/<agent>/config.tomlAgent-local configuration
toolang.toml beside a roaming .too fileSource-local configuration for a roaming program

Root configuration is read first. Agent configuration is read second and overrides the same named entries where the loader supports merging.

Environment Files

Runtime environment is loaded in this order:

  1. ${TOOLANG_ROOT}/.env
  2. ${TOOLANG_ROOT}/agents/<agent>/.env
  3. the process environment

Later values override earlier values. Use .env for local defaults and keep secrets out of checked-in TOML files.

Plugin config tables also support *_env keys. If a key such as token_env is present and token is not set directly, Toolang reads the named environment variable and provides it to the plugin as token.

[sandbox]
driver = "docker"
target = "python:3.13"
 
[sandbox.config]
token_env = "SANDBOX_TOKEN"

If the named environment variable is missing, Toolang raises an error that names the config key and the missing variable.

Models

Model defaults, provider overrides, and local aliases live under [models]. The root and agent config files are read in order; agent config can replace defaults or aliases.

[models]
default = ["gateway", "openai/gpt-5[openai]"]
 
[models.aliases.gateway]
ref = "openai/gpt-5"
provider = "openai"
adapter = "responses"
endpoint = "https://gateway.example.com/v1"
key_env = "GATEWAY_API_KEY"
headers = { "X-Team" = "infra" }
 
[models.providers.openrouter]
endpoint = "https://openrouter.ai/api/v1"
key_env = "OPENROUTER_API_KEY"

[models]

KeyTypeMeaning
defaultstring or string arrayOrdered default model selector set. The first item is the default model.

[models.aliases.<name>]

KeyRequiredMeaning
refyesCanonical model ref, such as openai/gpt-5
providernoProvider name. Defaults to custom for alias-only endpoints
modelnoProvider-specific model id override
namenoDisplay name
adapternoAdapter name, such as responses or chat_completions
endpointnoBase URL override
key_envnoEnvironment variable that contains the API key
scopenoDisplay or filtering scope, such as local or remote
tagsnoString array of metadata tags
toolsnoBoolean tool-calling support override
streamingnoBoolean streaming support override
headersnoString map of request headers
optionsnoAdapter-specific request options
detailsnoHuman-readable provider or alias notes

provider = "custom" is reserved for alias-only OpenAI-compatible endpoints and requires endpoint.

[models.providers.<name>]

KeyMeaning
endpointProvider base URL override
key_envAPI-key environment variable override
adapterDefault adapter override
scopeProvider scope metadata
optionsProvider-specific options
detailsHuman-readable provider notes

Wired Caps

Remote caps can be wired through TOML tables. Root config.toml wires shared caps. Agent config.toml wires private caps for that agent.

[skills]
reviewer = { ref = "github://acme/agents/skills/reviewer@main" }
 
[services]
github = { ref = "github://acme/agents/services/github.md@main" }
 
[prompts]
rewrite = { ref = "github://acme/agents/prompts/rewrite.md@main" }
 
[psyches]
direct = { ref = "github://acme/agents/psyches/direct.md@main" }

Supported cap sections are psyches, skills, services, and prompts. Each entry name becomes the local cap name. Each entry value must contain a ref.

Tools

Tool plugin configuration lives under [tools.<plugin>] and is merged from root to agent config by plugin name.

[tools.agent_chat]
peers = [
  { name = "bob", endpoint = "http://127.0.0.1:7002" },
]

Built-in tool families include agent_chat, filesystem, shell, web_search, service_use, and agent_state.

Channels

Channel bindings live under [channels.<binding>]. Each binding must declare the channel plugin name in plugin; all other keys are passed to that plugin as config.

[channels.inbox]
plugin = "telegram"
token_env = "TELEGRAM_BOT_TOKEN"
owner_chat_id = "12345"

Root and agent channel bindings merge by binding name.

Sandbox

Sandbox config uses a top-level [sandbox] table plus optional [sandbox.config].

[sandbox]
driver = "docker"
target = "python:3.13"
 
[sandbox.config]
image = "python:3.13-slim"

driver names the sandbox plugin. plugin is also accepted as a legacy alias for driver. target is optional and is interpreted by the sandbox plugin. [sandbox.config] values from the agent config extend or override root values.

Web

Root web config lives under [web].

[web]
ui_base_url = "https://too.run"
cors_allowed_origins = ["http://localhost:3000", "https://too.run"]
KeyEnvironment overrideMeaning
ui_base_urlTOOLANG_UI_BASE_URL, then TOOLANG_WEBUI_BASE_URLBase URL used when rendering web UI links
cors_allowed_originsTOOLANG_CORS_ALLOWED_ORIGINS, then TOOLANG_CORS_ORIGINSAllowed browser origins for the runtime API

TOOLANG_ROOT selects the root directory itself. PY_LOG controls logging verbosity and destinations for runtime and invoke surfaces.

© 2026 Toolang