anth-reference-architecture

Featured

Implement Claude API reference architectures for common use cases. Use when designing a Claude-powered application, choosing between direct API vs queue-based, or planning a multi-model architecture. Trigger with phrases like "anthropic architecture", "claude system design", "anthropic reference architecture", "design claude integration".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Anthropic Reference Architecture ## Overview Three validated architecture patterns for Claude API integrations: synchronous API gateway, async queue-based processing, and multi-model routing. ## Architecture 1: Sync API Gateway (Simple) ``` User → API Gateway → Claude Service → Messages API ↓ Response → User ``` ```python # Best for: chatbots, interactive tools, low-volume (<100 RPM) from fastapi import FastAPI import anthropic app = FastAPI() client = anthropic.Anthropic(max_retries=3, timeout=60.0) @app.post("/chat") async def chat(prompt: str): msg = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{"role": "user", "content": prompt}] ) return {"text": msg.content[0].text, "tokens": msg.usage.output_tokens} ``` ## Architecture 2: Async Queue-Based (Scalable) ``` User → API → Queue (Redis/SQS) → Worker Pool → Messages API ↑ ↓ └──────────── Status/Result ←── Result Store ←───┘ ``` ```python # Best for: batch processing, high-volume, background tasks from redis import Redis from rq import Queue import anthropic redis = Redis() task_queue = Queue("claude-tasks", connection=redis) result_store = Redis(db=1) def process_task(task_id: str, prompt: str, model: str): client = anthropic.Anthropic() msg = client.messages.create( model=model, max_tokens=10...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category