Skip to content

replicate-mcp-agents v0.8.0

Orchestrate 50,000+ Replicate models like one system

replicate-mcp-agents is a Python framework that exposes Replicate-backed agents as native MCP tools and wraps every call in a production layer: learning bandit routers, per-model circuit breakers, QoS tiers, distributed workers, and OpenTelemetry observability.

  • 1,150 tests · ~90% coverage
  • 3 MCP transports
  • 15 stable subsystems
  • Python 3.10+ · Apache-2.0

Find your path

How it works

Every call moves through three stages. The framework's value is that each stage is independently tuned, observed, and isolated — so one slow or failing model never takes your pipeline down with it.

  1. Register

    Decorate a function with @agent(model="meta/meta-llama-3-8b-instruct") or use AgentBuilder. The agent's metadata — cost, latency, tags, schema — becomes an MCP tool definition.

  2. Route

    A QoS policy filters out models that violate hard caps, then the bandit router (UCB1 for the first 20 calls, Thompson Sampling after) picks the best cost/latency/quality trade-off.

  3. Execute & learn

    The call runs inside a per-model circuit breaker with jittered retries, results stream back (and into the cache), and the recorded outcome updates the router's posterior for next time.