Documentation Index
Fetch the complete documentation index at: https://docs-omnicoreagent.omnirexfloralabs.com/llms.txt
Use this file to discover all available pages before exploring further.
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.| Backend | Variable | Example |
|---|---|---|
| Redis | REDIS_URL | redis://localhost:6379/0 |
| SQL Database | DATABASE_URL | postgresql://user:pass@localhost:5432/db |
| MongoDB | MONGODB_URI | mongodb://localhost:27017 |
| Variable | Purpose |
|---|---|
MONGODB_DB_NAME | MongoDB memory database name. Defaults to omnicoreagent. |
MONGODB_COLLECTION | MongoDB memory collection name. Defaults to messages. |
Workspace Storage
Workspace storage is separate from memory storage. Memory stores conversation history. Workspace storage stores files, scratchpads, artifacts, subagent outputs, and tool offloads.| Backend | Variables |
|---|---|
| Local | OMNICOREAGENT_WORKSPACE_BACKEND=local, OMNICOREAGENT_WORKSPACE_DIR=./workspace |
| S3 | OMNICOREAGENT_WORKSPACE_BACKEND=s3, AWS_S3_BUCKET, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY |
| R2 | OMNICOREAGENT_WORKSPACE_BACKEND=r2, R2_BUCKET_NAME, R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY |
| Variable | Purpose |
|---|---|
OMNICOREAGENT_WORKSPACE_PREFIX | Key prefix for S3/R2 workspace objects. |
AWS_REGION | AWS region for S3 workspaces. |
AWS_ENDPOINT_URL | Custom S3-compatible endpoint. |
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.| Exporter | Variables |
|---|---|
| OTLP/HTTP | OTEL_EXPORTER_OTLP_ENDPOINT or explicit exporter endpoint |
| LangSmith | LANGSMITH_API_KEY, optional LANGSMITH_PROJECT, optional LANGSMITH_OTEL_ENDPOINT |
| Opik | OPIK_API_KEY, OPIK_WORKSPACE, optional OPIK_PROJECT_NAME, optional OPIK_OTEL_ENDPOINT |
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.
| Variable | Default | Purpose |
|---|---|---|
OMNICOREAGENT_SERVE_HOST | 0.0.0.0 | Server bind host. Must not be empty. |
OMNICOREAGENT_SERVE_PORT | 8000 | Server port. Must be 1-65535. |
OMNICOREAGENT_SERVE_WORKERS | 1 | Direct OmniServe worker count. Must be 1; run multiple processes behind a process manager for horizontal scaling. |
OMNICOREAGENT_SERVE_API_PREFIX | "" | API route prefix, such as /api/v1. Normalized to a leading slash with no trailing slash; whitespace is invalid. |
OMNICOREAGENT_SERVE_ENABLE_DOCS | true | Enable Swagger UI. |
OMNICOREAGENT_SERVE_ENABLE_REDOC | true | Enable ReDoc. |
OMNICOREAGENT_SERVE_CORS_ENABLED | true | Enable CORS middleware. |
OMNICOREAGENT_SERVE_CORS_ORIGINS | * | Comma-separated allowed origins. |
OMNICOREAGENT_SERVE_CORS_METHODS | * | Comma-separated allowed methods. |
OMNICOREAGENT_SERVE_CORS_HEADERS | * | Comma-separated allowed headers. |
OMNICOREAGENT_SERVE_CORS_CREDENTIALS | true | Allow CORS credentials. |
OMNICOREAGENT_SERVE_AUTH_ENABLED | false | Enable Bearer token auth. Requires a non-empty OMNICOREAGENT_SERVE_AUTH_TOKEN value. |
OMNICOREAGENT_SERVE_AUTH_TOKEN | unset | Bearer token value used when auth is enabled. |
OMNICOREAGENT_SERVE_REQUEST_LOGGING | true | Log incoming requests. |
OMNICOREAGENT_SERVE_LOG_LEVEL | INFO | Server log level: CRITICAL, ERROR, WARNING, INFO, DEBUG, or TRACE. |
OMNICOREAGENT_SERVE_REQUEST_TIMEOUT | 300 | Request timeout in seconds. Set 0 to disable timeout middleware. |
OMNICOREAGENT_SERVE_RATE_LIMIT_ENABLED | false | Enable in-process rate limiting. |
OMNICOREAGENT_SERVE_RATE_LIMIT_REQUESTS | 100 | Requests per rate-limit window. Must be at least 1 when rate limiting is enabled. |
OMNICOREAGENT_SERVE_RATE_LIMIT_WINDOW | 60 | Rate-limit window in seconds. Must be at least 1 when rate limiting is enabled. |
OMNICOREAGENT_BACKGROUND_ENABLED | true | Expose background task endpoints. |
OMNICOREAGENT_BACKGROUND_AGENT_ID | default | Agent id used when OmniServe registers the served agent for background work. |
OMNICOREAGENT_BACKGROUND_TASK_STORE | in_memory | Background control-plane store: in_memory, sql, redis, or mongodb. |
OMNICOREAGENT_BACKGROUND_TASK_STORE_URL | unset | SQL or Redis URL. A URL with no backend selects SQL; use OMNICOREAGENT_BACKGROUND_TASK_STORE=redis for Redis URLs. |
OMNICOREAGENT_BACKGROUND_TASK_STORE_URI | unset | MongoDB URI. Setting this selects the MongoDB task store. |
OMNICOREAGENT_BACKGROUND_TASK_STORE_DATABASE | omnicoreagent | MongoDB database name. |
OMNICOREAGENT_BACKGROUND_TASK_STORE_PREFIX | unset | Redis key prefix. |
OMNICOREAGENT_BACKGROUND_TASK_STORE_COLLECTION_PREFIX | unset | MongoDB collection prefix. |
OMNICOREAGENT_BACKGROUND_TASK_STORE_CONNECT_TIMEOUT | unset | Optional backend connect timeout in seconds. |
OMNICOREAGENT_BACKGROUND_START_WORKER | true | Start the scheduler and worker loop during server lifespan. |
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.
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.