Content blocks
The fundamental unit of LLM communication. A message is a list of content blocks; a model response is a list of content blocks. Source:src/herald/engine_contracts/__init__.py (re-exports from
src/herald/types.py).
Messages
A turn or part of a turn.Tool definitions
How a tool is declared and how a call is invoked. Source:src/utility_directory/, src/herald/engine_contracts/.
ToolDef is the schema the model sees in its system prompt. ToolCall
is what the model issues. Utility is what the Engine actually invokes.
Events
The vocabulary of the SSE stream and the in-process event bus. Source:src/engine_core/events.py.
There are 32+ event types. The major families:
- Lifecycle —
ThreadLifecycle,TaskLifecycle. - Content —
TextDelta,ThinkingDelta,ContentBlockStart,ContentBlockStop. - Tools —
ToolCall,ToolResult,ToolError. - HITL —
HitlRequest,HitlResolved,PermissionPrompt. - Memory —
WorkingMemoryUpdate,MemoryRetrieval. - Compaction —
CompactionEvent. - Diagnostics —
Heartbeat,Usage,Error,CacheHitRatioAlert.
timestamp, a task_id, and a type. Concrete
fields vary by type.
Errors
Stable error codes used across the Engine. Source:src/errors.py.
Memory primitives
The records persisted in the brain. Source:src/memory/.
Channel state
Execution checkpoint. Source:src/engine_core/channel_state.py.
Asset Directory
MCP connection and registry types. Source:src/asset_directory/states.py, src/asset_directory/__init__.py.
Rules
- Never inline a contract type. If a type crosses a module boundary,
it lives where the producing module exports it (or in a shared
engine_contractsmodule). - Never break a public contract silently. Renaming or reshaping
ToolUseBlock,ErrorCode, or any event field is a breaking change and needs a migration guide. - Document new contract types deliberately. If you’re inventing a new kind of block or a new error code, write down why and where it’s used so the next reader doesn’t have to reverse-engineer the decision.
See also
- Components — which module owns which types.
- Data flow — how the types move through the system.

