Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
775 changes: 415 additions & 360 deletions content/.metadata.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions content/en/about-claude/pricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ When used without these tools, code execution is billed by execution time, track

Code execution usage is tracked in the response:

```text wrap
```json
{
"usage": {
"input_tokens": 105,
Expand Down Expand Up @@ -329,7 +329,7 @@ See [tool use pricing](https://platform.claude.com/docs/en/about-claude/pricing#

Web search usage is charged in addition to token usage:

```text wrap
```json
{
"usage": {
"input_tokens": 105,
Expand All @@ -351,7 +351,7 @@ Each web search counts as one use, regardless of the number of results returned.

Web fetch usage has **no additional charges** beyond standard token costs:

```text wrap
```json
{
"usage": {
"input_tokens": 25039,
Expand Down
6 changes: 5 additions & 1 deletion content/en/about-claude/use-case-guides/commerce-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ url: https://platform.claude.com/docs/en/about-claude/use-case-guides/commerce-a
description: Build a shopping agent and a merchant agent on Claude using Claude for commerce, an open-source blueprint with working implementations on the Messages API, the Claude Agent SDK, and Claude Managed Agents.
---

This guide shows how to build commerce agents on Claude: a shopping agent that customers use inside your app, and a merchant agent for the people running the store, whether that is the business's own operations staff or the sellers on its platform. It does that through Claude for commerce, an open-source blueprint with a working implementation of each agent on the [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages), the [Claude Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview), and [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview), runnable examples for retail, travel, telecom, and entertainment, and a Claude Code plugin that scaffolds the same design against your own systems.
This guide shows how to build commerce agents on Claude: a shopping agent that customers use inside your app, and a merchant agent for the people running the store, whether that is the business's own operations staff or the sellers on its platform. It does that through Claude for commerce, an open-source blueprint that includes the following:

* A working implementation of each agent on the [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages), the [Claude Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview), and [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview)
* Runnable examples for retail, travel, telecom, and entertainment
* A Claude Code plugin that scaffolds the same design against your own systems

The code, setup instructions, and safety documentation are in the [Claude for commerce repository on GitHub](https://github.com/anthropics/commerce-agents). For how the agents are built and why, including the single-agent-with-skills design, UI components as tools, harness-enforced safety, prompt caching, memory, and evals, read the engineering post [A guide to the anatomy of effective commerce agents](https://claude.com/blog/the-anatomy-of-effective-commerce-agents).

Expand Down
16 changes: 8 additions & 8 deletions content/en/about-claude/use-case-guides/ticket-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ To assess this, first modify the script so that it compares the predicted intent
DEFAULT_MODEL = "claude-haiku-5-5"


def classify_support_request(request, actual_intent):
def classify_support_request(ticket_contents, actual_intent):
# Define the prompt for the classification task
classification_prompt = f"""You will be acting as a customer support ticket classification system.
[…]
Expand Down Expand Up @@ -1101,7 +1101,7 @@ To assess this, first modify the script so that it compares the predicted intent
const DEFAULT_MODEL = "claude-haiku-5-5";

async function classifySupportRequest(
request: string,
ticketContents: string,
actualIntent: string
): Promise<{ reasoning: string; intent: string; correct: boolean; usage: Anthropic.Usage }> {
// Define the prompt for the classification task
Expand Down Expand Up @@ -1147,7 +1147,7 @@ To assess this, first modify the script so that it compares the predicted intent
// Set the default model
const Model DefaultModel = Model.ClaudeHaiku5_5;

async Task<(string Reasoning, string Intent, bool Correct, Usage Usage)> ClassifySupportRequest(string request, string actualIntent)
async Task<(string Reasoning, string Intent, bool Correct, Usage Usage)> ClassifySupportRequest(string ticketContents, string actualIntent)
{
// Define the prompt for the classification task
var classificationPrompt = """
Expand Down Expand Up @@ -1205,7 +1205,7 @@ To assess this, first modify the script so that it compares the predicted intent
// Set the default model
const defaultModel = anthropic.ModelClaudeHaiku5_5

func classifySupportRequest(ctx context.Context, request, actualIntent string) (reasoning, intent string, correct bool, usage anthropic.Usage, err error) {
func classifySupportRequest(ctx context.Context, ticketContents, actualIntent string) (reasoning, intent string, correct bool, usage anthropic.Usage, err error) {
// Define the prompt for the classification task
classificationPrompt := `You will be acting as a customer support ticket classification system.
[…]
Expand Down Expand Up @@ -1264,7 +1264,7 @@ To assess this, first modify the script so that it compares the predicted intent

record Classification(String reasoning, String intent, boolean correct, Usage usage) {}

Classification classifySupportRequest(String request, String actualIntent) {
Classification classifySupportRequest(String ticketContents, String actualIntent) {
// Define the prompt for the classification task
String classificationPrompt = """
You will be acting as a customer support ticket classification system.
Expand Down Expand Up @@ -1316,7 +1316,7 @@ To assess this, first modify the script so that it compares the predicted intent
/**
* @return array{string, string, bool, Usage} the reasoning, the intent, whether the intent is correct, and the usage
*/
function classifySupportRequest(Client $client, string $request, string $actualIntent): array
function classifySupportRequest(Client $client, string $ticketContents, string $actualIntent): array
{
// Define the prompt for the classification task
$classificationPrompt = <<<PROMPT
Expand Down Expand Up @@ -1366,7 +1366,7 @@ To assess this, first modify the script so that it compares the predicted intent
# Set the default model
DEFAULT_MODEL = Anthropic::Model::CLAUDE_HAIKU_5_5

def classify_support_request(client, request, actual_intent)
def classify_support_request(client, ticket_contents, actual_intent)
# Define the prompt for the classification task
classification_prompt = <<~PROMPT
You will be acting as a customer support ticket classification system.
Expand Down Expand Up @@ -1411,7 +1411,7 @@ A proper evaluation requires clear thresholds and benchmarks to determine what i
* **Accuracy:** 95% (out of 100 tests)
* **Cost per classification:** 50% reduction on average (across 100 tests) from current routing method

Having these thresholds allows you to tell at scale, and with impartial empiricism, what method is best for you and what changes might need to be made to better fit your requirements.
Having these thresholds allows you to tell at scale, and with impartial empiricism, what method is best for you and what changes you might need to make to better fit your requirements.

***

Expand Down
2 changes: 1 addition & 1 deletion content/en/agents-and-tools/agent-skills/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ def process_file(path):
return open(path).read()
```

Configuration parameters should also be justified and documented to avoid "voodoo constants" (Ousterhout's law). If you don't know the right value, how will Claude determine it?
Also justify and document configuration parameters to avoid "voodoo constants" (Ousterhout's law). If you don't know the right value, how will Claude determine it?

**Good example: Self-documenting:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Let Claude Code set up your agent for you
/claude-api managed-agents-onboard
```

The skill runs an interview that walks you through the Managed Agents mental model (Agent configs versus Sessions), templates an agent config, configures environments and tools, sets up the session loop, and emits runnable code for your language. The skill also covers the mandatory **Agent (once) → Session (every run)** flow: `model`, `system`, and `tools` live on the agent, never on the session, and agents should be created once and referenced by ID.
The skill runs an interview that walks you through the Managed Agents mental model (Agent configs versus Sessions), templates an agent config, configures environments and tools, sets up the session loop, and emits runnable code for your language. The skill also covers the mandatory **Agent (once) → Session (every run)** flow: `model`, `system`, and `tools` live on the agent, never on the session, and you create each agent once and reference it by ID.

Managed Agents requires the `managed-agents-2026-04-01` beta header, which the SDK sets automatically for all `client.beta.agents.*`, `client.beta.environments.*`, `client.beta.sessions.*`, and `client.beta.vaults.*` calls.

Expand Down
14 changes: 13 additions & 1 deletion content/en/agents-and-tools/agent-skills/enterprise.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,19 @@ Before deploying any Skill from a third party or internal contributor, complete

### Skill content scanning

Claude Enterprise organizations can turn on automated security scanning for custom Skills in claude.ai and Claude Cowork. After you turn on **Skill and plugin security scanning** at [claude.ai > Organization settings > Skills](https://claude.ai/admin-settings/skills), Skills that members then upload or edit in claude.ai or Cowork are scanned for signs of malicious behavior, such as hidden code execution, sending your data to an outside service, or instructions that tamper with Claude's safeguards. A Skill that fails the scan, or whose scan hasn't completed, is blocked from use. An administrator can allow some Skills that failed the scan. A Skill that passes with a warning stays usable behind a caution notice. If scanning is available to your organization, turn it on. It complements, but doesn't replace, the [review checklist](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/enterprise#review-checklist).
Claude Enterprise organizations can turn on automated security scanning for custom Skills in claude.ai and Claude Cowork. The setting is **Skill and plugin security scanning** at [claude.ai > Organization settings > Skills](https://claude.ai/admin-settings/skills).

After you turn on the setting, scanning applies to Skills that members then upload or edit in claude.ai or Cowork. Each scan checks for signs of malicious behavior. These signs include hidden code execution, transfer of your data to an outside service, and instructions that tamper with Claude's safeguards.

Whether a Skill is usable depends on its scan:

* A Skill that fails the scan is blocked from use.
* A Skill whose scan hasn't completed is blocked from use.
* A Skill that passes with a warning stays usable behind a caution notice.

Organization owners can allow some Skills that failed the scan. So can members whose [custom role](https://platform.claude.com/docs/en/manage-claude/user-management#custom-roles) can manage **Libraries**.

If scanning is available to your organization, turn it on. Scanning complements, but doesn't replace, the [review checklist](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/enterprise#review-checklist).

Scanning doesn't cover the Claude API. Skills you upload through the Skills API (`/v1/skills`), including from the Claude Console, aren't scanned, so for API deployments, rely on the review checklist and [version pinning](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/enterprise#versioning-strategy). Scanning also doesn't apply to Skills that were already in your organization when you turned it on, or to organizations with certain data handling configurations, such as customer-managed encryption keys (CMEK), zero data retention (ZDR), or HIPAA readiness. For setup steps, exclusions, and result types, see [Get started with skill and plugin scanning](https://support.claude.com/en/articles/15927065-get-started-with-skill-and-plugin-scanning) in the Claude Help Center.

Expand Down
6 changes: 3 additions & 3 deletions content/en/agents-and-tools/mcp-connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ When Claude uses MCP tools, the response includes two new content block types:
### MCP tool use block
```text wrap
```json
{
"type": "mcp_tool_use",
"id": "mcptoolu_014Q35RayjACSWkSj4X2yov1",
Expand All @@ -510,7 +510,7 @@ When Claude uses MCP tools, the response includes two new content block types:
### MCP tool result block
```text wrap
```json
{
"type": "mcp_tool_result",
"tool_use_id": "mcptoolu_014Q35RayjACSWkSj4X2yov1",
Expand All @@ -530,7 +530,7 @@ An MCP server can change its tools at any time. The `mcp-client-2026-09-15` beta
When the API asks an MCP server for its tools while producing a response, the response starts with an `mcp_tool_listing` block for that server, one block for each server it asked:
```text wrap
```json
{
"type": "mcp_tool_listing",
"mcp_server_name": "example-mcp",
Expand Down
2 changes: 1 addition & 1 deletion content/en/agents-and-tools/mcp-tunnels/deploy-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ This guide provides one reference approach using Docker Compose. You are respons
</Tab>
</Tabs>

The compose file reads `TUNNEL_TOKEN` from the host environment with no default, so the export must be repeated in every fresh shell and after a reboot.
The compose file reads `TUNNEL_TOKEN` from the host environment with no default, so you must repeat the export in every fresh shell and after a reboot.

For a multi-VM deployment, copy the `mcp-tunnel/` directory to each host, set `TUNNEL_TOKEN`, and run `docker compose up -d`. In the programmatic flow `TUNNEL_TOKEN` is `$(sudo cat data/tunnel-token)`; in the manual flow it's the value you copied from the Console. The same tunnel token and certificates work across all replicas.

Expand Down
12 changes: 6 additions & 6 deletions content/en/agents-and-tools/tool-use/advisor-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ The advisor tool also accepts the generic properties available on any tool defin

When the advisor is called, a `server_tool_use` block is followed by an `advisor_tool_result` block in the assistant's content. The following example shows the plaintext `advisor_result` variant returned by a Claude Opus 4.8 advisor. The [Quick start](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#quick-start) uses Claude Opus 5.5, which returns the encrypted `advisor_redacted_result` variant instead; see [Result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants) for both shapes side by side.

```text
```json
{
"role": "assistant",
"content": [
Expand Down Expand Up @@ -349,7 +349,7 @@ Here is the same request sent twice, identical except for the advisor `model` in

With `"model": "claude-opus-4-8"`, the advice is plaintext:

```text
```json
{
"type": "advisor_tool_result",
"tool_use_id": "srvtoolu_abc123",
Expand All @@ -362,7 +362,7 @@ With `"model": "claude-opus-4-8"`, the advice is plaintext:

With `"model": "claude-opus-5-5"`, the advice is encrypted:

```text
```json
{
"type": "advisor_tool_result",
"tool_use_id": "srvtoolu_abc123",
Expand All @@ -383,7 +383,7 @@ In both cases, round-trip the content verbatim on subsequent turns. If you switc

If the advisor call fails, the result carries an error:

```text wrap
```json
{
"type": "advisor_tool_result",
"tool_use_id": "srvtoolu_abc123",
Expand Down Expand Up @@ -1250,7 +1250,7 @@ A `message_delta` event follows with the updated `usage.iterations` array reflec

Advisor calls run as a separate sub-inference billed at the advisor model's rates. Usage is reported in the `usage.iterations[]` array:

```text wrap
```json
{
"usage": {
"input_tokens": 1760,
Expand Down Expand Up @@ -1777,7 +1777,7 @@ Hard reasoning tasks elicit substantially longer advisor output than the [typica

When the advisor does hit the cap, the result block carries `stop_reason: "max_tokens"` on both [result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants), whichever advisor model you use. Use `stop_reason` to detect truncated advice and decide whether to raise the cap or let the executor proceed with partial guidance. The API also appends `[Advisor output truncated at max_tokens=2048.]` (naming your cap) to the advice text, so the executor receives the truncation notice in its own context; with a plaintext `advisor_result` advisor that marker is visible to your client as well. Both signals appear only when you set `max_tokens` on the tool definition.

```text
```json
{
"type": "advisor_tool_result",
"tool_use_id": "srvtoolu_abc123",
Expand Down
2 changes: 1 addition & 1 deletion content/en/agents-and-tools/tool-use/bash-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ The current version of the tool is `bash_20250124`. For model support, beta head

Claude responds with `stop_reason: "tool_use"` and a `tool_use` block that contains the command for your application to run:

```text Output wrap
```json Output
{
"id": "msg_01XAbCDeFgHiJkLmNoPQrStU",
"model": "claude-opus-5-5",
Expand Down
Loading
Loading