RFC: Hybrid Local + Cloud Agent Architecture for Enterprise Deployments
As Agent Orchestrator evolves beyond individual developer workflows, it would be valuable to introduce an architecture that allows agent execution to span local machines, enterprise infrastructure, and cloud compute while preserving AO's existing orchestration model.
This RFC proposes separating task orchestration from task execution, allowing the scheduler to dispatch work to different execution backends based on policy, capabilities, or organizational requirements.
Motivation
Today, Agent Orchestrator assumes that agent sessions execute on the local machine.
For enterprise deployments, organizations often have additional requirements:
- Sensitive repositories must execute only on internal infrastructure.
- GPU-intensive tasks should run on dedicated cloud machines.
- Long-running agents should continue after a developer disconnects.
- Organizations may have shared pools of agent workers.
- Different teams may require different execution environments.
Instead of treating execution as inherently local, AO could treat execution environments as interchangeable backends.
Proposed Architecture
Separate the system into two responsibilities:
1. Control Plane
Responsible for:
- Task planning
- Agent lifecycle
- Session management
- Worktree management
- CI feedback routing
- Merge conflict handling
- Review routing
- Scheduling
The control plane does not execute agents directly.
2. Execution Plane
Responsible for actually running agents.
Possible execution targets include:
- Local workstation
- Enterprise workstation
- On-prem worker
- Cloud VM
- Kubernetes worker
- GPU worker
Each worker exposes a common execution interface.
Agent Orchestrator
(Control Plane)
│
Scheduling Decision
│
┌───────────────────┼────────────────────┐
│ │ │
▼ ▼ ▼
Local Executor On-Prem Worker Cloud Worker
│ │ │
▼ ▼ ▼
Claude/Codex Claude/Codex Claude/Codex
Worker Abstraction
Execution environments implement a common interface regardless of where they run.
Conceptually:
type Worker interface {
Start(Session) error
Stop(Session) error
StreamLogs(Session)
Health()
}
This keeps scheduling independent from execution.
Scheduling
Initially, scheduling could remain simple:
- Local
- Remote
- Auto
Future scheduling decisions could consider:
- Repository sensitivity
- Available GPU resources
- Cost
- Queue depth
- Worker health
- Enterprise policies
Why This Architecture
Separating orchestration from execution provides several benefits:
- Local-first development remains unchanged.
- Enterprise deployments can introduce shared worker pools.
- Cloud execution becomes an implementation detail rather than a special case.
- New execution environments can be added without changing orchestration logic.
Possible Future Extensions
This architecture naturally enables future capabilities such as:
- Hybrid local/cloud execution
- Auto-scaling worker pools
- Organization-wide worker fleets
- Cost-aware scheduling
- GPU-aware scheduling
- Enterprise policy integration
- High-availability execution
- Multi-region workers
Open Questions
- Should workers maintain persistent sessions or be ephemeral?
- Should worktrees be created locally or remotely?
- How should artifacts and logs be synchronized?
- Should workers pull repositories directly or receive snapshots?
- How should disconnected workers recover running sessions?
- How should execution policies interact with scheduling decisions?