agentic-ai-dev
Skill36 starsChanged 6 months agoMITView on GitHub
This skill provides patterns and templates for building production AI agents with Python 3.14, LangChain v1.2.8, LangGraph v1.0.7, and FastAPI 0.135.2. Use when creating AI agents, RAG systems, graph workflows, tools, memory systems, or agent tests.
- Reads credentials
In this repository157 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a2ui-angularSkill
- accessibility-auditSkill
- adk-deploy-guideSkill
- adk-dev-guideSkill
- adk-eval-guideSkill
- adk-observability-guideSkill
- agentic-ai-coding-standardSkill
- ai-auditSkill
- ai-chatSkill
- ai-decision-recordSkill
- ai-incident-responseSkill
- ai-launch-checkSkill
- ai-playbookSkill
- angular-best-practicesSkill
- angularSkill
- angular-spaSkill
- angular-ui-patternsSkill
- api-design-principlesSkill
- app-store-optimizationSkill
- architect-reviewSkill
- architecture-decision-recordsSkill
- architecture-designSkill
- asc-cli-usageSkill
- asc-crash-triageSkill
- asc-id-resolverSkill
- asc-release-flowSkill
- asc-signing-setupSkill
- asc-submission-healthSkill
- asc-testflight-orchestrationSkill
- browser-testingSkill
- changelog-generatorSkill
- claude-actions-auditorSkill
- clean-codeSkill
- codebase-onboardingSkill
- code-explainerSkill
- code-reviewerSkill
- code-simplifierSkill
- comment-analyzerSkill
- database-schema-designerSkill
- ddd-architectSkill
- decision-frameworksSkill
- dedup-code-agentSkill
- deployment-ci-cdSkill
- design-systemSkill
- dockerSkill
- documentation-generationSkill
- domain-finderSkill
- error-detectiveSkill
- eval-guideSkill
- feature-forgeSkill
- firebase-basicsSkill
- firebase-hosting-basicsSkill
- fixing-accessibilitySkill
- fixing-motion-performanceSkill
- flutter-animationsSkill
- flutter-genuiSkill
- flutter-mobileSkill
- flutter-security-expertSkill
- frontend-designSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 69
Before generating code, consult these sources for current syntax and APIs:
- Distinctive: line 121
LLM provider errors: Use retry with exponential backoff + fallback model chain.
- Very specific: line 125
Graph infinite loops: Always include iteration_count in state and check it in the routing function.
- Distinctive: line 129
After writing agentic AI code, dispatch these reviewer agents:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Iron Law
NO AGENT GRAPH WITHOUT AN ITERATION LIMIT AND A HUMAN-IN-THE-LOOP CHECKPOINT — unbounded loops and silent runaway agents are production incidents
Agentic AI Development Skill — Python 3.14 + LangChain + LangGraph + FastAPI
Quick Scaffold
uv init my-agent-service && cd my-agent-service
uv add "langchain-core>=1.2.8" "langchain-anthropic>=1.3.0" "langchain-openai>=1.1.0" "langgraph>=1.0.7" \
"fastapi>=0.135.2" "uvicorn[standard]" pydantic pydantic-settings \
langsmith prometheus-client structlog httpx asyncpg \
"langgraph-checkpoint-postgres>=3.0.0"
uv add --dev pytest pytest-asyncio httpx ruff mypyProcess
- Scaffold —
uv init+ install dependencies - Configure —
core/config.pywith pydantic-settings,.env, structured logging - Define State —
TypedDictwithAnnotated[list, add_messages]for each agent - Build Graph —
StateGraphwith typed nodes, conditional edges, checkpointing - Define Tools —
@toolwith docstrings, Pydantic input schemas, error handling - Add Memory — Checkpointing (PostgresSaver), semantic memory (vector store)
- Add Guardrails — Input validation, prompt injection detection, output validation
- Expose API — FastAPI routes for invoke/stream with
thread_idpropagation - Write Tests — Basic invoke, tool usage, iteration limit, error recovery, RAG quality
- Deploy — Docker multi-stage, gunicorn + uvicorn, health checks, Prometheus
Key Patterns
| Pattern | Implementation | Reference |
| Agent Graphs | StateGraph + typed nodes + conditional edges | agentic-templates-basic.md |
| Tools | @tool + docstring + Pydantic input + try/except | agentic-templates-tools.md |
| LLM Binding | Factory function per provider, .bind_tools() | agentic-llm-routing.md |
| Routing | Command(goto=...) pattern (LangGraph) | agentic-templates-advanced.md |
| Checkpointing | PostgresSaver (prod) / MemorySaver (test) | agentic-memory-systems.md |
| Streaming | astream() + stream_mode + FastAPI SSE | agentic-streaming-hitl.md |
| Human-in-the-Loop | interrupt_before + approval node | agentic-streaming-hitl.md |
| RAG | Embeddings → Vector Store → Retriever → Reranker | agentic-templates-rag.md |
| Guardrails | 12-layer pipeline: input → process → output | agentic-guardrails-security.md |
| Structured Output | .with_structured_output(PydanticModel) | agentic-prompt-engineering.md |
| Error Recovery | Retry node + fallback model + graceful degradation | agentic-templates-resilience.md |
| Config | pydantic-settings + fail-fast validators | agentic-config-project.md |
| Caching | 4-tier Q1→Q2→Q3→L3 with backfill; @cached_tool decorator | agentic-caching-patterns.md |
Conventions & Rules
For package layout, LangGraph rules, and FastAPI integration rules, read
reference/agentic-conventions.md
Documentation Sources
Before generating code, consult these sources for current syntax and APIs:
| Source | URL / Tool | Purpose |
| LangGraph | https://langchain-ai.github.io/langgraph/llms-full.txt | StateGraph, nodes, edges, checkpointing APIs |
| Pydantic v2 | https://docs.pydantic.dev/latest/llms-full.txt | Model validation, settings, Field constraints |
| FastAPI / LangChain | Context7 MCP | Latest LangChain tools, FastAPI patterns |
Reference Files
| File | Content | When to Use |
agentic-agent-variant-ladder.md | Capability tier pattern, deterministic shadow agents, NDJSON replay | Multi-agent architecture |
agentic-config-project.md | pyproject.toml, .env, config, Docker, ruff/mypy | Project setup |
agentic-templates-core.md | FastAPI app, main.py, routes, middleware, base state | Creating API layer |
agentic-templates-basic.md | ReAct Agent, Multi-Agent Collaborative patterns | Building basic agents |
agentic-templates-advanced.md | Hierarchical Supervisor, Command, Sub-Graph patterns | Building complex agents |
agentic-templates-resilience.md | Error Recovery Agent, key design decisions | Agent error handling |
agentic-templates-rag.md | 6 RAG architectures + document ingestion pipeline | Building RAG systems |
agentic-templates-tools.md | @tool patterns, MCP integration, retry/timeout | Defining agent tools |
agentic-guardrails-security.md | 12-layer security framework | Adding safety layers |
agentic-memory-systems.md | 7-layer memory hierarchy, practical implementations | Adding memory to agents |
agentic-streaming-hitl.md | Streaming + Human-in-the-Loop patterns | Real-time responses, approval flows |
agentic-llm-routing.md | Multi-provider routing, cost calculation, fallback chains | Multi-model setups |
agentic-observability.md | LangSmith, Prometheus, structured logging | Monitoring and debugging |
agentic-testing.md | Agent testing patterns, mocks, fixtures | Writing agent tests |
agentic-deployment.md | Docker, docker-compose, production config | Deploying agents |
agentic-debugging.md | Debugging playbook, common issues | Troubleshooting agents |
agentic-cost-optimization.md | Cost management, budget caps, prompt optimization | Reducing LLM costs |
agentic-prompt-engineering.md | Advanced prompting, structured output, templates | Writing better prompts |
agentic-error-handling.md | Agent, tool, LLM provider, and API error handling patterns | Error handling in agents |
agentic-review-checklist.md | Agentic AI review checklist (used by agentic-ai-reviewer agent) | Code reviews |
agentic-prompt-optimization.md | Constitutional AI, Tree-of-Thoughts, model-specific templates (Claude/Gemini/GPT), prompt versioning registry, canary rollout, LLM-as-judge | Optimizing prompt quality; multi-model deployments; production prompt lifecycle |
llm-judge-advanced.md | Production LLM-as-Judge: bias taxonomy (position, length, self-enhancement), position swap protocol, rubric generation, PoLL ensemble, hierarchical eval | Evaluating agent outputs with reliability; high-stakes eval decisions |
agentic-caching-patterns.md | 4-tier cache (Q1 LRU→Q2 Redis→Q3 semantic→L3 Anthropic), backfill, @cached_tool decorator, cache key generation, Prometheus metrics | Adding caching to LangGraph agents |
agentic-makefile-patterns.md | 40+ Makefile commands for setup, testing, RAG, memory, evaluation, Docker, observability — reference patterns for agentic AI services | Setting up developer workflow automation |
Common Commands
uvicorn src.main:app --reload # Run dev server (hot reload)
pytest -q # Run tests (quiet output)
pytest -q --cov=src --cov-report=term-missing # Tests with coverage
ruff check --fix . # Lint and auto-fix
ruff format . # Format code
mypy src/ # Type checkError Handling
For error handling patterns and code examples, read
reference/agentic-error-handling.md
LLM provider errors: Use retry with exponential backoff + fallback model chain. Never let provider errors crash the graph.
Tool execution errors: Wrap all @tool functions in try/except. Return structured error messages the LLM can reason about.
Graph infinite loops: Always include iteration_count in state and check it in the routing function.
Post-Code Review
After writing agentic AI code, dispatch these reviewer agents:
agentic-ai-reviewer— graph correctness, guardrails, iteration limits, cost efficiencysecurity-reviewer— tool input validation, prompt injection defense
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

