The open-source runtime for AI agents
You write the agent. Polos handles sandboxes, durability, approvals, triggers, and observability.
Built for developers shipping agents to production.
β Star us to support the project!
$ curl -fsSL https://install.polos.dev/install.sh | bash
$ npx create-polos # TypeScript
$ pipx run create-polos # Python
β Project name: my-project
β LLM provider: Anthropic
β Done!
$ cd my-project && polos dev
β Polos server started β http://localhost:5173
β Worker connected - agents: coding_agent, assistant_agent
Watching for changes...
$ polos run coding_agent
> Build a REST API with Express and SQLite β one endpoint: GET /orders
[Agent writes files, runs commands, builds the project - all sandboxed]
Open http://localhost:5173 for the dashboard. π Full Quick Start Guide β
Once you're running, the CLI gives you full control:
polos dev # Start server + worker with hot reload
polos run <agent> # Start an interactive session with an agent
polos agent list # List available agents
polos tool list # List available tools
polos logs <agent> # Stream logs from agent runs| Challenge | Typical agent framework | With Polos |
|---|---|---|
| Sandboxing | None - DIY or run unsandboxed | Docker, E2B + built-in tools (exec, files, search) |
| Durability | Agent crashes, start over | Auto-retry, resume from exact step |
| Slack | Build a bot from scratch | @mention an agent, get responses in thread |
| Approvals | Build it yourself | Slack, UI, terminal - one tap |
| Triggers | Glue code for every webhook | Built-in: HTTP, webhooks, cron, events |
| Observability | Grep through logs | Full tracing, every tool call, every decision |
| Cost | Re-run failed LLM calls from scratch | Durable execution, Prompt caching, 60-80% savings |
Agents run in isolated Docker containers, E2B, or cloud VMs. Every sandbox ships with built-in tools - exec, read, write, edit, glob, grep, web_search - so your agent can run commands, navigate codebases, and browse the web out of the box. No tool code to write, no sandbox lifecycle to manage. Just pass sandboxTools() and go.
Automatic retries and state persistence. Resume from the exact step that failed. Prompt caching with 60-80% cost savings. Concurrency control across agents - no API rate limit chaos.
Approval flows for any tool call. Reach your team via Slack, Discord, email. Configurable rules for what needs approval. Paused agents consume zero compute.
Every agent gets a webhook URL out of the box - point GitHub, JIRA, Salesforce, or any system at it. Plus HTTP API, cron scheduling, event-driven triggers, and built-in Slack integration to run agents from chat.
OpenTelemetry tracing for every step, tool call, and approval. Full execution history. Visual dashboard for monitoring and debugging.
Build agents on Polos with any LLM - OpenAI, Anthropic, Google, and more via Vercel AI SDK and LiteLLM. Or bring existing agents from CrewAI, LangGraph, and Mastra and get Polos's durability, observability, and sandboxing without rewriting anything. Python or TypeScript. Open source - run anywhere.
Define an agent with access to sandbox (Python)
from polos import Agent, sandbox_tools, SandboxToolsConfig, DockerConfig
sandbox = sandbox_tools(SandboxToolsConfig(
env="docker",
docker=DockerConfig(image="node:20-slim", memory="2g"),
))
coding_agent = Agent(
id="coding_agent",
provider="anthropic",
model="claude-sonnet-4-5",
system_prompt="You are a coding agent.",
tools=sandbox,
)Define an agent with tool approval (TypeScript)
import { defineAgent, defineTool, sandboxTools } from "@polos/sdk";
import { anthropic } from "@ai-sdk/anthropic";
import { z } from "zod";
const sandbox = sandboxTools({
env: "docker",
docker: { image: "node:20-slim", memory: "2g" },
exec: {
security: "allowlist",
allowlist: ["node *", "npm install *", "cat *", "ls *"],
// Commands matching the allowlist run automatically.
// Everything else pauses and asks a human to approve.
},
});
// Bring your own tools - approval: "always" pauses for human approval before every call.
const deployTool = defineTool(
{
id: "deploy",
description: "Deploy the project to production",
inputSchema: z.object({ env: z.enum(["staging", "production"]), version: z.string() }),
approval: "always",
},
async (ctx, input) => {
// This only runs after a human approves
return await pushToCloudDeploy(input.env, input.version);
}
);
const codingAgent = defineAgent({
id: "coding_agent",
model: anthropic("claude-sonnet-4-5"),
systemPrompt: "You are a coding agent.",
tools: [...sandbox, deployTool], // sandbox tools + your own
});No DAGs. No graph syntax. Just Python or TypeScript.
Watch a coding agent built with Polos - sandboxed execution, tool approvals, and real-time observability.
- Orchestrator: Written in Rust. Manages execution state, durable logs, retries, scheduling, triggers, and the dashboard UI. Backed by Postgres.
- Worker: Runs your agents and workflows, written with the Python or TypeScript SDK. Connects to the orchestrator. Scale horizontally by running multiple workers.
Polos captures the result of every side effect - tool calls, API responses, time delays - as a durable log. If your process dies, Polos replays the workflow from the log, returning previously-recorded results instead of re-executing them. Your agent's exact local variables and call stack are restored in milliseconds.
Completed steps are never re-executed - so you never pay for an LLM call twice.
| Example | Python | TypeScript | What it shows |
|---|---|---|---|
| Sandbox Tools | Python | TypeScript | Code execution in an isolated Docker container |
| Order Processing | Python | TypeScript | Human-in-the-loop fraud review with approvals |
| Multi-Agent Coordination | Python | TypeScript | Workflow orchestrating multiple specialized agents |
| Event-Triggered | Python | TypeScript | Pub/sub event-driven workflows |
| Scheduled Workflows | Python | TypeScript | Cron-based scheduling |
Browse all examples β - agents, workflows, streaming, guardrails, parallel execution, and more.
For detailed documentation, visit polos.dev/docs
- π Quick Start Guide
- π€ Building Agents
- βοΈ Workflow Patterns
- π‘ Events
- β° Scheduling
- π Observability
Join our community to get help, share ideas, and stay updated:
- β Star us on GitHub
- π¬ Join our Discord
- π Read the Docs
We welcome contributions! Whether it's bug reports, feature requests, documentation improvements, or code contributions.
- π Report Issues
- π‘ Feature Requests
- π Contributing Guide
Polos is Apache 2.0 licensed.

