Overview
AgentCtrl provides a unified API that works across multiple CLI-based code agents. This enables runtime switching between different backends (Claude Code, OpenCode, Codex, Gemini) without changing your application code. Useful for comparing agent performance, failover scenarios, or A/B testing. Key concepts:AgentTypeenum: Specify which agent backend to use- Unified API: Same methods work across all agent types
- Runtime selection: Choose agent dynamically based on configuration or logic
- Agent-specific configuration: Apply custom settings per agent type
Example
Expected Output
Key Points
- Unified API: Same interface across all agent backends
- Runtime selection: Choose agent dynamically based on requirements
- Agent comparison: Run the same prompt across multiple agents to compare
- Failover capability: Try alternative agents if primary fails
- Agent-specific tuning: Apply configuration based on agent characteristics
- Performance comparison: Measure response time and cost across agents
- Use cases: A/B testing, load balancing, fallback strategies, feature parity testing
- Available agents: Claude Code, OpenCode, Codex, Gemini (via
AgentTypeenum)