BeakrGo to website
Docs/Overview/Agent engine

The Beakr agent engine

The engine that powers every conversation, workflow, and background task in Beakr. A streaming execution engine that runs AI agents in reproducible steps -- with built-in support for multi-agent handoffs, context compression, and real-time streaming.

This guide walks through the internals of the Beakr agent engine: how a chat request becomes a streaming graph execution, how agents hand work off to each other, how state is checkpointed, and how conversations stay within context windows even across long-running sessions. The engine is deterministic because it batches work into ordered super-steps, and resumable because every super-step produces a checkpoint that long workflows can pause, retry, or resume from.

In this guide

Key design decisions

1
Pregel / BSP model

Deterministic execution with built-in parallelism and checkpointing. Super-steps make every run reproducible and resumable.

2
Stateless agent configs

Agents are data (agent configs), not class hierarchies. Composable, swappable, testable.

3
Four-layer compression

Avoid expensive LLM summarization until absolutely necessary -- strip images, surgically clear compactable tool results, then summarize as last resort.

4
DB-writing tools serialize

Database-writing operations run one at a time for safety. Read-only operations run in parallel for speed.

5
Native streaming

The model's response streams to the frontend token-by-token with zero buffering -- the frontend sees tokens as the model produces them.

6
Two checkpoint levels

Mid-run checkpoints let the agent pause for user input and resume exactly where it left off. Thread-level checkpoints preserve conversation history across sessions.