5.1 What Is an Accelerator?
An accelerator is a packaged, reusable Claude integration pattern that another developer can adopt without starting from scratch. It is not a one-off script — it is a shareable artifact with documentation, clear inputs/outputs, and a demonstrated use case.
Three standard accelerator formats:
| Format | Contents | When to use |
|---|---|---|
| Agent template | System prompt, tool definitions, example flows, README | When the pattern is a specific agent behaviour (support bot, code reviewer, doc generator) |
| MCP server package | npm/pip package exposing domain-specific tools via MCP | When the tools are reusable across projects and clients |
| Eval suite | Test cases, grading logic, benchmark scripts | When the pattern needs to be validated before adoption |
A high-quality accelerator includes at least: a working example, the system prompt(s), the tool definitions, a README explaining the use case and constraints, and an eval suite validating the key behaviours.
5.2 Contributing to the Anthropic Cookbook
The Anthropic Cookbook is a public repository of Claude integration patterns. Contributing makes your accelerator discoverable by the entire Claude developer community.
What makes a high-quality Cookbook entry:
- Working code. The example must execute correctly. Include a
requirements.txtorpackage.jsonand instructions for running it. - Real use case. The example should demonstrate a genuine problem being solved, not a toy scenario. Real constraints (error handling, token limits, streaming) make the example useful.
- Clear explanation of choices. Why this model? Why this prompting technique? Why this tool structure? The explanation is what turns an example into a learning resource.
- Eval included. A set of test cases that validate the key behaviour. This lets adopters confirm the pattern works in their environment.
Rights and attribution. Code contributed to the Anthropic Cookbook is typically licensed under MIT. Make sure any dependencies you use are compatible. Keep API keys out of the committed code — use environment variables and document the required keys in the README.
Channel matching. Before contributing, check whether the pattern already exists in the Cookbook. A duplicate entry fragments the community's attention. If a similar pattern exists but yours covers a specific gap (different model, different language, different use case), make that difference explicit in the title and README.
5.3 Requirements Capture
Building a production Claude integration requires gathering two categories of requirements before writing any code.
Functional requirements: What the system must do.
- What is the user's task? What does success look like?
- What are the inputs (format, size, source)?
- What are the outputs (format, destination)?
- What tools does the agent need access to?
- What human escalation conditions exist?
Infrastructure requirements: What constraints the system must satisfy.
- Latency: What is the acceptable time-to-first-token? End-to-end response time?
- Cost: What is the per-request or per-month budget?
- Data residency: Can data leave a specific region? GDPR/HIPAA constraints?
- Compliance: Are there audit log requirements? Data retention limits?
- Scale: How many concurrent requests? Peak volume?
A scoping call that confirms Claude can do the task (capability) is not the same as a feasibility assessment (verdict). A verdict requires volume, latency, and input-size constraints gathered from infrastructure requirements. Conflating capability with feasibility is a common pre-sales trap.
Systems lifecycle phases. A Claude integration moves through seven phases:
- Discovery — problem identification and feasibility
- Design — architecture, tool definitions, eval criteria
- Development — prompt engineering, integration coding
- Evaluation — golden-set testing, calibration
- Staging — full integration test in production-like environment
- Production — phased rollout, monitoring
- Iteration — ongoing eval runs, prompt updates, model upgrades
5.4 Deployment Platform Comparison
Claude is available on four platforms. The right choice depends on your compliance, residency, and integration requirements.
| Platform | Data residency | Best for | Notes |
|---|---|---|---|
| Anthropic API (direct) | Anthropic-managed (US) | Fastest access to new models and features | Simplest setup; ZDR available by agreement |
| Amazon Bedrock | AWS region of your choice | AWS-native teams; existing AWS compliance posture | Claude models via Bedrock API; AWS IAM auth |
| Google Cloud Vertex AI | GCP region of your choice | GCP-native teams; EU residency requirement | Vertex AI API; Google Cloud IAM auth |
| Azure AI Foundry | Azure region of your choice | Microsoft/Azure shops; enterprise agreements | Azure OpenAI-compatible endpoint; Azure AD auth |
EU data residency: Use Bedrock (eu-west or eu-central) or Vertex AI (europe-west) regions. The direct Anthropic API processes data in Anthropic's infrastructure, which is US-based.
AWS Bedrock deployment example:
import boto3
import json
bedrock = boto3.client(service_name="bedrock-runtime", region_name="eu-west-1")
body = json.dumps({
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Summarise this report."}]
})
response = bedrock.invoke_model(
modelId="anthropic.claude-sonnet-5-v1:0",
body=body
)
result = json.loads(response["body"].read())
print(result["content"][0]["text"])
Vertex AI deployment example:
import anthropic
client = anthropic.AnthropicVertex(
project_id="my-gcp-project",
region="europe-west4"
)
response = client.messages.create(
model="claude-sonnet-5@20251101", # Vertex uses @ for version
max_tokens=1024,
messages=[{"role": "user", "content": "Analyse this contract."}]
)
5.5 Model Versioning Strategy
The two ID types and when to use each:
| ID type | Example | Behaviour | Use when |
|---|---|---|---|
| Alias | claude-sonnet-5 |
Resolves to latest stable Sonnet 5 | Development; rapid iteration |
| Pinned | claude-sonnet-5-20251101 |
Resolves to a specific release; never changes | Production; after eval validation |
The release lifecycle. Anthropic releases new model versions. A "model alias" like claude-sonnet-5 always points to the current recommended release for that tier. When Anthropic releases a new version (e.g., 20260101), the alias updates. If you're using an alias in production, your production behaviour changes when the alias moves.
Production versioning rule:
- Develop and experiment with the alias (
claude-sonnet-5) - When ready to ship, run your full eval suite
- Check the specific version the alias currently resolves to
- Lock production to that pinned ID (
claude-sonnet-5-20251101) - When a new version is released, run your eval suite against the new pinned ID
- Only update production after the eval suite confirms the new version passes
"Every model swap is a release" — a model ID change requires the same scrutiny as any production code change. New model versions can improve average performance while introducing regressions on specific tasks.
Measuring model performance changes. Before updating a pinned model ID in production, compare:
- Eval pass rate on your golden set (new vs old version)
- Latency at P50, P90, P99 (new models are often faster, not always)
- Cost per request (token counts may change with new versions)
5.6 Latency, Cost, and Compliance Measurement
Key latency metrics:
| Metric | Definition | Why it matters |
|---|---|---|
| TTFT (Time to First Token) | Milliseconds from request to first output token | Perceived responsiveness in streaming UIs |
| TPOT (Time Per Output Token) | Milliseconds per subsequent token | Affects how quickly a long response completes |
| Total latency | TTFT + (TPOT × output_tokens) | End-to-end time for non-streaming use cases |
Cost measurement. Track costs per feature, not just aggregate. This lets you identify which prompts are expensive and optimise selectively:
# After each API call
cost = (
response.usage.input_tokens * INPUT_COST_PER_TOKEN +
response.usage.output_tokens * OUTPUT_COST_PER_TOKEN +
response.usage.cache_read_input_tokens * CACHE_READ_COST_PER_TOKEN
)
metrics.record("api_cost", cost, tags={"feature": "contract_review", "model": model})
Compliance audit logging. For regulated environments, log:
- Timestamp and request ID
- Model ID used (not alias — the resolved version)
- Input token count (not the content, if PHI)
- Output token count
- Tool calls made (names and latencies)
- User or session ID (for audit trails)
Do NOT log raw prompt content in systems that process PHI — log metadata only.
5.7 Trust Boundaries in Multi-Component Systems
A production Claude application typically involves multiple components: an orchestrator, one or more agents, MCP servers, databases, external APIs. Each component boundary is a trust boundary.
Trust boundary rules:
Each component authenticates independently. An agent should not pass its credentials to a subagent. Each component has its own credentials scoped to its responsibilities.
Outputs from other agents are untrusted. If Agent A receives output from Agent B, treat it as user-supplied data — validate it, don't execute arbitrary instructions from it.
MCP server results are untrusted. A tool result returned by an MCP server may contain attacker-controlled content if the tool fetched data from an external source. Apply prompt injection defences when injecting tool results into the model's context.
Least privilege per component. Scope each component's permissions to only what it needs:
Orchestrator → reads task queue, writes to result store (no DB access)
Customer-data agent → reads customer DB (no write, no cross-tenant queries)
Email agent → sends email via SMTP relay (no read access to customer data)
Threat model for multi-agent systems:
| Attack vector | Description | Mitigation |
|---|---|---|
| Prompt injection via tool result | External data contains embedded instructions | Sanitise tool results; XML-tag injection before context injection |
| Privilege escalation via agent chaining | Agent A manipulates Agent B into using higher-privilege tools | Enforce per-component permission boundaries; never share credentials |
| Data exfiltration via LLM | Malicious instructions in data cause Claude to output sensitive information | Output validation; hooks that scan for PII/PHI patterns before returning to client |
5.8 Comparing Platforms for Enterprise Decisions
When advising an enterprise on platform choice, evaluate on five dimensions:
| Dimension | Anthropic API | Amazon Bedrock | Vertex AI | Azure AI Foundry |
|---|---|---|---|---|
| Data residency | US (Anthropic-managed) | Any AWS region | Any GCP region | Any Azure region |
| Auth model | API key | AWS IAM roles | Google Cloud IAM | Azure Active Directory |
| Model freshness | Earliest access | Slight lag (weeks) | Slight lag (weeks) | Slight lag (weeks) |
| Compliance certs | SOC2, HIPAA (with BAA+ZDR) | AWS compliance portfolio | Google compliance portfolio | Azure compliance portfolio |
| Existing infra fit | Any | AWS-native teams | GCP-native teams | Microsoft-enterprise teams |
The compliance precondition rule. If one option has a confirmed compliance agreement already in place (e.g., an existing AWS BAA confirmed for the target region), that option wins before any other trade-off is considered. Negotiating a new compliance agreement takes weeks to months; using existing coverage is an immediate advantage.
M5 Checkpoint
- Three accelerator formats: agent template, MCP server package, eval suite
- Cookbook entry quality = working code + real use case + choice rationale + eval
- Capability ≠ feasibility — a verdict requires volume/latency/size constraints
- Four deployment platforms: Anthropic API, Bedrock, Vertex AI, Azure AI Foundry — choose based on residency and infra fit
- Alias in dev; pinned ID in prod — every model swap requires full eval re-run
- TTFT = time to first token — primary latency metric for streaming UIs
- Trust boundaries are per-component — each agent authenticates independently; outputs from other agents are untrusted
- Existing compliance coverage beats negotiating new — when in doubt, pick the platform where BAA/ZDR is already confirmed