| name | clade-architecture-variants |
| description | Build different types of Claude-powered applications — chatbots, RAG systems,
Use when working with architecture-variants patterns.
agents, content pipelines, and code generation tools.
Trigger with "claude architecture", "anthropic rag", "build with claude",
"claude agent pattern", "anthropic app design".
|
| allowed-tools | Read, Write, Edit |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","anthropic","claude","architecture","rag","agents"] |
| compatibility | Designed for Claude Code |
Claude Architecture Variants
Overview
Five architecture patterns for Claude-powered applications: Chatbot (stateless API wrapper), RAG (retrieval-augmented generation with vector search), Agent (tool use loop), Content Pipeline (batch processing), and Evaluation (using Claude as a judge). Each includes complete code and a comparison table.
1. Chatbot (Stateless API Wrapper)
Simplest pattern — proxy Claude with a system prompt.
export async function POST(req: Request) {
const { messages } = await req.json();
const response = await client.messages.create({
model: 'claude-sonnet-4-20250514',
max_tokens: 2048,
system: 'You are a helpful assistant for our SaaS product.',
messages,
stream: true,
});
return new Response(response.toReadableStream());
}
Best for: Customer support, Q&A, simple conversational interfaces.
2. RAG (Retrieval-Augmented Generation)
Fetch relevant context, inject into prompt, generate grounded answer.
async function ragQuery(question: string) {
const embedding = await embeddingClient.embed(question);
chunks = vectorDb.(embedding, { : });
message = client..({
: ,
: ,
: ,
: [{
: ,
: ,
}],
});
message.[].;
}