Skip to main content

Cohere

Use Cohere’s Command models for RAG, tool calling, and enterprise workloads. Cohere excels at retrieval-augmented generation and offers fine-tuning support.
Agentium tries the native cohere-ai SDK first; if not installed, it falls back to the openai SDK via Cohere’s OpenAI-compatible endpoint.

Setup


Factory

string
required
Model ID (e.g., "command-r-plus", "command-r", "command-r7b-12-2024", "command-light").
CohereConfig
Optional { apiKey? }.

Supported Models


Basic Example


RAG-Optimized Usage

Cohere’s Command R models are specifically designed for retrieval-augmented generation:

Tool Calling


Full Example


Environment Variables


Cross-References