haiku.rag/docs/capabilities
Yiorgis Gozadinos 61a756da7f
Support Pydantic AI agent specs via from_spec
`Agent.from_spec` raised `TypeError` on `RAGCapability` and `AnalysisCapability`,
whose constructors take a state class, packaged instruction text and a tool-name
set, and silently omitted both from the generated spec schema. The two
zero-configuration capabilities constructed but with `id=None`, so pydantic-ai's
duplicate-id rejection no longer held and a spec could register two citation
policies, defeating the single-decision-maker invariant.

Override `from_spec` on all four, delegating to `create_capability()` so ids and
instructions come from one place. The spec surface is `db_path`, `config`,
`defer_loading`, `request_limit` and `vision`; a live `HaikuRAG` client stays out
of it, and a `config` mapping is validated through `AppConfig`.
2026-08-21 13:04:09 +03:00
..
analysis.md Update caps documentation 2026-08-13 14:08:14 +03:00
compaction.md Refuse to compact evidence the host kept no record of 2026-08-13 15:46:23 +03:00
index.md Support Pydantic AI agent specs via from_spec 2026-08-21 13:04:09 +03:00
policy.md Refuse to compact evidence the host kept no record of 2026-08-13 15:46:23 +03:00
rag.md Update caps documentation 2026-08-13 14:08:14 +03:00