Skip to main content

Installation

Requirements

  • Python 3.11+
  • An API key for your chosen LLM provider

Core install

pip install agentix

The core package bundles all supported LLM provider SDKs along with pydantic, httpx, tiktoken, and MCP support. No extra install step is needed to use any provider.

Optional extras

ExtraInstallsUse case
redisredisRedisStorageBackend, RedisCircuitBreakerBackend for distributed deployments
gatewayaiohttp + adapter depsMessaging gateway — HTTP webhooks, Slack, WhatsApp, Email
gateway-slackslack-sdkSlack adapter only (lighter than full gateway)
gateway-whatsappgateway-coreWhatsApp Business API adapter
gateway-emailaiosmtplibEmail adapter (SMTP/IMAP)
devpytest, mypy, ruff, fakeredisDevelopment and testing tools
allredis + all gateway adapters + devEverything
pip install agentix[redis]           # Redis session storage & circuit breaker
pip install agentix[gateway] # All messaging gateway adapters
pip install agentix[all] # Everything

API key

Pass your LLM provider API key via the AGENTIX_API_KEY environment variable:

export AGENTIX_API_KEY=your-api-key-here

Or supply it inline via llm_options:

options = AgentixAgentOptions(
provider="anthropic",
llm_options={"api_key": "your-api-key-here"},
)

Agentix automatically redacts api_key from logs and __repr__ to prevent accidental leakage.

OpenAI-compatible endpoints

For any OpenAI-compatible endpoint (Cerebras, Ollama, vLLM, LiteLLM, etc.) use provider="openai_compatible" and set base_url:

options = AgentixAgentOptions(
provider="openai_compatible",
model="your-model-name",
llm_options={
"base_url": "http://localhost:11434/v1", # e.g. Ollama
"api_key": "ollama",
},
)

Or via environment variables:

export AGENTIX_PROVIDER=openai_compatible
export AGENTIX_BASE_URL=http://localhost:11434/v1
export AGENTIX_MODEL=llama3.2

Web search keys (optional)

WebSearch auto-detects which backend to use based on available keys:

export TAVILY_API_KEY=tvly-...     # recommended
export BRAVE_API_KEY=BSA...
export SERPAPI_API_KEY=...
# (no key) → falls back to DuckDuckGo

Verify installation

import agentix
print(agentix.__version__)