Architecture
Job Modes
Worker
Standard IronClaw agent with proxied LLM calls through the orchestrator
Claude Code
Spawns the official
claude CLI directly for Claude Code workflowsCreating Jobs
Via Tool
Via CLI
Worker Mode
Runs the IronClaw agent inside a container with LLM calls proxied through the orchestrator:Container Configuration
Security Constraints
- No network access (except orchestrator API)
- Read-only filesystem (except /tmp and project dir)
- CPU throttling via cgroup shares
- Memory limits enforced by Docker
- No privileged operations
- Credentials injected via env vars, never in image
Execution Flow
-
Orchestrator creates container
- Generates unique bearer token
- Stores credential grants
- Starts container with orchestrator URL
-
Worker fetches job description
-
Worker fetches credentials
-
Worker runs agent loop
- LLM calls proxied through orchestrator
- Tool execution within container
- Real-time events streamed
-
Worker reports completion
LLM Proxy
The worker usesProxyLlmProvider to forward requests:
Project Directory Binding
Optionally bind a host directory into the container:Claude Code Mode
Spawns the official Anthropicclaude CLI for Claude Code workflows:
Configuration
Container Setup
Execution
Features
- Full Claude Code experience inside sandbox
- Tool filtering via allowlist
- OAuth or API key auth
- Real-time streaming to UI
- Project directory binding for code access
Credential Injection
Credentials are injected at runtime, never baked into images:Grant Definition
Injection Flow
- Job creation: Grants stored in TokenStore
- Worker startup: Fetches credentials via
/credentialsendpoint - Tool execution: Credentials injected into child processes via
Command::envs()
Security Properties
- Never logged (redacted from debug output)
- Never persisted (in-memory only)
- Scoped to job (revoked on completion)
- Process-isolated (not in global env)
Real-Time Events
Jobs stream events to the orchestrator for UI visibility:Event Types
Streaming API
Resource Limits
Memory
--memory flag.
CPU
Timeout
Concurrent Jobs
Container Lifecycle
Creation
Monitoring
Cleanup
Docker API
Uses bollard for Docker interaction:Building Images
Worker Image
Building
Security Considerations
Network Isolation
Network Isolation
Containers have no internet access except the orchestrator API. Use credential injection for external API calls through the host.
Filesystem Sandboxing
Filesystem Sandboxing
Root filesystem is read-only. Only
/tmp and the project directory (if bound) are writable.Privilege Dropping
Privilege Dropping
Containers run as non-root user. No
--privileged flag, no capabilities.Token Security
Token Security
Per-job bearer tokens are generated randomly and stored in-memory only. Tokens are revoked on job completion.
Credential Leakage
Credential Leakage
Credentials are redacted from logs and never persisted to disk. Leak detector scans all outputs.
Next Steps
Channels
Learn about multi-channel support
Configuration
Configure sandbox settings
