Skip to main content

Architecture: Provider-Agnostic Agent Orchestration

Problem Statement

Current agent systems (Claude Code, Cursor, Copilot Workspace) are tightly coupled to a single LLM provider. This creates:

  • Vendor lock-in — switching providers means rewriting the entire agent layer
  • No cost optimization — can't route cheap tasks to cheap models
  • Single point of failure — if the provider goes down, everything stops
  • No hybrid deployment — can't mix cloud and local models

Core Abstractions

ConceptDescription
ProviderLLM backend (Claude, GPT, Gemini, local). Swappable per agent.
AgentAutonomous unit with role, tools, provider. Stateless between tasks.
SkillReusable capability. Provider-independent.
OrchestratorCoordinates agents, routes tasks, enforces anti-stall.
CooperationInter-agent delegation, artifact sharing, conflict resolution.
StateGraphLangGraph-inspired directed graph engine for orchestration flows.

Agent Team

Mapping from Claude Code

Claude CodeThis FrameworkNotes
model: sonnet/opus/haikuprovider: "claude-sonnet"Provider is explicit, not implicit
Agent .md filesAgentConfig YAML/PythonRicher config, same concept
Agent tool (subagent)orchestrator.delegate()Provider-agnostic delegation
Skills (slash commands)SkillRegistryDecoupled from any LLM
Hooks (PostToolUse etc.)EventBus + handlersSame pattern, more extensible
CLAUDE.mdProject config YAMLNot tied to Claude namespace
Memory (MEMORY.md)ContextStorePersistent cross-session state

Anti-Stall Protocol

Every agent enforces:

  1. Step limit — configurable max steps per task (default: 10)
  2. Retry cap — max 3 attempts per approach, then escalate
  3. Timeout — hard wall-clock timeout per agent task
  4. Progress reporting — agents emit progress events the orchestrator monitors
  5. Deadlock detection — if two agents wait on each other, orchestrator breaks the cycle