Preloop vs Portkey: Agent control plane or AI gateway?
Preloop is the open-source AI agent control plane — an MCP firewall, AI model gateway, human approvals, runtime observability, and audit trail in one self-hostable platform. Portkey is commonly described as a comprehensive AI gateway and LLM ops platform, with deep observability, prompt management, guardrails, SSO, RBAC, and audit trails for LLM applications. The honest one-liner: if your problem is "route LLM traffic and run LLM ops for many applications," Portkey is a strong option; if your problem is "govern AI agents end-to-end, including MCP tool calls, approvals, and runtime sessions," Preloop is built around that shape.
At a glance
| Feature | Preloop | Portkey |
|---|---|---|
| License | Apache 2.0 (open source core) | Commercial / SaaS, with limited OSS components |
| Self-hosted option | Yes, on any infrastructure | Limited (mostly SaaS) |
| MCP-native tool governance | Yes — MCP Firewall with policy-as-code | Out of scope / partial |
| Model gateway with budgets | Yes — OpenAI/Anthropic-compatible, per-agent attribution | Yes — broad provider support, budgets, fallbacks |
| Human approvals (channels) | Yes — mobile, watch, Slack, Mattermost, email, webhook | Limited |
| Runtime agent observability | Yes — session timelines, tool + model calls, decisions | Yes — LLM-call-centric observability, prompt logs |
| Policy-as-code | Yes — YAML + CEL | Yes — guardrails, rules, config |
| Prompt management | Partial | Yes |
| Works with any agent runtime | Yes — Claude Code, Codex CLI, Cursor, Gemini CLI, OpenClaw, OpenCode, any MCP client | Yes — any LLM-using app |
| Gateway latency overhead | Lean (minimal proxy hop) | Commonly reported ~20–40ms at gateway layer |
| Pricing model | Open-source + optional SaaS | SaaS subscription with usage-based tiers |
| Vendor lock-in | Minimal — self-host, fork, extend | SaaS-first |
| Onboards existing local agents | Yes — preloop agents discover |
No direct equivalent |
What Portkey does well
Portkey is a credible LLM ops platform. It is commonly described as:
- A broad AI gateway. Many providers, retries, fallbacks, caching, prompt versioning, and guardrails at the gateway layer.
- Strong LLM observability and prompt tooling. Prompt logs, experimentation, evaluation, and cost dashboards are first-class.
- Enterprise controls. SSO, RBAC, audit logs, and compliance-oriented features for regulated industries.
- Mature adopter base. Large organizations use Portkey as their gateway and LLM ops hub for many applications.
If you are building many LLM-powered features and need a gateway plus prompt management, Portkey is a solid pick.
Where Preloop is different
Preloop and Portkey both include a model gateway, but Preloop is agent-first rather than LLM-app-first.
- MCP tool governance is native. Preloop's MCP Firewall inspects every tool call, evaluates it against policy, and decides whether to allow, deny, require approval, or require justification. Gateway-only products do not sit on the tool path.
- Human approvals on critical tool calls. Preloop routes sensitive actions to mobile, watch, Slack, Mattermost, email, or webhook with full context. Async-safe approval mode lets long-running reviews complete without breaking the agent's transport.
- Runtime session view. One timeline per agent session shows every tool call, every model call, matched policy, approver, spend, and outcome. That is the evidence an SRE, auditor, or security reviewer actually needs.
- Open-source core. Preloop's core is Apache 2.0 licensed and self-hostable. You keep the control plane in your own network.
preloop agents discover. One CLI command rewrites local Claude Code, Codex CLI, Cursor, Gemini CLI, OpenClaw, and OpenCode configurations to route through Preloop — so the gateway, firewall, and approvals cover developer agents on laptops, not just server-side LLM applications.- Lean gateway path. Preloop aims for minimal overhead in the model-call hot path. Gateway-first products that add deep prompt logging and guardrail stacks commonly add ~20–40ms per call; budget that into your latency envelope when comparing.
When to choose Portkey
- Your primary problem is LLM gateway and LLM ops for many applications and many providers, not AI agent governance.
- You want rich prompt management and experimentation tooling as a central feature.
- You are satisfied with a SaaS-first deployment model and do not need to self-host the full control plane.
When to choose Preloop
- Platform and DevEx teams rolling out AI coding agents (Claude Code, Codex CLI, Cursor, Gemini CLI, OpenClaw, OpenCode) who need one-command onboarding and a single control plane for tool calls, model traffic, and approvals.
- Security teams in regulated SaaS that need a self-hostable control plane, policy-as-code, and searchable audit evidence living inside their own network.
- Engineering teams standardizing on MCP that want native tool governance in addition to model routing.
- Open-source-first organizations that need a control plane they can read, fork, and audit.
- Teams building EU AI Act readiness evidence that need durable logs of matched policies, approvers, and outcomes mapped to runtime sessions.
- Teams that care about gateway latency and want a lean path between agent and model, with tool governance layered on top instead of prompt-ops baked into the gateway.
Adoption notes
Preloop and Portkey can coexist. A common pattern is to keep Portkey as the LLM gateway for large LLM-powered product workloads, and use Preloop as the control plane for developer-side AI agents and MCP-based workflows. You can also use Preloop's gateway to reach Portkey upstream, or use Portkey to reach Preloop's managed MCP servers — the choice depends on where you want policy, approvals, and audit to live.
If you are moving off a gateway-only stack, preloop agents discover can onboard developer-side agents in minutes, and server-side agents can be pointed at the Preloop model gateway URL at the same time approvals and MCP policies are introduced.
FAQ
Is there an open-source alternative to Portkey? Preloop is an open-source AI agent control plane released under Apache 2.0. It includes an AI model gateway with budgets and attribution, plus MCP tool governance and human approvals in the same product. For teams whose primary need is a broad LLM gateway only, LiteLLM is another widely used open-source option.
Does Preloop replace my AI gateway? For agent traffic, yes — Preloop's model gateway is OpenAI/Anthropic-compatible and supports multiple providers. For teams with complex prompt-ops workflows already built on Portkey, Preloop is often introduced to cover MCP tool governance, approvals, and runtime observability while leaving the existing gateway in place.
Can Preloop run self-hosted? Yes. The core is Apache 2.0 and deploys on your own infrastructure, in your VPC or on-prem.
What does Preloop add on top of a model gateway? MCP tool governance with policy-as-code, human approval workflows, runtime session observability across tools and models, and a durable audit trail with matched policy, approver, and outcome for every action.
Does Preloop support prompt management? Preloop's current focus is runtime governance — tool access, model traffic, approvals, audit, and runtime sessions. Dedicated prompt experimentation is lighter than Portkey's offering; teams with heavy prompt-ops needs typically pair a prompt-management tool with Preloop.
Does Preloop work with multiple LLM providers? Yes. The model gateway is OpenAI/Anthropic-compatible and can route to multiple providers and models per agent, flow, or API key.