AshpreetandClaude Opus 4.7 bf88d39df7 cookbook: data labeling primitives (18 workflows) (#7976)
## Summary

Adds a new `cookbook/data_labeling/` directory built around **one
cookbook per core data-labeling primitive**. Each subfolder is a
self-contained example with `README.md`, `basic.py`, optional
task-meaningful variants, and a `TEST_LOG.md` per the cookbook
convention.

The 18 workflows, grouped by family:

| Family | Cookbooks |
|---|---|
| Text | `text_classification`, `text_multilabel_classification`,
`text_extraction`, `text_span_labeling`, `text_pairwise_preference` |
| Image | `image_classification`, `image_extraction`,
`image_extraction_to_vectordb`, `image_bounding_boxes` |
| Audio | `audio_classification`, `audio_transcription`,
`audio_extraction` |
| Video | `video_classification`, `video_extraction` |
| Document | `document_classification`, `document_extraction` |
| Composed | `llm_as_judge`, `quality_review` |

Strategic rationale (why labeling, why a primitives-per-cookbook shape)
and the implementation plan live in
`specs/agno/cookbooks/data-labeling/` (private specs repo).

The branch also includes a small refresh of `cookbook/99_docs/`
(`sorting_hat.py` / `workbench.py` scratch examples) — unrelated to the
data-labeling work but bundled in this PR by request.

## Type of change

- [ ] Bug fix
- [x] New feature
- [ ] Breaking change
- [x] Improvement
- [ ] Model update
- [ ] Other:

## Checklist

- [x] Code complies with style guidelines (`cookbook/STYLE_GUIDE.md`)
- [x] Ran format/validation scripts (`./scripts/format.sh` and
`./scripts/validate.sh`)
- [x] Self-review completed
- [x] Documentation updated — per-cookbook READMEs explain purpose,
when-to-use, run commands
- [x] Examples and guides: this PR _is_ examples
- [x] Tested in clean environment — every cookbook run end-to-end; see
each `TEST_LOG.md`
- [ ] Tests added/updated — N/A; cookbook content

### Duplicate and AI-Generated PR Check

- [x] Searched existing open PRs; nothing else addresses this
- [x] No similar PR exists
- [x] This PR was largely AI-generated (Claude Code) under direction;
code was reviewed and end-to-end tested before commit

## Additional Notes

### Conventions

- `OpenAIResponses(id="gpt-5.5")` is the default for text / image /
document workloads
- `Gemini(id="gemini-3-flash-preview")` for audio + video (native
modality input)
- `Claude(id="claude-sonnet-4-5")` for the second labeler in
`quality_review/` (provider diversity)
- Inline Pydantic schemas; no shared `schemas.py` per cookbook
(forkability beats DRY here)
- Variants are task-meaningful (e.g. `with_confidence.py`,
`multilabel.py`), not provider swaps

### Two test-driven fixes worth flagging

- `image_bounding_boxes/with_confidence.py` — gpt-5.5 produced
degenerate (all-zero or all-one) boxes without per-field x/y/w/h
`description=` strings on the Pydantic model. Added descriptions +
expanded coordinate guidance in the instructions; now produces tight
boxes.
- `document_extraction/with_confidence.py` — OpenAI's strict
structured-output mode rejects `Field(..., description=...)` on a field
whose type is a referenced sub-model. Dropped the field-level
description; explanatory text moved to a code comment.

### Out of scope / deliberate omissions

- No batch driver, rate limiter, DLQ, or warehouse export — these are
production patterns and don't belong in primitive cookbooks. The earlier
`pipeline.py` / `run_batch.py` / `export.py` files are removed; if those
patterns get cookbooks later they live under `cookbook/05_production/`
(TBD).
- No labeling UI / Label Studio integration.
- No RLHF training loop (we show the _data shape_ in
`text_pairwise_preference`, not the trainer).
- `image_extraction_to_vectordb/basic.py` requires `lancedb` (not in
`agno[demo]` extras). README documents the install. Worth either folding
into the demo extras or shipping a `requirements.in` for that folder —
happy to do as a follow-up.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-19 22:12:19 +01:00
2026-01-19 15:56:54 +05:30
2024-02-12 21:05:49 +00:00
2026-02-12 13:33:08 +00:00
2025-09-09 15:39:09 +02:00
2025-01-30 20:50:59 +05:30
2026-05-13 14:42:03 -07:00

Build, run, and manage agent platforms.

Introduction

Agno is an SDK for building agent platforms.

  • Build agents using any agent framework.
  • Run them as production services with tracing, scheduling, and RBAC.
  • Manage using a single control plane.

Agno allows you to own your agent stack. Maintain control of your data, context, tools, permissions, memory and human-review loops. Run your platform in your cloud, and manage it using a beautiful UI.

demo-os

What you can build

Agno can bring any agent to life, here are some examples:

  • Coda → A code companion that lives in Slack and works alongside your team.
  • Dash → A self-learning data agent that grounds answers in 6 layers of context.
  • Scout → A context agent that navigates Slack and Google Drive to answer questions.
  • Auto Improving Agent Platform → Build your own agent platform with an auto-improvement loop.

Get started

Features

  • Production API. 50+ endpoints with SSE and websockets to build a product on top.
  • Storage. Store sessions, memory, knowledge, and traces in your own database.
  • 100+ integrations. Integrate with 100+ tools using pre-built toolkits.
  • Context Providers. Access live data from Slack, Drive, wikis, MCP, and custom sources.
  • Human approval. Pause runs for user confirmation. Block tools that require admin approval.
  • Observability. Get monitoring via OpenTelemetry tracing, run history, and audit logs out of the box.
  • Security. Get JWT-based RBAC and multi-user, multi-tenant isolation out of the box.
  • Interfaces. Expose your agents via Slack, Telegram, WhatsApp, Discord, AG-UI, A2A.
  • Scheduling. Cron-based scheduling and background jobs with no external infrastructure.
  • Deploy anywhere. Run on any cloud platform that runs containers. Docker, Railway, AWS, GCP.

Use Agno with your coding agent

Two options:

  1. Add Agno docs as an indexed source. In Cursor: Settings → Indexing & Docs → Add https://docs.agno.com/llms-full.txt. Also works in VSCode, Windsurf, and similar tools.
  2. Add Agno docs as an MCP server. Add docs.agno.com/mcp to your favourite coding agent.

Read the full guide here.

Community

Contributing

See the contributing guide.

Telemetry

Agno logs which model providers are used to prioritize updates. Disable with AGNO_TELEMETRY=false.

↑ Back to top

S
Description
Build, run, and manage agent platforms.
Readme Apache-2.0
706 MiB
Languages
Python 99.7%
HTML 0.1%
Shell 0.1%