Multi-Provider Agent APIs: Switch Between OpenAI, Gemini, Claude, and Ollama in 1 Line
Locking your agentic workflows into a single LLM provider exposes your application to vendor outages, price increases, and rate limit bottlenecks. Smoke Monkey Harness provides a unified, model-agnostic interface across all major providers.
Multi-Provider Agent APIs: Switch Between OpenAI, Gemini, Claude, and Ollama in 1 Line: Locking your agentic workflows into a single LLM provider exposes your application to vendor outages, price increases, and rate limit bottlenecks. Smoke Monkey Harness provides a unified, model-agnostic interface across all major providers. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- One Unified API: Same tool calling, streaming, and state machine across all providers.
- Zero Refactoring to Switch: Change `provider: "gemini"` to `provider: "anthropic"` or `provider: "ollama"`.
- Provider Failover: Automatically fall back to secondary providers if a primary API experiences downtime.
Unified Model Configuration
Smoke Monkey normalizes provider-specific differences in tool calling formats, message roles, and streaming deltas:
import { createAgent } from 'smoke-monkey-harness';// Works with any provider:const provider = process.env.AGENT_PROVIDER || 'gemini';const agent = createAgent({provider,model: provider === 'gemini' ? 'gemini-1.5-pro' : 'claude-3-7-sonnet',workspacePath: process.cwd(),});
Frequently Asked Questions
Q:Do tool signatures need to change when switching providers?
No! Smoke Monkey automatically translates standard JSON schema tool definitions into the exact payload formats expected by OpenAI, Anthropic, Google, and Ollama.
Related Alternatives & Comparisons
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.