惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
G
Google Developers Blog
B
Blog RSS Feed
A
About on SuperTechFans
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 司徒正美
D
Docker
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
H
Help Net Security
WordPress大学
WordPress大学
MyScale Blog
MyScale Blog
博客园 - Franky
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Blog — PlanetScale
Blog — PlanetScale
L
LangChain Blog

Show HN

Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap GitHub - noopolis/moltnet: Self-hostable chat network for AI agents. Pre-built bridges for Claude Code, Codex, and the Claws. Rooms, DMs, history. No Slack bots, no Matrix, no glue code.
OpenComputer Durable Agent Sessions
igorzij · 2026-06-23 · via Show HN

Preview

Durable Agent Sessions

Resumable, steerable agent sessions

OpenComputer handles session state, runtime lifecycle, streaming, and webhooks, so your app code stays small enough to run on an edge worker.

Example: PR-review agent repo

Built into every session

Use sessions for durable agents; use sandboxes for one-shot commands.

runtime

Self-healing runtime

  • Runtime crashes restart automatically.
  • Idle sessions hibernate and wake on the next message.
  • Hung runs stop cleanly instead of staying stuck.

sandbox

Brain / hands sandboxing

  • Brain: agent loop. Hands: files and commands.
  • Untrusted work stays contained in the hands sandbox.
  • Your model key stays in the secret store, never in a sandbox.

webhook

Reliable backend delivery

  • Deliver user-level events to your webhook.
  • Requests are signed when the destination has a secret.
  • Deliveries are retried, dead-lettered, inspectable, and redeliverable.

1. Create an agent

An agent stores name, runtime, model, prompt, and model credential.

TypeScript SDK
import { OpenComputer } from "@opencomputer/sdk";

const oc = new OpenComputer({
  apiKey: process.env.OPENCOMPUTER_API_KEY,
});

const agent = await oc.agents.create({
  name: "quickstart-coder",
  runtime: "claude",
  model: "anthropic/claude-opus-4-8",
  prompt: "Work in /workspace. Say progress. Ask only when blocked.",
  key: process.env.ANTHROPIC_API_KEY,
  limits: { turns: 4, turnSeconds: 600 },
});

2. Start a session

A session starts work and returns a browser-safe client_token scoped to that session.

Start work
const session = await oc.sessions.create({
  agent: agent.id,
  input: "Create a todo app with local storage.",
  metadata: {
    projectId: "proj_123",
    taskId: "task_456",
  },
  idempotencyKey: "task_456",
  destinations: [{
    url: "https://your.app/oc-webhook",
    level: "user",
    types: ["turn.completed"],
  }],
});

// session.id + session.clientToken

3. Stream and steer

Use the session token in the browser. EventSource resumes after dropped connections.

Browser client
import { connectSession } from "@opencomputer/sdk";

const live = await connectSession({ sessionId, clientToken });

for await (const event of live.events({ level: "progress" })) {
  render(event);
}

await live.steer("Add a completed-task filter.", {
  idempotencyKey: "msg_01",
});

Session lifecycle

A session is the durable unit of an agent at work: an append-only event log, pinned agent snapshot, and lifecycle status. Compute attaches, hibernates, and wakes on the next message.

Status Meaning
queuedScheduled; a turn has not started running yet.
runningA turn is executing.
awaiting_inputA turn ended asking a question. Reply by steering.
idleDone for now, quiescent and steerable. The sandbox is hibernated.
failedThe session errored out.
archivedClosed and read-only.
Fetch the result
const session = await oc.sessions.get("ses_...");
const { lastTurn, result } = await session.result();

// lastTurn.yieldReason: "completed", "needs_input",
// "deadline_exceeded", "budget_exceeded", "max_turns", "canceled"

Event log

Each session has ordered events. Use seq to resume and type to handle structured events.

Turn event sequence
turn.started
  tool.call          npm test
  exec.completed     exit 1
  agent.message      "3 tests fail"   level: user
turn.completed       needs_input
Event field Use it for
typeStable discriminator: agent.message, turn.completed, tool.call, exec.completed, errors.
levelVisibility filter: user, progress, or internal.
seqMonotonic cursor for ordering and resume.
bodyTyped payload for that event.
actorWho produced the event: human, agent, or system.

Webhooks deliver committed events

Register a destination and user-level events are delivered at least once and retried. Deliveries are signed when the destination has a secret. The envelope includes the session metadata you set at create time.

Delivery envelope
{
  "type": "turn.completed",
  "sessionId": "ses_...",
  "eventId": "evt_...",
  "metadata": {
    "projectId": "proj_123",
    "taskId": "task_456"
  },
  "event": {
    "id": "evt_...",
    "seq": 12,
    "type": "turn.completed",
    "level": "user",
    "body": { "yield_reason": "completed" }
  }
}
Signed destination
const session = await oc.sessions.get("ses_...");

await session.destinations.create({
  url: "https://your.app/oc-webhook",
  secret: "whsec_...",
  level: "user",
  types: ["turn.completed"],
});

Dedupe on webhook-id. Verify the raw body with a Standard Webhooks library when a destination secret is set. A delivery succeeds on any HTTP 2xx.

The PR-review agent stores GitHub PR IDs in metadata. Completion webhooks carry them back, so the app can update the PR without a database, queue, or always-on worker.

The claude and codex runtimes use tools against the hands sandbox. The brain has no direct filesystem or shell; commands and file edits run through the hands tools.

Tool What it does
bashRun a shell command in the sandbox.
readRead a file from the sandbox.
writeWrite a file to the sandbox.
lsList a directory in the sandbox.
sayEmit a user-level message. The final say is the session result.
askAsk a question and yield with needs_input. Reply by steering.

For public repositories, put the repo URL and branch or commit in the task text. Prepared workspaces and private-repo access are coming soon.

How it works

Your app starts, streams, and steers a durable session. The managed runtime drives the agent loop, acts through the hands sandbox, and delivers user-level events to your webhook.

How Durable Agent Sessions connect the app, session event log, managed runtime, brain sandbox, hands sandbox, model provider, and webhook delivery.

Examples and docs

Docs explain the API. Repos show complete apps.