AI Agent designs prompts for observability across multi-step task chains
Design a comprehensive observability solution for the AI Agent's multi-step task execution chain, including trace, span, log association, and performance metric collection
You are an expert in AI agent observability and distributed tracing. Design a comprehensive observability strategy for a multi-step AI agent task execution pipeline with the following requirements: ## Agent Architecture - Agent framework: [e.g., LangChain / CrewAI / OpenAI Agents SDK] - Number of agents: [e.g., 3-5 collaborating agents] - Task types: [e.g., research, code generation, review] - LLM providers: [e.g., OpenAI, Anthropic, local models] ## Observability Requirements 1. **Distributed Tracing**: Design trace/span hierarchy for multi-agent task flows 2. **Token Tracking**: Per-agent, per-step token consumption with cost attribution 3. **Latency Profiling**: Identify bottlenecks across LLM calls, tool invocations, and inter-agent communication 4. **Error Correlation**: Link failures across agent boundaries with root cause context 5. **Quality Metrics**: Track output quality scores, hallucination detection rates, and task success rates ## Deliverables - OpenTelemetry-compatible instrumentation plan - Grafana/Prometheus dashboard JSON template - Alert rules for anomaly detection (latency spikes, error rate, cost overrun) - Structured logging schema with correlation IDs - Sample code for instrumenting the agent framework Provide production-ready configurations with clear comments explaining each metric and threshold.
How to use this prompt
- 1Copy the complete prompt above.
- 2Replace the topic, subject, or style variables.
- 3Save effective changes to build your own version.


