选择 Claude 模型
Opus/Sonnet/Haiku 之间的权衡以及如何选择——无需靠猜。
Token、上下文与定价
正确计算 token、max_tokens 与上下文窗口的区别,以及如何估算成本。
你的第一次 API 调用
安装 SDK、完成鉴权,并用 Python、TypeScript 或 cURL 真实地调用 Claude。
流式输出与多轮对话
在无状态 API 上流式返回响应并自行管理对话历史。
工具使用 / 函数调用
定义工具、运行智能体循环,并处理结果。
视觉、PDF 与文件输入
发送图片和文档,并通过 file_id 复用已上传的文件。
结构化输出
获得符合 schema、可依赖的 JSON——而不是靠提示词碰运气。
扩展思考与思考力度
自适应推理与思考力度控制——按工作负载选择深度。
Effort tuning: 5 levels, model defaults, and the cache trap
The July 2026 effort parameter has five levels — low, medium, high, xhigh, max — and lives inside output_config, not at the top level. It affects tool calls (not just thinking), invalidates prompt cache when changed mid-conversation, and each model has a different recommended starting point. The practical tuning guide.
The advisor tool: Sonnet does the work, Fable does the thinking
The advisor server-tool (beta advisor-tool-2026-03-01) lets a fast executor model consult a stronger model mid-turn. Full field reference, the token-accounting trap most integrators miss, the model pairing matrix, and the exact prompts Anthropic ships in production.
提示缓存与成本优化
复用稳定的提示前缀以降低成本和延迟——以及那个会让它失效的陷阱。
Mid-Conversation System Messages
Steer a long agent session without blowing up the prompt cache — the new system role you can append after any user turn.
Mid-Conversation Tool Changes
Add and retire tools between turns without invalidating the prompt cache — the Opus 5 beta that fixes the biggest hidden tax on long agent sessions.
在 API 上构建智能体
单次调用 vs 工作流 vs 自定义智能体——决策测试与循环设计。
托管智能体
Anthropic 托管的智能体循环:agent 与 session 的区别、环境、记忆、保险库以及定时部署(cron)。
Managed Agents Memory Stores
The July 2026 beta — server-side persistent memory that mounts into a Managed Agents sandbox, with versioning, audit trail, and redaction.
Cowork 与智能体团队
智能化的桌面工作空间,以及作为产品的多智能体协作。
MCP 与连接工具
在请求上声明 MCP 服务器,以及 MCP 与其他工具类型的定位对比。
MCP 2026-07-28: The Stateless Spec
The biggest MCP revision since launch: the session is gone, every request self-describes, and any server instance can answer any call. What actually changed on July 28, 2026, and how to migrate without breaking today's servers.
MCP Apps: Interactive UIs Inside a Tool Call
MCP Apps (SEP-1865) lets an MCP server ship an HTML UI that the client renders inside a sandboxed iframe — with every action still routed through the standard JSON-RPC audit path. What the spec actually says, what to build with it, and what to refuse to build.
MCP Tasks: Long-Running Work Without the Session
The 2026-07-28 stateless MCP spec killed the session — so how do you model a 20-minute CI job, a batch import, or a human approval gate? With the official Tasks extension (SEP-2663). Full lifecycle, wire protocol, migration from the old experimental Tasks API, and the polling/notification patterns that actually work in production.
Playwright MCP: The Deep Practical Guide (2026)
Microsoft's Playwright MCP is now the #1 MCP server in the world — ahead of GitHub and Figma. The bit almost nobody teaches: the default accessibility-snapshot mode is not just faster than vision, it's a completely different automation paradigm. Profiles, opt-in caps, browser-extension mode that attaches to your real Chrome, the token-cost fight against Playwright-as-a-Skill, and the security line you must not cross.
安全、拒答与降级
优雅地处理拒答,并将其与分类器拦截区分开来。
Server-Side Fallbacks & Fallback Credit
The Opus 5 beta that turns a Fable 5 / Opus 5 refusal into a normal answer inside one API call — plus the credit token that stops you from paying the prompt cache twice on the retry.
错误、速率限制与可靠性
错误对照表、带退避的重试、速率限制层级,以及模型迁移。
记忆与上下文编辑
为智能体提供持久化记忆和自动修剪的上下文 —— 客户端实现的 memory tool,配合在长时间运行中清除陈旧工具结果的上下文编辑。
Programmatic Tool Calling
Let Claude call your tools from Python inside the code-execution sandbox — cutting round-trips and keeping intermediate results out of context.
The Admin API: automate your Claude org
The operator's guide to Anthropic's Admin API — list members, invite users, run RBAC groups, offboard cleanly. Console + Claude Enterprise, with the seat-pool and SSO gotchas that trip real teams.
Inference Hooks: inline DLP for Claude Enterprise
The operator's guide to Claude Enterprise Inference Hooks — the HTTPS webhook that lets your DLP server allow or deny every prompt across chat, Claude Code, and Cowork, before the model sees it. Full spec, verdict schema, signing, rollout playbook.