Preloop 标志

Preloop

组织
preloop

The open-source AI agent control plane: MCP firewall, model gateway with budgets, human approvals, runtime observability, and audit trails

发布者preloop
代码仓库preloop
语言Python
复刻数
15
星标数
66
可用工具
0
传输类型stdio
分类
许可协议Apache-2.0
链接
  • 将工具接入 AI 工作流

    Preloop 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 66 个 Star 和 15 个 Fork。

Preloop

CI Release PyPI Python 3.11+ License

The open-source AI agent control plane. See them, govern them, cut their cost.

Preloop is one self-hostable service that sits between your AI agents and everything they reach, so every tool call and every model call is governed, attributed, and visible. Four pillars:

  • MCP firewall. Allow, deny, or require approval on any tool call.
  • AI model gateway. OpenAI-, Anthropic- and Gemini-compatible ingress, with budgets, allowed-model lists, token accounting, and attribution.
  • Policy-as-code with human approvals. YAML plus CEL. Approve from mobile, watch, Slack, Mattermost, email, or the CLI.
  • Runtime session observability. One timeline per session: tool calls, model calls, policy, approvals, spend, outcomes.

Onboard existing agents with one command. Talk to long-running ones from the console, phone, or watch. Deploy event-driven automations when GitHub, GitLab, Jira, or a webhook fires. Works with OpenClaw, Claude Code, Codex CLI, Cursor, Gemini CLI, Hermes, OpenCode, Windsurf, and any MCP-compatible agent.

Flow presets can review pull requests, implement issues, scan for vulnerabilities, collect machine evidence for CRA- and EU AI Act-style reviews (SBOM verify, exploit check); Runtime Observability keeps the session timeline next to it. That is not a conformity assessment, certification, or legal advice. Presets: security audit presets.

Your first five minutes, start to finish:

bash
# 1. Install the CLI (macOS / Linux)
curl -fsSL https://preloop.ai/install/cli | sh

# Windows (PowerShell): irm https://preloop.ai/install/cli.ps1 | iex
# Details: docs/windows-cli.md

# 2. Connect it to a control plane
preloop signup                                # Preloop Cloud (fastest), or
preloop login --url http://localhost:3000    # your self-hosted instance

# 3. Bring local agents under governance
preloop agents discover

preloop agents discover finds local agent configs, imports representable MCP servers and model metadata, mints managed credentials, and rewrites supported agents so tool calls go through the MCP Firewall and model traffic through the Gateway. For Talk (operator commands), the CLI can install the runtime plugin (preloop agents install-plugin, or preloop claude for Claude Code). The plugin is what keeps the control channel connected.

Pi and DeepSeek Harness support CLI onboarding, gateway routing, native tool approvals, active-session remote control, and ephemeral flows. Onboard with preloop agents onboard Pi --approvals or preloop agents onboard "DeepSeek Harness" --approvals.

Watch it work

Onboarding, the MCP firewall, human approvals, and cutting session cost. Recorded against a real stack, no slideware.

Guides: docs.preloop.ai. Start here: onboard local agents (60s).

A run in progress is not out of reach. Operator notes let an identified human (or, with an opt-in tool, another agent) steer a running agent: the note is delivered at the next turn boundary through the gateway or a hook, costs nothing when there is none, and is recorded with who sent it. Send one from the console, the API, or preloop notes send. The account kill switch goes the other way: it blocks gateway and tool traffic, freezes pending approval deadlines, and requests termination of active managed flow executions, with audited staged recovery.

Finished runs stay searchable, in the console, from preloop sessions search, and by an agent that has been given the search_sessions tool. Keyword ranking is always available, semantic and hybrid ranking are a per-account opt-in, every search is audited, and a question worth repeating can be saved under a name. Two exports turn the agent inventory and the failure record into files an auditor can read: DORA: the AI-agent slice. They feed an Art. 8 inventory and an Art. 28 register, and list Art. 17 incident candidates. Classification stays with your firm, and Preloop covers the agent slice of the ICT estate only.

What you get

Jobs teams otherwise buy from several vendors, in one Apache 2.0 stack:

CapabilityWhat it doesAlternatives
MCP FirewallGovern every tool call. Allow, deny, require approval, require justification. YAML + CEL.MintMCP, Lunar.dev MCPX, TrueFoundry
AI Model GatewayOpenAI-, Anthropic- and Gemini-compatible. Budgets, allowed-model lists, token accounting, attribution.Portkey, Helicone, LiteLLM, Kong AI
FlowsStart an agent when a tracker, webhook, or CI job fires, with the same firewall, approvals, and cost. preloop flow trigger.Custom CI glue, AgentCore Runtime
Cost & BudgetsSpend by model, agent, session, API key, flow, and user, including usage you import when the model never hits the gateway.FinOps dashboards, vendor billing exports
Human ApprovalsMobile, watch, Slack, Mattermost, email, webhook, or preloop approvals. Native Bash/Edit. Agents can ask_user.Custom Slack bots, Peta Desk
Runtime ObservabilityOne session timeline: tool calls, model calls, policy, approvals, spend, outcomes.AgentOps, Langfuse, LangSmith
Evidence packsApache flow presets write result.json plus an evidence directory for CRA / AI Act-style work. Not a certification.Custom GRC folders

Upstream providers include OpenAI, Anthropic, Google, AWS Bedrock, Alibaba Cloud Model Studio (Qwen), DeepSeek, Mistral, Moonshot (Kimi), Z.ai (GLM), OpenRouter, and any OpenAI-compatible endpoint you configure. Reviewed model pricing distributes verified tariffs to gateway, API, and worker processes, and Alibaba tariffs preserve regional and cache-policy differences. The weekly review preset prepares tested pricing PRs after you bind its repository and model; historical repricing is a separate operation. Models or billing modes without verified rates remain visibly unpriced. OTLP export is off by default; turn it on and governed model calls and MCP tool calls emit OpenTelemetry GenAI spans to any OTLP backend, without replacing the spend ledger.

text
AI Agent → Preloop → [Policy]  → Allow / Deny / Require Approval → Execute
                   → [Gateway] → Budget + attribution             → Model

Connect GitHub, GitLab, or Jira as flow triggers and issue tools. Automations ship as presets, including the Issue Triage Assistant, Pull Request Reviewer and Observe / Eval. Or write your own. A flow can also start another flow of the same account as a child of itself, and the execution page shows the resulting tree: flow delegation. Automated issue implementation can resume its PR branch and native agent conversation after review or CI feedback, with durable turn budgets and current-head gates. A finished run whose PR publication was not recorded can be recovered by explicitly selecting and verifying its published PR and branch; when the native checkpoint is unavailable, follow-up requires acknowledgment that it starts a fresh conversation.

CI can trigger a flow too: the run-flow GitHub Action (.github/actions/run-flow) starts a flow from a workflow job, streams the execution log, and fails the job on the execution's verdict. Where the agent container runs is your choice. Private runners run it on your own machines over an outbound WebSocket, with no inbound ports: preloop runner fg holds several executions at once (default 2), and --once --ephemeral is a one-shot runner that exists for a single CI job.

Policy-as-code

yaml
version: "1.0"
metadata:
  name: "Production Safeguards"

approval_workflows:
  - name: "deploy-approval"
    timeout_seconds: 600
    required_approvals: 1
    async_approval: true

tools:
  - name: "bash"
    source: mcp
    approval_workflow: "deploy-approval"
    justification: required
    conditions:
      - expression: "args.command.contains('deploy') && args.command.contains('production')"
        action: require_approval

Ship it with preloop policy apply <file> (validate / diff / export also exist).

Talk details for OpenClaw, Hermes, and Claude Code: OpenClaw, Hermes, runtime adapters.

Getting started

The CLI is a client. It talks to a control plane: Preloop Cloud or a stack you run.

Cloud (fastest)

bash
curl -fsSL https://preloop.ai/install/cli | sh
preloop signup
preloop agents discover

Self-host (Docker Compose, data stays on your machine)

bash
curl -fsSL https://preloop.ai/install/oss | sh
curl -fsSL https://preloop.ai/install/cli | sh
preloop login --url http://localhost:3000
preloop agents discover

Console: http://localhost:3000. The CLI stores the instance URL in ~/.preloop/config.yaml. Without --url or PRELOOP_URL, it defaults to https://preloop.ai. preloop auth logout clears this machine; preloop auth logout --all also revokes every other CLI and console session. Command list: CLI authentication.

Public TLS, SMTP (approvals, invites, password resets), upgrades, and Kubernetes: Install the OSS stack, TLS, Upgrading. Helm chart: helm/preloop (private cluster). Docker Compose and Helm are the supported install surfaces; this repository does not ship Terraform modules.

Production self-host: SECRET_KEY is required or the app refuses to start. Telemetry is a daily pseudonymous version check-in; set PRELOOP_DISABLE_TELEMETRY=true to disable. Event list: SECURITY.md.

Working in this repository

This file is the product intro. It is not the architecture and not the coding contract.

If you needRead
How the system fits togetherARCHITECTURE.md is the map. Read one chapter under docs/architecture/ for the subsystem you are changing. Do not load every chapter "for context."
Commands, DB/CRUD rules, Lit frontendAGENTS.md
PR processCONTRIBUTING.md
Operator and client guidesdocs.preloop.ai
Policy examplesbackend/presets/

Do not load this README plus ARCHITECTURE.md end-to-end "for context." Pick the row above.

Open-source alternative to AWS Bedrock AgentCore

Same core jobs (runtime, gateway, identity, observability, policy), vendor-neutral and self-hostable. Full comparison: preloop.ai/vs/aws-agentcore.

PreloopAWS Bedrock AgentCore
Open source (Apache 2.0)YesNo
Self-hostable (VPC / on-prem)YesNo
Policy-as-code (YAML + CEL)YesLimited
MCP-native tool governanceYesPartial
Human approvals (mobile, Slack, webhook)YesLimited
Onboard existing local agents (preloop agents discover)YesNo

Also compare: LiteLLM, Portkey, Helicone, MintMCP, Lunar, Runlayer, Zenity.

Editions

Unqualified Preloop is this repository (Apache 2.0, self-hosted). Preloop Cloud is the hosted service at preloop.ai. Preloop Enterprise is the commercial self-hosted edition.

Cloud is managed hosting. Cloud and Enterprise include support plans. Cloud billing owners can compare the available usage from the previous three completed months in Account settings before requesting a plan-change quote. Missing history is labeled explicitly; a change requires confirmation of its price, limits and effective date. Cloud plan limits do not apply to the open-source self-hosted edition.

Governance itself is open source: every model provider, flows, private runners, session search, operator notes, single-approver workflows and budgets scoped to the account, a flow, an API key or a managed agent all ship in this repository. What is commercial is the organizational layer on top of them: more than one approver, quorum, escalations, budgets scoped to a user or a team, budget notification routing, and users, teams and RBAC on one account. Cloud usage allowances and hosted credits are a separate thing from governance budgets.

FeatureOpen SourceCloud / Enterprise
Users, teams, and RBAC on one accountNoYes
Budgets scoped to a user or a team, budget notification routingNoYes
Multi-approver routing, quorum, escalationsNoYes

A self-hosted OSS instance is one operator per account. Public signup, if left on, creates a separate account, not a teammate. Invitations, users, teams, and permission roles ship with Cloud and Enterprise.

Enterprise licensing: sales@preloop.ai.

Community

Discord for help, feedback, and the founder's build log.

Contributing

See CONTRIBUTING.md.

The disposable capacity lab measures authenticated MCP, model-gateway and execution-log workloads using local simulated providers.

License

Apache License 2.0. Copyright (c) 2026 Spacecode AI Inc.

Release assets carry signed Sigstore build provenance and checksums. See verification instructions.

Windows CLI release binaries pass a required Defender scan and ten-minute observation before publication. Optional VirusTotal scanning and SignPath Authenticode signing provide additional release checks; signing is pending. windows-cli.md, windows-code-signing.md, code-signing-policy.md.

Free code signing provided by SignPath.io, certificate by SignPath Foundation.

Execution environment profiles and hosted checkpoint recovery are documented in Environments and recovery.

Operators can enable verified SSH and GCP agent deployment from the console. See remote agent deployment for host-key verification, dedicated cloud credentials, and proxy timeout configuration.

将 Preloop MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Preloop 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 Preloop 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Preloop MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "preloop": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Preloop MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Preloop MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Preloop 帮我完成这项任务吗?
Preloop
当然。我已阅读。
以下是我使用 Preloop 得到的结果。

常见问题

Preloop MCP 服务器有什么用途?

Preloop 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Preloop MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 Preloop,而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 Preloop MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 Preloop 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Preloop MCP 连接到 TypingMind?

Preloop 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Preloop MCP 在 TypingMind 中提供哪些工具?

Preloop 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Preloop MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 Preloop 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇