Configuration Guide
OmniCoreAgent supports configuration through environment variables, Python dictionaries, and specialized configuration objects.1. Environment Variables
Environment variables are the best way to manage sensitive data like API keys and connection strings. For the first working agent, set onlyLLM_API_KEY. Memory and events default
to in-memory storage, workspace files default to local disk, and OmniServe
settings have server-side defaults. Add backend variables only when you are
intentionally moving from local defaults to persistent or cloud infrastructure.
LLM API Key
OmniCoreAgent uses one public environment variable for hosted model credentials:model_config["provider"] to choose the provider. The runtime reads
LLM_API_KEY and internally passes it to LiteLLM for the selected provider.
Do not configure provider-specific key names in OmniCoreAgent examples.
Optional Memory Backends
The default memory backend is in-memory and needs no environment variables. Set these only when conversation history must live outside the current process.
Optional MongoDB memory variables:
Workspace Storage
Workspace storage is separate from memory storage. Memory stores conversation history. Workspace storage stores files, scratchpads, artifacts, subagent outputs, and tool offloads.
Optional workspace variables:
Optional Telemetry Export
Telemetry events and traces work in-process by default. Set exporter variables only when traces should leave the process for an OTLP-compatible backend.
Install the matching extra before exporting:
OmniServe
OmniServe reads these variables throughOmniServeConfig. Environment variables
override values passed in code.
You do not need any OmniServe environment variables to start. Defaults bind the
server to port 8000, enable the background API, start the background worker,
and use an in-memory task store. Set only the values you want to override.
The background task store is separate from
MemoryRouter. MemoryRouter stores
conversation/session history. The task store stores scheduler/runtime state:
tasks, schedule cursors, runs, attempts, leases, heartbeats, retries, and
cancellation flags. Defaults are intentionally light. Use sql, redis, or
mongodb when background tasks must survive process restarts.
Choose one durable backend per deployment. Use SQL/SQLite for local durability
or simple single-node services. Use Redis when your deployment already operates
Redis with persistence and no eviction for task-store keys. Use MongoDB when
MongoDB is your durable operational store.
For Redis durability, enable Redis persistence and keep task-store keys out of
eviction. MongoDB task-store writes use majority write concern.
Durable background examples. Pick one backend:
2. Agent Configuration
TheAgentConfig handles the runtime behavior of the agent, such as reasoning steps and resource limits.
enable_subagents is true, OmniCoreAgent automatically enables workspace
files because spawned workers write output, todos, logs, and scratchpads into
the active workspace. For full harness-style workloads, pair dynamic subagents
with context management and tool offloading. Context management checks the prompt
before each model call; tool offloading keeps large tool payloads in workspace
artifacts instead of feeding the full payload back into the loop.
governance_config.sandbox_config selects the sandbox runtime boundary used by
governed execution. Supported built-in providers are:
Use
local_test only for tests and local harness wiring:
3. Model Configuration
Themodel_config defines which LLM to use and its sampling parameters.
openai, anthropic, groq, ollama,
azure, gemini, deepseek, mistral, openrouter, and cencori.
Provider-specific runtime options currently supported by OmniCoreAgent are:
- Azure:
azure_endpoint,azure_api_version,azure_deployment - Ollama:
ollama_host
4. MCP Tool Configuration
MCP tool servers are configured as a list of dictionaries. OmniCoreAgent only loads tools from MCP servers.5. Persistence Configuration
Pass aMemoryRouter to customize conversation memory. Runtime evidence is
recorded through telemetry, which defaults to in-memory storage.
Best Practices
- Use
.env: Use a library likepython-dotenvto load your environment variables during development. - Model Selection: Use smaller models (
gpt-4o-mini) while building and testing your agent logic to save costs. - Limit Steps: Always set a reasonable
max_stepsto prevent the agent from entering infinite reasoning loops in case of tool failures.