agentic-system-design
Guides architecture for AI agent systems — tool use, memory, RAG, orchestration, guardrails, evals, and cost/latency trade-offs. Use when building Cursor automations, LLM features, multi-step agents, MCP integrations, or SDK-based agent pipelines.
- License 许可
- MIT
- 最近更新
- 2026-09-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- agentic-system-design
- description
- Guides architecture for AI agent systems — tool use, memory, RAG, orchestration, guardrails, evals, and cost/latency trade-offs. Use when building Cursor automations, LLM features, multi-step agents, MCP integrations, or SDK-based agent pipelines.
02 资源文件 1
- 参考文档references/patterns.md1.4 KB
03 SKILL.md 正文
Agentic System Design
Apply when designing features where an LLM plans, calls tools, or runs multi-step workflows.
Decision checklist
- Autonomy level — single call vs chained vs autonomous loop
- Tool surface — strict schemas, idempotency, human checkpoints
- Context — what goes in prompt vs retrieved vs persisted memory
- Model tier — small/fast vs large/capable per step
- Failure — retries, fallbacks, "I don't know" vs hallucination
- Safety — irreversible actions, PII, injection resistance
- Quality — eval dataset, regression gates, cost caps
Reference architecture
User / trigger
→ Orchestrator (workflow state, step limit)
→ Policy / guardrails (rules, hooks, allowlists)
→ Context builder (RAG, memory, tool results)
→ Model call (bounded tokens, structured output)
→ Tool executor (timeout, audit log, idempotent tools)
→ Response / artifact
Layer responsibilities
| Layer | Owns |
|---|---|
| Orchestrator | Step budget, branching, human-in-the-loop gates |
| Tools | Narrow contracts; no business logic in tool definitions |
| Memory | Session vs persistent; namespace by user/tenant |
| RAG | Chunking, retrieval threshold, citations |
| Evals | Golden tasks, adversarial prompts, cost/latency metrics |
Trade-offs to surface
| Decision | Options | Default |
|---|---|---|
| Autonomy | Human-in-loop vs full auto | Human-in-loop for irreversible/money/shared state |
| Chaining | Single prompt vs multi-step | Multi-step when phases have different model needs |
| Memory | In-context only vs external store | External for long sessions; summarize into context |
| RAG vs fine-tune | Dynamic knowledge vs baked-in style | RAG for facts; fine-tune rarely for format/tone only |
| Runtime | API-hosted vs self-hosted | API for most products until cost/privacy forces self-host |
MCP: Agent Patterns Catalog (use when connected)
This config includes .cursor/mcp.json → Agent Patterns Catalog (https://mcp.agentpatternscatalog.org/mcp).
Before finalizing agent architecture, query MCP when available:
| Goal | Tool |
|---|---|
| Pick a structure | recommend_recipe |
| Lookup patterns | find_pattern |
| Debug misbehavior | pattern_for_symptom |
| Shared vocabulary | glossary_term |
Cite catalog pattern ids in design docs and ADRs. See docs/MCP_SETUP.md.
Example: "Recommend a recipe for a code-review agent, expand patterns, list anti-patterns."
Guardrails (required)
- Hard max steps per agent loop
- Explicit schemas for every tool input/output
- No unbounded generation tokens
- Log: model, tokens, latency, tool calls, outcome
- Checkpoint before: delete, pay, send email, deploy
- Treat user content as untrusted (prompt injection)
Anti-patterns to reject
- Unbounded agent loops
- Tools that can run shell without approval
- Sending PII to external models without policy
- No eval suite before shipping
- Business logic duplicated inside prompts instead of code
- Silent tool failure / fabricated tool results
Output when architecting
Produce Agentic System Design Note:
- Autonomy diagram (human vs agent steps)
- Tool list with contracts and idempotency
- Context/memory/RAG strategy
- Model selection per step
- Eval plan (≥20 cases: happy, edge, adversarial)
- Cost and latency budgets
Additional reference
04 同仓库更多 Skills
greet
A greeting skill for testing
valid-skill
A valid skill for testing purposes.
unknown-field
A skill with an unknown frontmatter field.
no-frontmatter
暂无简介
child-skill
A nested skill in a subdirectory.
different-name
A skill with a name that doesn't match the directory.