DeepSeek Agent
Type: full-code · Vendor: DeepSeek · Language: API · License: proprietary · Status: active · Status in practice: mature
OpenAI/Anthropic-compatible Chinese model API (deepseek-chat, deepseek-reasoner) that exposes function calling with a strict JSON-Schema mode, separate reasoning_content channel, and is positioned primarily as a drop-in backend for third-party agent harnesses (Claude Code, Copilot CLI, OpenCode).
Description. DeepSeek does not ship a hosted agent product; instead the API mirrors OpenAI's Chat Completions shape (and is also Anthropic-compatible) so any existing agent harness can swap DeepSeek in as the model. Function calling is supported with up to 128 tools, a strict mode that pins outputs to a JSON Schema, and tool_choice (none/auto/required). The reasoning model deepseek-reasoner emits a separate reasoning_content stream alongside the answer. DeepSeek's own listed agent integrations include Claude Code, GitHub Copilot, GitHub Copilot CLI and others — the company is the model, the agents are the third parties.
Agent loop shape. Stateless OpenAI/Anthropic-compatible Chat Completions endpoint. The caller drives a standard tools-loop: post messages + tools[], receive either content or tool_calls, execute tools, append tool messages, repeat. For deepseek-reasoner the model also emits a reasoning_content field at the same level as content, which clients are expected to surface or discard. DeepSeek does not host the agent runtime — the harness lives in the caller (Claude Code, etc.).
Primary use cases
- drop-in backend model for Claude Code / Copilot CLI / OpenCode style agents
- schema-strict function calling for tool-using agents
- reasoning agents that need a separate chain-of-thought channel
- JSON-output extraction pipelines
Key concepts
- OpenAI/Anthropic-compatible API (docs) — DeepSeek's API mirrors OpenAI's and Anthropic's shapes so SDKs and agent harnesses can switch backends by changing config only.
- Function Calling → tool-use (docs) — Tool-call API with up to 128 functions and tool_choice control (none/auto/required).
- Strict mode (JSON Schema) → structured-output (docs) — Forces tool-call arguments to match the function's JSON Schema; supports object, string, number, integer, boolean, array, enum, anyOf and $ref/$def.
- JSON output mode → structured-output (docs) — response_format={'type':'json_object'} returns valid JSON; requires the word 'json' in the prompt plus an example schema.
- deepseek-reasoner reasoning_content → extended-thinking (docs) — Reasoning model surfaces a CoT in reasoning_content at the same level as content, separately consumable by clients.
Patterns this full-code implements —
- ★★Structured Output
Two complementary mechanisms: response_format json_object for free-form JSON, and strict mode for schema-pinned function-call arguments.
- ★★Tool Use
Function calling supports up to 128 tools with tool_choice none/auto/required; the user is responsible for executing the function — DeepSeek only emits the call.
- ★★Extended Thinking
deepseek-reasoner exposes the chain-of-thought in a separate reasoning_content field at the same level as content; clients can display or distill it.
- ★Provider-String Routing
DeepSeek positions itself as a drop-in backend behind agent harnesses (Claude Code, Copilot CLI, OpenCode) by exposing OpenAI- and Anthropic-compatible API shapes; routing is a config change in the h…