Skip to content

Foundations

The foundations layer holds the core abstractions every other module in AI-Parrot is built on: the hook/event bus, the data models shared between clients, bots and tools, and the architectural decisions that keep the framework vendor-agnostic and fully async.

What lives here

  • Core hooks & event bus — the cross-cutting infrastructure agents use to publish lifecycle events, attach observers and compose middleware. Source: parrot.core.hooks.
  • Pydantic data modelsAIMessage, SourceDocument, MessageResponse, ToolCall and friends. These are the lingua franca between clients, bots and integrations. Source: parrot.models.
  • Helpers & utils — small reusable building blocks (string normalisation, async runners, retry decorators).

For the long-form architectural reasoning behind these pieces, see the nine-part architecture series in this section's sidebar:

API reference

The auto-generated API for these modules is in API Reference → Clients and the per-module pages that follow it.