Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Build production-grade agentic AI applications using LangGraph, FastAPI, MCP tools, OpenTelemetry, and containerized microservices.
Building Production Agentic Applications
This skill guides building, instrumenting, evaluating, and containerizing agentic AI applications. Follow the conventions in Agents.md for all code style and architectural decisions.
Reference implementation lives in code/ — read those files for working examples of every pattern below.
Architecture Pattern
Frontend (Streamlit) → Agent API (FastAPI + LangGraph) → AI Gateway (LiteLLM) → LLM
↕
Vector DB (Milvus) MCP Server(s) (FastMCP/SSE)
↕
Trace Collector (Jaeger/OTEL Collector/Langfuse)
Each service is independently deployable, observable, and testable.
Checklist: New Agentic App
When building a new agentic application, verify:
Agent uses FastAPI lifespan for initialization (MCP connections + agent graph built at startup)
System prompt uses MUST/NEVER/CRITICAL language for tool calling
Tools inject dependencies via RunnableConfig, not globals
MCP tools load at startup with graceful degradation (log warning, continue with local tools)
Every service has OTEL instrumentation with unique service.name
Logs include trace_id and span_id for correlation
Custom spans wrap tool logic with semantic attributes
System prompt passed as SystemMessage per ainvoke call, not baked into constructor
Return 503 from /chat if agent hasn't finished initializing
Tool Design
@tool decorator with config: RunnableConfig = None for dependency injection
Pass memory_client via config={"configurable": {"thread_id": ..., "memory_client": ...}}
MCP tools loaded via MultiServerMCPClient with SSE transport
System Prompt Styles
Two proven approaches exist in the reference implementation:
V1 (Explicit): Lists every rule with MUST/NEVER, explicit multi-step examples
V2 (Silent Execution): Instructs agent to never narrate tool usage, just execute and respond naturally
Choose V2 for better UX; choose V1 when debugging tool-calling reliability.
Observability
Protocol: http/protobuf
Note: The OTEL exporter auto-appends /v1/traces to the endpoint. However, the current docker-compose.yaml includes it in the env var value. Be consistent with whichever convention your deployment uses.
Streamlit uses RequestsInstrumentor (not HTTPX) with @st.cache_resource singleton