mirror of
https://github.com/agno-agi/agno.git
synced 2026-10-12 02:10:54 +00:00
## Summary Adds a runnable observability cookbook for [Confident AI](https://www.confident-ai.com/) using its OpenTelemetry-native `confident-trace` SDK, which detects Agno automatically. - Add `cookbook/observability/confident_ai.py`: calls `init()` once at startup, runs a Hacker News agent (OpenAIResponses, `gpt-5.6-luna`) twice, wraps the second run in `trace_context` to attach tags, metadata, and a user ID, and calls `shutdown()` in a `finally` block to flush spans. - List the example in `cookbook/observability/README.md`. - Record the test run in `cookbook/observability/TEST_LOG.md`. Companion docs: agno-agi/docs#767 (Mintlify) and agno-agi/agno-docs#141 (in-house). The in-house examples page links to this cookbook on `main`. ## Type of change - [ ] Bug fix - [ ] New feature - [ ] Breaking change - [x] Improvement - [ ] Model update - [ ] Other: --- ## Checklist - [x] Code complies with style guidelines - [x] Ran format/validation scripts (`./scripts/format.sh` and `./scripts/validate.sh`) - [x] Self-review completed - [x] Documentation updated (comments, docstrings) - [x] Examples and guides: Relevant cookbook examples have been included or updated (if applicable) - [x] Tested in clean environment - [ ] Tests added/updated (if applicable) ### Duplicate and AI-Generated PR Check - [x] I have searched existing [open pull requests](https://github.com/agno-agi/agno/pulls) and confirmed that no other PR already addresses this issue - [ ] If a similar PR exists, I have explained below why this PR is a better approach - [x] Check if this PR was entirely AI-generated (by Copilot, Claude Code, Cursor, etc.) --- ## Additional Notes - Verified against `confident-trace==0.1.3`. Its OpenAI integration patches the Responses API, so `OpenAIResponses` model spans are captured alongside the Agno agent and tool spans. - Ran end to end with `CONFIDENT_API_KEY` and `OPENAI_API_KEY` set. Both runs completed and span batches were accepted by the collector with HTTP 200. - `CONFIDENT_OTEL_ENDPOINT` must match the project's region. A US project key sent to the EU endpoint returns 401 on export, so only set it for EU projects. The module docstring calls this out. - `cookbook/scripts/check_cookbook_pattern.py` passes for the new file. The two existing violations it reports in `mlflow_via_autolog.py` are pre-existing and untouched. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Observability
Observability examples for tracing and monitoring Agno agents, teams, and workflows.
Root Integrations
agent_ops.pyarize_phoenix_moving_traces_to_different_projects.pyarize_phoenix_via_openinference.pyarize_phoenix_via_openinference_local.pyatla_op.pyconfident_ai.pylangfuse_via_openinference.pylangfuse_via_openinference_response_model.pylangfuse_via_openlit.pylangsmith_via_openinference.pylangtrace_op.pylangwatch_op.pylatitude_via_openinference.pylogfire_via_openinference.pymlflow_via_openinference.pymaxim_ops.pyopik_via_openinference.pythe_context_company.pytrace_to_database.pytraceloop_op.pyweave_op.py
Subdirectories
Run
.venvs/demo/bin/python cookbook/observability/<file>.py