Cohere
Cohere builds enterprise-grade language models including the Command family. AgentXchain connects via api_proxy using Cohere's OpenAI-compatible Chat API.
Which adapter?
api_proxy with provider: "openai" and a custom base_url.
Prerequisites
- A Cohere API key — get one from dashboard.cohere.com
COHERE_API_KEYset in your environmentagentxchainCLI installed
Configuration
{
"runtimes": {
"cohere-dev": {
"type": "api_proxy",
"provider": "openai",
"model": "command-a-reasoning",
"auth_env": "COHERE_API_KEY",
"base_url": "https://api.cohere.com/compatibility/v1/chat/completions"
}
},
"roles": {
"dev": {
"runtime": "cohere-dev",
"mandate": "Implement features and fix bugs",
"authority": "proposed"
}
}
}
Available models
| Model | Best for |
|---|---|
command-a-reasoning | Complex reasoning and code architecture |
command-a | General-purpose coding |
command-r-plus | Retrieval-augmented tasks |
Verify the connection
export COHERE_API_KEY="..."
agentxchain connector check
Gotchas
- Compatibility endpoint: Cohere provides an OpenAI-compatible endpoint at
/compatibility/v1/. Use this withprovider: "openai". - Enterprise features: Cohere offers enterprise deployment options (VPC, on-premise). For these, update
base_urlto your deployment endpoint. - Cost rates: Supply operator-specific rates:
{
"budget": {
"cost_rates": {
"command-a-reasoning": { "input_per_million": 2.50, "output_per_million": 10.00 }
}
}
}