xiaohongshu
xiaohongshu
ai-agents
Production-grade AI agent patterns with MCP integration, agentic RAG, handoff orchestration, multi-layer guardrails, observability, token economics, ROI frameworks, and build-vs-not decision guidance (modern best practices)
Full skill instructions
Modern Best Practices (January 2026): deterministic control flow, bounded tools, auditable state, MCP-based tool integration, handoff-first orchestration, multi-layer guardrails, OpenTelemetry tracing, and human-in-the-loop controls (OWASP LLM Top 10: https://owasp.org/www-project-top-10-for-large-language-model-applications/).
This skill provides production-ready operational patterns for designing, building, evaluating, and deploying AI agents. It centralizes procedures, checklists, decision rules, and templates used across RAG agents, tool-using agents, OS agents, and multi-agent systems.
No theory. No narrative. Only operational steps and templates.
Codex should activate this skill whenever the user asks for:
/references/ or /assets/.assets/core/agent-template-standard.md (or assets/core/agent-template-quick.md).assets/tools/tool-definition.md and references/api-contracts-for-agents.md.assets/rag/rag-basic.md and scale via assets/rag/rag-advanced.md + references/rag-patterns.md.references/evaluation-and-observability.md.assets/checklists/agent-safety-checklist.md.references/deployment-ci-cd-and-safety.md.| Agent Type | Core Control Flow | Interfaces | MCP/A2A | When to Use |
|---|---|---|---|---|
| Workflow Agent (FSM/DAG) | Explicit state transitions | State store, tool allowlist | MCP | Deterministic, auditable flows |
| Tool-Using Agent | Route → call tool → observe | Tool schemas, retries/timeouts | MCP | External actions (APIs, DB, files) |
| RAG Agent | Retrieve → answer → cite | Retriever, citations, ACLs | MCP | Knowledge-grounded responses |
| Planner/Executor | Plan → execute steps with caps | Planner prompts, step budget | MCP (+A2A) | Multi-step problems with bounded autonomy |
| Multi-Agent (Orchestrated) | Delegate → merge → validate | Handoff contracts, eval gates | A2A | Specialization with explicit handoffs |
| OS Agent | Observe UI → act → verify | Sandbox, UI grounding | MCP | Desktop/browser control under strict guardrails |
| Code/SWE Agent | Branch → edit → test → PR | Repo access, CI gates | MCP | Coding tasks with review/merge controls |
| Framework | Architecture | Best For | Ease |
|---|---|---|---|
| LangGraph | Graph-based, stateful | Enterprise, compliance, auditability | Medium |
| OpenAI Agents SDK | Tool-centric, lightweight | Fast prototyping, OpenAI ecosystem | Easy |
| Google ADK | Code-first, multi-language | Gemini/Vertex AI, polyglot teams | Medium |
| Pydantic AI | Type-safe, graph FSM | Production Python, type safety | Medium |
| CrewAI | Role-based crews | Team workflows, content generation | Easiest |
| AutoGen | Conversational | Code generation, research | Medium |
| AWS Bedrock Agents | Managed infrastructure | Enterprise AWS, knowledge bases | Easy |
See references/modern-best-practices.md for detailed framework comparison and selection guide.
What does the agent need to do?
├─ Answer questions from knowledge base?
│ ├─ Simple lookup? → RAG Agent (LangChain/LlamaIndex + vector DB)
│ └─ Complex multi-step? → Agentic RAG (iterative retrieval + reasoning)
│
├─ Perform external actions (APIs, tools, functions)?
│ ├─ 1-3 tools, linear flow? → Tool-Using Agent (LangGraph + MCP)
│ └─ Complex workflows, branching? → Planning Agent (ReAct/Plan-Execute)
│
├─ Write/modify code autonomously?
│ ├─ Single file edits? → Tool-Using Agent with code tools
│ └─ Multi-file, issue resolution? → Code/SWE Agent (HyperAgent pattern)
│
├─ Delegate tasks to specialists?
│ ├─ Fixed workflow? → Multi-Agent Sequential (A → B → C)
│ ├─ Manager-Worker? → Multi-Agent Hierarchical (Manager + Workers)
│ └─ Dynamic routing? → Multi-Agent Group Chat (collaborative)
│
├─ Control desktop/browser?
│ └─ OS Agent (Anthropic Computer Use + MCP for system access)
│
└─ Hybrid (combination of above)?
└─ Planning Agent that coordinates:
- Tool-using for actions (MCP)
- RAG for knowledge (MCP)
- Multi-agent for delegation (A2A)
- Code agents for implementation
Protocol Selection:
Do
Avoid
references/build-vs-not-decision.md
references/agent-economics.md
references/agent-maturity-governance.md
references/modern-best-practices.md
references/context-engineering.md
references/operational-patterns.md
MCP Practical Guide - references/mcp-practical-guide.md
Building MCP servers, tool integration, and standardized data access
MCP Server Builder - references/mcp-server-builder.md
End-to-end checklist for workflow-focused MCP servers (design → build → test)
A2A Handoff Patterns - references/a2a-handoff-patterns.md
Agent-to-agent communication, task delegation, and coordination protocols
Protocol Decision Tree - references/protocol-decision-tree.md
When to use MCP vs A2A, decision framework, and selection criteria
Agent Operations - references/agent-operations-best-practices.md
Action loops, planning, observation, and execution patterns
RAG Patterns - references/rag-patterns.md
Contextual retrieval, agentic RAG, and hybrid search strategies
Memory Systems - references/memory-systems.md
Session, long-term, episodic, and task memory architectures
Tool Design & Validation - references/tool-design-specs.md
Tool schemas, validation, error handling, and MCP integration
Skill Lifecycle - references/skill-lifecycle.md
Scaffold, validate, package, and share skills with teams (Slack-ready)
API Contracts for Agents - references/api-contracts-for-agents.md
Request/response envelopes, safety gates, streaming/async patterns, error taxonomy
Multi-Agent Patterns - references/multi-agent-patterns.md
Manager-worker, sequential, handoff, and group chat orchestration
OS Agent Capabilities - references/os-agent-capabilities.md
Desktop automation, UI grounding, and computer use patterns
Code/SWE Agents - references/code-swe-agents.md
SE 3.0 paradigm, autonomous coding patterns, SWE-Bench, HyperAgent architecture
Evaluation & Observability - references/evaluation-and-observability.md
OpenTelemetry GenAI, metrics, LLM-as-judge, and monitoring
Deployment, CI/CD & Safety - references/deployment-ci-cd-and-safety.md
Multi-layer guardrails, HITL controls, NIST AI RMF, production checklists
assets/checklists/agent-safety-checklist.md
Go/No-Go safety gate: permissions, HITL triggers, eval gates, observability, rollbackStandard Agent Template - assets/core/agent-template-standard.md
Full production spec: memory, tools, RAG, evaluation, observability, safety
Specialized Agent Template - assets/core/agent-template-specialized.md
Domain-specific agents with custom capabilities and constraints
Quick Agent Template - assets/core/agent-template-quick.md
Minimal viable agent for rapid prototyping
Basic RAG - assets/rag/rag-basic.md
Simple retrieval-augmented generation pipeline
Advanced RAG - assets/rag/rag-advanced.md
Contextual retrieval, reranking, and agentic RAG patterns
Hybrid Retrieval - assets/rag/hybrid-retrieval.md
Semantic + keyword search with BM25 fusion
Tool Definition - assets/tools/tool-definition.md
MCP-compatible tool schemas with validation and error handling
Tool Validation Checklist - assets/tools/tool-validation-checklist.md
Testing, security, and production readiness checks
Manager-Worker Template - assets/multi-agent/manager-worker-template.md
Orchestration pattern with task delegation and result aggregation
Evaluator-Router Template - assets/multi-agent/evaluator-router-template.md
Dynamic routing with quality assessment and domain classification
../dev-api-design/assets/fastapi/fastapi-complete-api.md
Auth, pagination, validation, error handling; extend with model lifespan loads, SSE, background tasksdata/sources.json
Authoritative sources spanning standards, protocols, and production agent frameworksCC-*) for citationIMPORTANT: When users ask recommendation questions about AI agents, you MUST use WebSearch to check current trends before answering.
If WebSearch is unavailable, use data/sources.json + any available web browsing tools, and explicitly state what you verified vs assumed.
"AI agent frameworks best practices 2026""[LangGraph/CrewAI/AutoGen/Semantic Kernel] comparison 2026""AI agent trends January 2026""MCP servers available 2026"After searching, provide:
This skill integrates with complementary skills:
../ai-llm/ - LLM patterns, prompt engineering, and model selection for agents../ai-rag/ - Deep RAG implementation: chunking, embedding, reranking../ai-prompt-engineering/ - System prompt design, few-shot patterns, reasoning strategies../qa-observability/ - OpenTelemetry, metrics, distributed tracing../software-security-appsec/ - OWASP Top 10, input validation, secure tool design../ops-devops-platform/ - CI/CD pipelines, deployment strategies, infrastructure../dev-api-design/ - REST/GraphQL design for agent APIs and tool interfaces../ai-mlops/ - Model deployment, monitoring, drift detection../qa-debugging/ - Agent debugging, error analysis, root cause investigationUsage pattern: Start here for agent architecture, then reference specialized skills for deep implementation details.
data/sources.json for authoritative documentation linksTraditional → Modern:
assets/agent-template-ainative-sdlc.md for the Delegate → Review → Own runbook (guardrails + outputs checklist).xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience