How parcha-ai/agentrun works
AgentRun is a platform for running agents with durable execution, computer access, learning, and a control plane. Users configure an agent or workflow in the console or through an API, start a run, and inspect its results and state. The server validates and launches work through a harness and runner; runs use configured models and optional computer environments, while the store supports persistence and recovery. Learning, workflow authoring, approvals, and operational analytics are distinct product capabilities. The graph follows documented capabilities and sampled imports/calls; several feature implementations are unsampled, so their links are documented or left unverified.
Main entry points: server.ts AgentRun server · run-launch.ts Run launch · learning-routes.ts Learning API · harness-table.ts Harness registry
Components 25
Control plane
- Console
apps/console/src/App.tsx - Console API client
apps/console/src/lib/client.ts
Run execution
- AgentRun server
packages/serve/src/server.ts - Agent validation
packages/serve/src/validate.ts - Run launch
packages/serve/src/run-launch.ts - Harness registry
packages/serve/src/harness-table.ts - Model routing
packages/serve/src/model.ts - Runner dispatch
packages/serve/src/runner/main.ts - Durable run store
packages/serve/src/store/journal/storage.ts
Learning and workflows
- Learning API
packages/serve/src/learning-routes.ts - Learning engine
packages/serve/src/learning.ts - Learned skills
packages/serve/src/learn/skills.ts - Workflow authoring
packages/dsl/src/author-references.ts
Computer environments
- Computer SDK
packages/computer/src/protocol.ts - Computer UI engine
packages/computer/src/ui-engine.ts - Computer daemon
packages/computer/daemon/cmd/computerd/main.go - macOS UI driver
packages/computer/daemon-macos/Sources/ComputerdKit/UI/Engine.swift - Browser live view
packages/pi-browser/src/live-view/server.ts
Clients and integrations
- TypeScript SDK
packages/client/src/client.ts - Python SDK
python/agentrun/_client.py - AgentRun CLI
packages/agentrun/lib/cli.mjs
Other components
- Agent operator
- Model provider
- Agent harness
- Computer environment
Connections 28
- Agent operator → Console: configures and starts
- Console → Console API client: uses API
apps/console/src/App.tsx - Console API client → AgentRun server: sends requests
apps/console/src/lib/client.ts - Agent operator → TypeScript SDK: starts runs
- Agent operator → Python SDK: starts runs
- Agent operator → AgentRun CLI: starts platform
- TypeScript SDK → AgentRun server: sends requests
- Python SDK → AgentRun server: sends requests
- AgentRun CLI → AgentRun server: starts server
- AgentRun server → Agent validation: validates inputs
- AgentRun server → Run launch: launches runs
- AgentRun server → Learning API: routes learning
packages/serve/src/server.ts - AgentRun server → Durable run store: persists state
- Run launch → Harness registry: selects harness
- Run launch → Model routing: resolves model
- Runner dispatch → Durable run store: opens store
packages/serve/src/runner/main.ts - Runner dispatch → Harness registry: resolves run loop
packages/serve/src/runner/main.ts - Harness registry → Agent harness: dispatches work
- Model routing → Model provider: routes inference
- Learning API → Learning engine: uses learning logic
packages/serve/src/learning-routes.ts - Learning API → Learned skills: checks skills
packages/serve/src/learning-routes.ts - Learning engine → Durable run store: stores learning
- Workflow authoring → AgentRun server: defines workflows
- Computer SDK → Computer UI engine: defines UI protocol
packages/computer/src/ui-engine.ts - Computer UI engine → Computer environment: drives interactions
- Computer daemon → Computer environment: serves computer protocol
packages/computer/daemon/cmd/computerd/main.go - macOS UI driver → Computer environment: drives macOS UI
- Browser live view → Computer environment: streams live view