Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vendor/agents/docs/content/docs/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ A conversation is idle until a prompt starts a run, and goes back to idle when t

An idle agent sleeps and frees its memory. The next action on its key wakes it: the agent opens Pi from SQLite, resumes interrupted work, and reconnects to the same sandbox the first time a tool needs it, so clients don't do anything different. While the agent sleeps, its sandbox is suspended.

During a retry or poll wait longer than a minute, the Actor also sleeps, and a scheduled wake resumes the work when the wait ends.
During a retry or poll wait, the Actor also sleeps, and a scheduled wake resumes the work when the wait ends.

<div style="overflow-x:auto">
<svg viewBox="0 0 640 280" role="img" aria-label="The agent loop runs in memory and saves each step to the Actor&#x27;s SQLite database, which also holds the sandbox id. On wake, the loop is restored from SQLite and reconnects to the same sandbox. Sleep, a crash, or an upgrade clears memory, and SQLite is kept." style="width:100%;min-width:520px;max-width:640px;height:auto;display:block;margin:2.5rem auto;font-family:system-ui,sans-serif">
Expand Down
2 changes: 1 addition & 1 deletion vendor/agents/docs/content/docs/pi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ A fork with `fork: "current"` starts with a copy of the document. Clients can al

- When you ship new code, running work gets up to `sleepGracePeriod` (15 minutes) to finish before the Actor restarts.
- Anything cut off resumes from its last saved step, after your `onWake` runs.
- A retry wait longer than a minute lets the Actor sleep, and a scheduled wake resumes it.
- A retry wait lets the Actor sleep, and a scheduled wake resumes it when the wait ends.
- Destroying the Actor stops it immediately.

See [Architecture](/agents/docs/architecture).
Expand Down
2 changes: 2 additions & 0 deletions vendor/agents/examples/docs/durable-ai-agents/chat-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export const Plan = defineDoc<{ steps: { text: string; done: boolean }[] }>({
history: "latest",
fork: "current",
initial: () => ({ steps: [] }),
// Store the whole document every 50 changes, so loading it replays at most 50.
checkpointWhen: (_value, _ops, { deltasSinceBase }) => deltasSinceBase >= 50,
});

const updatePlan = defineTool({
Expand Down
12 changes: 6 additions & 6 deletions vendor/agents/examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@
},
"dependencies": {
"@daytonaio/sdk": "^0.216.0",
"@earendil-works/chord": "1.3.0",
"@earendil-works/pi-ai": "1.3.0",
"@earendil-works/pi-coding-agent": "1.3.0",
"@earendil-works/pi-durable": "1.3.0",
"@earendil-works/chord": "1.4.0",
"@earendil-works/pi-ai": "1.4.0",
"@earendil-works/pi-coding-agent": "1.4.0",
"@earendil-works/pi-durable": "1.4.0",
"@hono/node-server": "^2.1.5",
"@linear/sdk": "^97.0.0",
"@octokit/rest": "^22.0.1",
"@octokit/webhooks-methods": "^6.0.0",
"@rivet-dev/pi": "workspace:*",
"@rivet-dev/sandbox-adapter": "workspace:*",
"@rivet-dev/workflows": "1.0.0",
"@rivetkit/react": "2.3.26",
"@rivetkit/react": "3.0.0-preview.2",
"@slack/web-api": "^8.2.0",
"discord-interactions": "^4.4.0",
"e2b": "^2.51.0",
"freestyle": "^0.2.16",
"hono": "^4.13.12",
"react": "^19.3.0",
"rivetkit": "2.3.26"
"rivetkit": "3.0.0-preview.2"
},
"devDependencies": {
"@types/node": "^24.0.0",
Expand Down
2 changes: 2 additions & 0 deletions vendor/agents/examples/docs/pi/documents/chambers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ export const Chambers = defineDoc<{ solved: string[] }>({
history: "latest",
fork: "current",
initial: () => ({ solved: [] }),
// Store the whole document every 50 changes, so loading it replays at most 50.
checkpointWhen: (_value, _ops, { deltasSinceBase }) => deltasSinceBase >= 50,
});
Loading