Configuration Guide
OmniCoreAgent can be configured through environment variables, Python dictionaries, or specialized configuration objects.1. Environment Variables
Environment variables are the best way to manage sensitive data like API keys and connection strings.LLM API Keys
| Provider | Variable |
|---|---|
| OpenAI | OPENAI_API_KEY |
| Anthropic | ANTHROPIC_API_KEY |
| Google Gemini | GEMINI_API_KEY |
| Groq | GROQ_API_KEY |
Storage Backends
| 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 |
Observability
| Service | Variable |
|---|---|
| Opik | OPIK_API_KEY |
| Opik Project | OPIK_PROJECT_NAME |
2. Agent Configuration
TheAgentConfig handles the runtime behavior of the agent, such as reasoning steps and resource limits.
3. Model Configuration
Themodel_config defines which LLM to use and its sampling parameters.
4. MCP Tool Configuration
MCP servers are configured as a list of dictionaries.5. Persistence Configuration
Pass aMemoryRouter or EventRouter to customize where history and telemetry are stored.
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.