How colemurray/background-agents works
Open-Inspect is a hosted background coding-agent system. A user or integration starts a coding session through the control plane, which authorizes and initializes a session, provisions a sandbox, and connects it to the agent runtime; session events, artifacts, and results return through control-plane APIs and storage. The README also documents multiplayer, scheduled and event-driven automations, parallel child sessions, and model-provider choices, represented here as capabilities without assuming unsampled call wiring. Source excerpts support the attachment-storage and sandbox-lifecycle links; other links follow the README architecture and module names, with implementation details not sampled.
Main entry points: server.ts Session runtime · hono-app.ts HTTP routing · manager.ts Sandbox lifecycle · manager.py Agent environment
Components 24
Entry and identity
- HTTP routing
packages/control-plane/src/routing/hono-app.ts - Identity and auth
packages/control-plane/src/auth/authenticate.ts - Access control
packages/control-plane/src/authorization/service.ts
Session orchestration
- Session APIs
packages/control-plane/src/routes/sessions.ts - Session runtime
packages/control-plane/src/session/server.ts - Realtime collaboration
packages/control-plane/src/session/websocket-manager.ts - Events and messages
packages/control-plane/src/session/event-stream.ts - Attachments and media
packages/control-plane/src/session/services/session-attachment-storage.ts
Sandbox execution
- Sandbox lifecycle
packages/control-plane/src/sandbox/lifecycle/manager.ts - Sandbox providers
packages/control-plane/src/sandbox/provider-factory.ts - Agent environment
packages/modal-infra/src/sandbox/manager.py - Sandbox images
packages/control-plane/src/image-builds/workflow.ts
Automation and providers
- Automations
packages/control-plane/src/routes/automations.ts - Scheduled work
packages/control-plane/src/scheduler/scheduler.ts - Model connections
packages/control-plane/src/model-provider-accounts/service.ts - Source control
packages/control-plane/src/source-control/index.ts
Persistence and hosting
- Control-plane data
packages/control-plane/src/db/sql-database.ts - Session state
packages/control-plane/src/session/sql-storage.ts - Object storage
packages/control-plane/src/storage/object-storage.ts - Runtime hosts
packages/control-plane/src/cloudflare/platform.ts
Other components
- Web and integrations
- GitHub
- Slack and Linear
- AI model providers
Connections 30
- Web and integrations → HTTP routing: send requests
- HTTP routing → Identity and auth: authenticate
- HTTP routing → Access control: check access
- HTTP routing → Session APIs: dispatch
- Session APIs → Session runtime: manage sessions
- Session runtime → Session state: read and write
- Runtime hosts → Session runtime: host
- Session runtime → Sandbox lifecycle: provision and resume
- Sandbox lifecycle → Sandbox providers: select provider
- Sandbox providers → Agent environment: create environment
- Sandbox lifecycle → Sandbox images: select image
- Sandbox lifecycle → Session state: persist lifecycle
- Agent environment → Session runtime: send runtime events
- Session runtime → Events and messages: record and stream
- Session runtime → Realtime collaboration: serve collaboration
- Session runtime → Attachments and media: store attachments
- Attachments and media → Object storage: put and delete
- Attachments and media → Session runtime: register metadata
- Session APIs → Automations: configure work
- Automations → Scheduled work: schedule runs
- Scheduled work → Session runtime: start sessions
- Slack and Linear → Automations: trigger work
- GitHub → Automations: send events
- Session runtime → Model connections: resolve model access
- Model connections → AI model providers: authorize accounts
- Agent environment → AI model providers: run agent
- Agent environment → Source control: use repositories
- Source control → GitHub: git and PR operations
- Session runtime → Control-plane data: persist control data
- Session runtime → Object storage: store media