2026-11-26 15:39 UTC

Open-source Pi agent service adds self-hosted sessions and Linux desktop sandboxes

state: seedheat: mediumuncertainty: mediumrelevance: mediumself-hosted-agents agent-sandboxes computer-useTaher Chhabra

What is this?

Pi Managed Agents API is an open-source MVP by Taher Chhabra, presented on Hacker News as a self-hosted alternative to hosted agent APIs. Its GitHub project page describes a service built around the Pi coding-agent SDK: it adds an HTTP API and browser console, persistent sessions and workspaces, asynchronous runs, event history, and downloadable artifacts. It supports Docker workspaces and an optional Linux desktop in a QEMU/KVM VM, operated through Microsoft HCU. The project documents a VPS deployment and reports successful live inference through OpenRouter; direct OpenAI and Anthropic inference is explicitly unverified. The project’s stated MVP limits include a single-host deployment, no high availability, user roles, quotas, custom tools or MCP, approvals, subagents, or public untrusted-code hardening. The source describes the implemented MVP as of 15 November 2026; the Hacker News post is dated 16 November local time. Evidence is primarily the project’s own documentation and author’s post, with search results corroborating the repository but no independent evaluation.

Why it matters

The project packages persistent agent sessions and sandboxed code or desktop work into infrastructure an operator can run themselves, rather than relying entirely on a vendor-managed service. That could give developers more control over hosting and model-provider choice, and enable applications to hand agents a continuing workspace. Its Linux desktop option extends the idea from code execution to operating GUI applications. The documented MVP is useful for trusted, small-scale experimentation, but its explicit security and operational limits make it premature to treat as a hardened public agent platform.

Current assessment

New: Taher Chhabra’s Pi Managed Agents API is available as an open-source, self-hostable MVP, announced on Hacker News and documented on GitHub. The service wraps the Pi coding-agent SDK with an API, console, persistent agent versions/sessions, queued asynchronous runs, saved events, artifacts, and Docker workspaces; optional Linux desktop sessions run in QEMU/KVM through Microsoft HCU. The project documents deployment on a Linux VPS and reports live tests using OpenRouter, including GPT-4.1 mini and DeepSeek V4.1 Flash 1017. These are project-reported tests, not independent benchmarks or adoption evidence; direct OpenAI and Anthropic inference remains unverified. The implementation is deliberately narrower than the hosted products it compares itself with: one API and worker by default, five-minute per-run limit, no input-upload API, token-delta streaming, custom tools/MCP, subagents, approvals, scheduling, or high availability. The author cautions that public untrusted-code hosting needs stronger isolation, scoped permissions, quotas, and further hardening. The implication is increased operator control and a lower barrier to prototyping persistent, workspace-based agents—including GUI operation—while responsibility for model costs, deployment, security, and reliability stays with the host. Treat claims about implementation and testing as first-party until independently checked; no independent adoption or security assessment is supplied.

Measured heat

now 0 pts/hpeak 1 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 264h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

11-15 16:24 (minted)⭐ origin echo-reconstructedThe GitHub repository is the original artifact: its README presents “Pi Managed Agents API” as a self-hosted managed agents API built around
Taher Chhabra (taherchhabra) on github (echo) · attributed from hn.story.50507721 · published time unknown
—
11-15 15:37first on hacker news · published · lag ?Show HN: Selfhost pi agents API with Linux desktop sandbox
taherchhabra
—
11-15 15:37amplified on hacker news 👑hn.story.50507721
taherchhabra
peak 2 · 0 comments · 103% of case engagement
11-15 16:21our radar first saw it · lag ?discovery anchor: hn.story.50507721—
pace: p13 vs 2096 stories at the 168h mark (now 264h old) — behind adobe-max-ai-agents-creative-tools-mcp (0.5x)

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnShow HN: Selfhost pi agents API with Linux desktop sandbox
Retrieved article excerpt

Open article · Retrieved 2026-11-15T16:22:20.812905+00:00

# Pi Managed Agents API

**Give your apps agents that run code, keep context, and deliver files. Powered by Pi. Hosted by you.**

[Checks](https://github.com/taherchhabra/pi-managed-agents-api/actions/workflows/check.yml)

[Get started](https://github.com/taherchhabra/pi-managed-agents-api#get-started) · [Comparison](https://github.com/taherchhabra/pi-managed-agents-api#how-it-compares) · [Connect your app](https://github.com/taherchhabra/pi-managed-agents-api#connect-your-app) · [Built-in documentation](https://github.com/taherchhabra/pi-managed-agents-api#documentation-in-your-workspace) · [Architecture](https://github.com/taherchhabra/pi-managed-agents-api/blob/main/docs/architecture.md)

Useful agents need a place to work, a way to carry context into the next task, and a record of what happened. Pi Managed Agents brings those pieces together in a self-hosted API and browser console built around the **Pi coding agent SDK**.

Define an agent, give it a workspace, and send it a task. Pi handles the model and tool loop; the service saves session state, runs code in Docker or operates a Linux desktop, records progress, and publishes the resulting files. Your application can call it from any server over HTTPS.

[A completed Release analyst session showing a synthetic analysis task and its generated Python script and report](https://github.com/taherchhabra/pi-managed-agents-api/blob/main/docs/images/session-workspace.jpg)

*A real DeepSeek run through OpenRouter: synthetic release metrics become a Python analysis and a downloadable report. Screenshots use a separate demo workspace.*

## Give an agent a Linux desktop

Choose **Desktop assistant**, select a vision model, and start a **Linux desktop** session. Pi uses [Microsoft HCU](https://github.com/microsoft/Hybrid-Computer-Use) to inspect accessibility controls and screenshots, then operate real applications inside a QEMU/KVM VM. The console shows a live preview and saves the model’s observations alongside its tool calls.

Apps and files stay with the session between runs. A desktop can run on a separate KVM server while your API stays on a VPS. Linux is supported first, with **Off, Internet, or domain-allowlist** networking for desktop sessions. Internet access uses an HTTP/HTTPS proxy; private networks and cloud metadata are blocked. The preview is read-only. Windows and macOS providers are not implemented.

Open **Docs → Linux desktops & HCU** in the app for setup and the API guide. The same guide is in [docs/desktop.md](https://github.com/taherchhabra/pi-managed-agents-api/blob/main/docs/desktop.md).

[A real DeepSeek agent continuing work in a persistent Linux desktop through HCU](https://github.com/taherchhabra/pi-managed-agents-api/blob/main/docs/images/desktop-preview.jpg)

*The agent created a note in Mousepad, saved it through the GUI, then resumed the same desktop and appended a second line. Screenshots and the saved file are available in the session.*

[Desktop environment with Internet access selected](https://github.com/taherchhabra/pi-managed-agents-api/blob/main/docs/images/desktop-network.jpg)

*Choose a network policy for each new desktop session. The real DeepSeek browser test loaded an allowed website and verified that an unapproved domain was blocked. See the [browser result](https://github.com/taherchhabra/pi-managed-agents-api/blob/main/docs/images/desktop-browser-preview.jpg) and [in-app guide screenshot](https://github.com/taherchhabra/pi-managed-agents-api/blob/main/docs/images/desktop-network-docs.jpg).*

## How it compares

Vendor documentation checked on **14 November 2026**; the Pi column reflects the **implemented MVP as of 15 November 2026**. Vendor columns describe their hosted services, with self-hosting options called out separately. Links in the table point to the relevant vendor documentation.

| Capability | Pi Managed Agents API — current MVP | OpenAI Agents API | Claude Managed Agents API |
| --- | --- | --- | --- |
| Agent harness | Pi coding agent SDK | [Managed Codex harness](https://developers.openai.com/api/docs/guides/agents-api/architecture) | [Configurable Claude harness](https://platform.claude.com/docs/en/managed-agents/overview) |
| Host the API, harness, and session storage yourself | **Yes.** Docker Compose deployment on one Linux VPS | [OpenAI runs the service; self-hosted sandboxes move tool execution to your infrastructure](https://developers.openai.com/api/docs/guides/agents-api/architecture) | Hosted service, or [self-hosted service and sandboxes](https://platform.claude.com/docs/en/managed-agents/self-hosted) |
| Model choices | OpenAI, Anthropic, and OpenRouter catalogs; includes DeepSeek | [OpenAI models supported by the API](https://developers.openai.com/api/docs/guides/agents-api/configuration) | [Claude models](https://platform.claude.com/docs/en/managed-agents/overview); self-hosted service also supports [a choice of inference backend](https://platform.claude.com/docs/en/managed-agents/self-hosted) |
| Reusable agents | Immutable versions; sessions pin a version | [Saved or inline configuration; sessions copy saved settings](https://developers.openai.com/api/docs/guides/agents-api/configuration) | [Versioned agent definitions](https://platform.claude.com/docs/en/managed-agents/agent-setup) |
| Sessions and follow-up messages | **Yes.** Persistent context, queued runs, and follow-ups; five-minute limit per run | [Persistent sessions with asynchronous turns and follow-ups](https://developers.openai.com/api/docs/guides/agents-api/sessions) | [Stateful sessions with asynchronous user events](https://platform.claude.com/docs/en/managed-agents/overview) |
| Code execution and workspace | Docker workspaces or optional Linux desktops on QEMU/KVM with HCU; Bash, Python and persistent files; desktop HTTP/HTTPS with Off / Internet / domain allowlist, Docker networking off | [Hosted, self-hosted, or no environment](https://developers.openai.com/api/docs/guides/agents-api/architecture) | [Cloud sandboxes](https://platform.claude.com/docs/en/managed-agents/environments) or [self-hosted execution](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes) |
| File inputs and outputs | Downloads of published `outputs/` snapshots; **no input-upload API yet** | [Uploads and published artifacts for hosted environments; self-hosted files use your infrastructure](https://developers.openai.com/api/docs/guides/agents-api/environments/files) | [Upload, mount, and download session files](https://platform.claude.com/docs/en/managed-agents/files) |
| Streaming and history | Saved lifecycle/tool/result events over resumable SSE; **no token deltas yet** | [Live SSE with text deltas; saved items and turns for history](https://developers.openai.com/api/docs/guides/agents-api/sessions/events) | [Live text previews plus persisted completed events](https://platform.claude.com/docs/en/managed-agents/event-deltas) |
| Console and logs | Agent testing, session inspector, tool calls, log export, artifacts, and built-in docs | [Dashboard session logs, turn traces, and usage](https://developers.openai.com/api/docs/guides/agents-api/observability) | [Console session viewer, tool inspection, event export, and usage](https://platform.claude.com/docs/en/managed-agents/session-observability) |
| MCP and custom application tools | Fixed Bash/file tools plus built-in HCU `AX`/`GUI` integration; **no user-configurable MCP servers or custom tools yet** | [Function tools](https://developers.openai.com/api/docs/guides/agents-api/tools/functions) and [MCP connections](https://developers.openai.com/api/docs/guides/agents-api/tools/mcp) | [Custom tools and MCP](https://platform.claude.com/docs/en/managed-agents/tools) |
| Steering and cancellation | Cancellation supported; new messages queue or reject while busy; **no mid-run steering** | [Steer an active turn or cancel it](https://developers.openai.com/api/docs/guides/agents-api/sessions) | [Steer or interrupt with user events](https://platform.claude.com/docs/en/managed-agents/overview) |
| Subagents and orchestration | **Not yet.** One agent per session; one run at a time per worker | [Parallel subagents with separate context](https://developers.openai.com/api/docs/guides/agents-api/multi-agent) | [Subagents, threads, and dynamic workflows](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration) |
| Tool approvals | **Not yet.** Enabled tools execute within fixed sandbox restrictions | [Automatic review for supported approval requests](https://developers.openai.com/api/docs/guides/agents-api/sessions/approvals) | [Allow, ask, or automatic permission policies](https://platform.claude.com/docs/en/managed-agents/permission-policies) |
| Scheduling and webhooks | **Not yet.** Your app submits runs and polls or streams results | [Scheduled automations](https://developers.openai.com/api/docs/guides/agents-api/sessions/automations) and [session webhooks](https://developers.openai.com/api/docs/guides/agents-api/sessions/webhooks) | [Scheduled deployments](https://platform.claude.com/docs/en/managed-agents/scheduled-deployments) and [webhooks](https://platform.claude.com/docs/en/managed-agents/webhooks) |
| Failure recovery | Explicit `waiting` state; reconcile tool effects before retrying; **no automatic tool replay** | [Inspect saved state and tool effects before retrying failed work](https://developers.openai.com/api/docs/guides/agents-api/errors) | [Automatic rescheduling for transient errors; termination for unrecoverable errors](https://platform.claude.com/docs/en/managed-agents/webhooks) |
| Client integration | Own HTTP API and runnable Node.js example; **no OpenAI/Claude SDK compatibility** | [OpenAI SDK session APIs](https://developers.openai.com/api/docs/guides/agents-api/sessions) | [Anthropic SDK and CLI; same API for its self-hosted service, with exceptions](https://platform.claude.com/docs/en/managed-agents/self-hosted) |

Claude's self-hosted service currently omits the Files API, scheduled deployments, and webhooks, and limits delegation to predefined subagents; see its [documented feature differences](https://platform.claude.com/docs/en/managed-agents/self-hosted/differences). Hosting the whole service and hosting only a sandbox are separate options. Pi runs its service locally, while model requests go to the configured provider. Real inference has been tested through OpenRouter; direct OpenAI and Anthropic inference remains unverified.

Pi currently suits a trusted operator who wants a Pi-based runtime, provider choice, and a console on their own VPS. It does not yet provide high availability, per-user roles, spending quotas, or a hardened public execution service. See the [implemented contract and limits](https://github.com/taherchhabra/pi-managed-agents-api/blob/main/docs/mvp.md) for the exact scope.

## Build an agent. See it work.

Start with instructions, a model, and the tools your agent needs. Use **OpenAI, Anthropic, or OpenRouter**, including DeepSeek V4.1 Flash 1017 through OpenRouter. The console shows the models available in the installed runtime.

Save a version, select **Test agent**, and send a task. You can build a coding assistant that writes and tests Python, an analyst that turns supplied data into a report, or a writing partner that keeps context through revisions.

Every saved agent version is immutable. Existing sessions keep their original configuration while you try new instructions or models in another session.

[The Pi Agents library with a writing partner, workspace assistant, and release analyst](https://github.com/taherchhabra/pi-managed-agents-api/blob/main/docs/images/agent-library.jpg)

## Keep the conversation and the workspace

A session connects an agent version to an environment. Send related tasks to the same session to continue the conversation and work with the files it already created.

| You define | The service keeps |
| --- | --- |
| **Agent** | Versioned instructions, 
taherchhabra20
🟧 echo.github ⭐The GitHub repository is the original artifact: its README presents “Pi Managed Agents API” as a self-hosted managed agents API built aroundTaher Chhabra (taherchhabra)——

Interpretation history

Decision trace