Concepts
PAREL's architecture is built around a few key ideas: a tiny kernel that only dispatches, plugins that provide all capabilities, and durable sessions that survive crashes.
# Kernel
The kernel is the scheduler at the center of PAREL. It does nothing but dispatch — it doesn't know about models, tools, or memory. Every capability is a plugin.
The kernel runs a turn loop: receive a user message, call the model, execute tools, repeat until the model says it's done (or budget/step limits are hit).
# Plugins
Everything in PAREL is a plugin:
| Type | What it does | Examples |
|---|---|---|
| Model | LLM provider adapter | anthropic, openai |
| Sandbox | Code execution environment | e2b, local |
| Memory | Context management | rolling-summary |
| Budget | Cost/step limits | budget-cap |
| Security | Input/output filtering | security-basic |
| Channel | External I/O | channel-api |
Plugins declare lifecycle hooks (before/after model calls, tool execution, context building) and the kernel dispatches to them in order.
# Sessions
A session is a single conversation with an agent. It has:
| Field | Description |
|---|---|
| id | Unique session identifier (Durable Object ID) |
| status | running, completed, or failed |
| history | Full message history (user, assistant, tool calls/results) |
| state | Turn count, step count, token usage, cost |
Sessions run inside Cloudflare Durable Objects — each session gets its own SQLite database for state, with automatic crash recovery via the Workflow API.
# Turns and Steps
A turn starts when the user sends a message and ends when the agent finishes responding. Each turn contains multiple steps:
Turn #1 Step 1: model call → "I'll search for that" + tool_call(bash) Step 2: tool execution → bash result Step 3: model call → "Here's what I found: ..." [turn complete]
Steps auto-checkpoint between executions. If the Worker crashes mid-step, the Workflow resumes from the last checkpoint.
# Configuration
Agents are declared in agent.yaml. The config parser supports sugar syntax that expands to plugin declarations:
# Sugar:
agent:
model: "anthropic:claude-sonnet-4"
# Expands to:
plugins:
- plugin: "@parel/model-anthropic"
config:
model: "claude-sonnet-4"