Cohere Command R+ / Command A Agents
Type: full-code · Vendor: Cohere · Language: API (Python, TypeScript, REST) · License: proprietary · Status: active · Status in practice: mature
Enterprise-grade Cohere model family (Command R/R+/A) built so multi-step tool use, RAG with inline citations, and JSON-schema-constrained outputs are first-class API behaviours rather than client-side workarounds.
Description. Cohere markets the Command family as 'AI purpose-built for real-world agentic applications anchored in your data'. The Chat API directly supports multi-step (a.k.a. agentic) tool use: the model can decide to chain tool calls and feed each result into the next step. RAG is a documented mode on the same endpoint, with citations emitted alongside generated text. Structured outputs are constrained either by JSON mode or by a caller-supplied JSON Schema. Cohere also packages Command into the North platform for enterprise agent workflows.
Agent loop shape. Stateless HTTP request/response Chat API. The caller drives a tool-use loop: send user message + tools schema, receive either a final answer or a list of tool_calls, execute the tools, post the tool_results back as a new turn, repeat until the model returns a normal assistant message. RAG mode uses a documents[] parameter on the same endpoint and emits citations[] alongside text. Same loop shape supports JSON mode and JSON-Schema-constrained outputs via response_format.
Primary use cases
- enterprise RAG with grounded, inline-cited answers
- multi-step tool/function calling agents
- JSON-schema-constrained structured extraction
- regulated-industry chat backends and copilots
Key concepts
- Tool use API → tool-use (docs) — Chat-API mechanism to connect Command models to external tools (search, APIs, functions, databases).
- Multi-step tool use → react (docs) — Model can chain tool calls; the workflow loop runs steps 2 and 3 multiple times until done.
- Parallel tool calls → parallel-tool-calls (docs) — Model can return more than one tool call per step — same tool repeated or different tools.
- RAG with citations → citation-streaming (docs) — Pass documents in the documents[] parameter; model returns text with inline fine-grained citations.
- JSON mode / JSON Schema mode → structured-output (docs) — response_format='json_object' guarantees valid JSON; passing a schema constrains the model to it.
- North (docs) — Cohere's enterprise agent platform powered by Command models; used in regulated industries.
Patterns this full-code implements —
- ★★Agentic RAG
RAG is a documented mode on the Chat API; the model generates answers grounded on documents[] and emits inline citations out-of-the-box.
- ★★Citation Streaming
Cohere advertises fine-grained citations as a built-in output of the RAG pipeline.
- ★★ReAct
Multi-step tool use loop — model decides on a sequence of tool calls, executes each, feeds the observation back. This is the ReAct shape even though Cohere's docs don't use the academic name.
- ★★Structured Output
JSON mode guarantees a valid JSON object; JSON Schema mode constrains output to a caller-supplied schema.
- ★★Tool Use
Tool use is a top-level Chat API feature, advertised as the way to connect Command models to external systems.
- ★★Parallel Tool Calls
Model can return more than one tool_call per assistant turn — same tool repeated or different tools.