Skip to main content

Pydantic AI

Pydantic AI integrations should expose UnifiedMemory as typed tools with validated request and response models. Treat memory as a governed side effect, not a free-form log sink.

Pattern

  • Model retain, recall, agent_context, agent_writeback, and courtroom as explicit tools.
  • Validate container, memory type, source app, and agent identity before calls.
  • Prefer structured writeback with evidence metadata.

Safety

If validation fails, skip memory injection rather than injecting unscoped or low-trust context.