Configuration
An agent is configured in a few layers, each with one job. You will know which layer a setting belongs in, what the defaults are, and how to see the settings an agent actually ended up with.LLM_API_KEY. Everything
else has a local default: memory in the process, the workspace and traces in
./workspace. Every output on this page is what the code printed when it was
run; the model’s wording will differ on yours.All the layers in one agent
- Nested settings merge. Only
threshold_percentwas given; the other fivecontext_managementkeys kept their defaults. The same holds fortool_offload,privacy_configandgovernance_config. agent.agent_configis the full, checked configuration the agent will run with. Print it when you are unsure what a default is.capture: "default"is the privacy-first record: the trace marks the model promptnot_recordedinstead of keeping it. The default,"full", keeps it.workspace_dirmoved the agent’s files, its offloaded tool results and its traces to./agent_data.
How it works
-
Everything is checked when the agent is built. An unknown key, a value out
of range or a setting for the wrong transport raises a
ValueErrorfrom the constructor, naming the setting. Nothing waits for a run to fail. -
Code beats the environment. Environment variables supply secrets and
connection strings, and defaults when code says nothing. A
workspace_configin code replaces the workspace variables entirely. -
A dict or a typed object.
agent_configtakes a dict, or anAgentConfig, whose fields your editor completes:
1. Environment variables
The model key
model_config; the runtime hands
it to that provider. It is read on the agent’s first run. Ollama needs none. To
take the key from somewhere else, such as a secrets manager, put it in
model_config["api_key"] instead.
The runtime does not load .env files. To use one, call load_dotenv() from
python-dotenv at the top of your script.
Memory
Session history lives in the process unless you pass aMemoryRouter. The store
is chosen in code; its connection string comes from the environment.
Workspace
The workspace holds the agent’s files, offloaded tool results and, by default, its traces. It is separate from memory.OMNICOREAGENT_WORKSPACE_PREFIX (default workspace) prefixes the object keys
in S3 and R2. The same settings in code, which replace the variables:
agent_config={"workspace_config": {"workspace_backend": "s3", "s3_bucket": "..."}}.
S3 and R2 need omnicoreagent[s3]. More in Workspace files.
Trace exporters
Traces are kept on local disk without any external service. To also send each finished trace to an OTLP-compatible backend, install the extra and name the exporter:destination is otlp, langsmith, opik or jsonl. An exporter is a copy
sent after the run; it is never in the run’s way
(Observability).
OmniServe and background runs
You need none of these to start: the server binds0.0.0.0:8000, exposes the
background API, starts its worker and keeps tasks in memory. A variable
overrides the same value passed to OmniServeConfig in code.
Server variables
Server variables
Background task store variables
Background task store variables
2. Agent configuration
The settings you are most likely to change. Each has a default; leave out what you do not need.Which limit to use
Several settings stop a run; they count different things.max_steps is the one to set first. Budgets are the only limit in dollars,
and the only one across runs.
governance_config["sandbox_config"] names where the execute tool runs
commands: docker, e2b, modal, daytona, vercel, http (your own
service), or local (the machine the agent runs on, not isolated), plus any
provider you register. none gives a policy without a sandbox; local_test runs
registered handlers for tests. What each needs, and which can limit a sandbox’s
network to named hosts, is on Sandbox providers.
3. Model configuration
4. MCP tool configuration
Each MCP server is a dict inmcp_tools:
name is the server’s identity in tool routing, policy and traces. command,
args, cwd and env apply to stdio; url, headers, timeout,
sse_read_timeout and auth to sse and streamable_http; connect_timeout
(30 seconds by default) and call_timeout to all. A setting that does not apply
to the transport raises a ValueError naming the server. Every setting, OAuth
and reconnects: MCP.
5. Telemetry configuration
Every run’s trace is kept without any setup.telemetry_config changes what it
keeps and for how long:
archive_index_url to a database and archive_target or archive_bodies_path
for the bodies. All of it, with the rest of the settings, is in the
telemetry settings reference; reading a trace
is on Observability.
When things go wrong
All of these are raised by the constructor, before any model call, unless noted.ValueError: Unknown agent_config setting 'max_step'. Did you mean 'max_steps'?
ValueError: Unknown agent_config setting 'max_step'. Did you mean 'max_steps'?
AgentConfig(max_step=...) the same mistake is a TypeError: ... got an unexpected keyword argument 'max_step'.ValueError: agent_config['memory_tool_backend'] was removed in 0.4
ValueError: agent_config['memory_tool_backend'] was removed in 0.4
ValueError: governance_config has unknown keys: enable
ValueError: governance_config has unknown keys: enable
ValueError: max_steps must be between 1 and 1000, got 0
ValueError: max_steps must be between 1 and 1000, got 0
ValueError: Unsupported provider: openia
ValueError: Unsupported provider: openia
ValueError: model_config.model is required.ValueError: MCP server 'files': 'url' does not apply to stdio
ValueError: MCP server 'files': 'url' does not apply to stdio
command and args; an HTTP server takes url.ValueError: Invalid memory store type: postgres
ValueError: Invalid memory store type: postgres
MemoryRouter(...):MemoryRouter("sql") with DATABASE_URL pointing at it.ImportError: Redis memory requires optional dependency
ImportError: Redis memory requires optional dependency
Install it with: pip install 'omnicoreagent[redis]'.ValueError: MemoryRouter needs REDIS_URL (or DATABASE_URL, MONGODB_URI)
ValueError: MemoryRouter needs REDIS_URL (or DATABASE_URL, MONGODB_URI)
REDIS_URL, DATABASE_URL or MONGODB_URI) is not
set in the process that builds the router. Set it before the router is
built; the store never falls back to process memory on its own, so history
is not lost quietly. See the warning under Memory.Next
Agent settings
agent_config key and its default, generated from the code.Models
Memory
Security model
governance_config.