Show HN:Conduct,用于 LLM 和 MCP 工具调用的开源护栏(Guardrails)
Show HN: Conduct, open-source guardrails for LLM and MCP tool calls

原始链接: https://github.com/sseshachala/conductai

Conduct AI 为 AI 智能体提供了一个治理平台,其功能超越了简单的可观测性,实现了主动的运行时强制执行。其核心组件包括:**Conduct Guard**,一个用于实时拦截、警告或审计操作的策略引擎;以及 **Conduct Router**,一个将请求导入这些安全策略的 LLM 代理。 与事后执行的防火墙不同,Conduct 通过加密签名的配置和 SHA-256 哈希链审计日志,在动作发生“之前”强制执行规则,从而确保合规性的可验证性。该系统在三个关键环节保障 AI 交互安全:CLI 钩子、MCP 调用和 API 代理调用。 该平台附带 20 多套合规包(涵盖 SOC 2、HIPAA、PCI DSS 等)以及 22 个预构建的基于 YAML 的剧本,用于 CI/CD 分流和事件响应等任务。开发者可以先通过“发现模式”(Discovery Mode)进行只读可见性分析,然后再启用强制执行功能。Conduct AI 是开源的(Apache 2.0 协议),支持通过 Docker 或 Kubernetes 进行自托管,同时也提供托管服务。通过要求对每一项决策提供加密证明,Conduct 确保了 AI 智能体在预定义的治理边界内运行,并为审计人员提供了明确的证据。

Hacker News | 最新 | 往期 | 评论 | 提问 | 展示 | 招聘 | 提交 | 登录 Show HN: Conduct,用于 LLM 和 MCP 工具调用的开源护栏 (github.com/sseshachala) 7 分,作者:sudhendra1,1 小时前 | 隐藏 | 往期 | 收藏 | 讨论 | 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Two product surfaces, one repo, one policy:

  • Conduct Guard — the policy engine. Decides block / warn / audit / inject for every AI action before it executes, backed by signed configuration and a hash-chained audit log.
  • Conduct Router — the LLM proxy. Point any provider SDK (Anthropic, OpenAI, Perplexity) at Router and every request runs through Guard on the way to the upstream provider.

Governance, not observability

Runtime firewalls like Straiker and Lakera tell you what an agent did. Guard controls what an agent can do — with cryptographic proof.

Runtime firewalls Conduct Guard
Timing After the action Before the action
Config integrity Trust the pack Workspace-signed
Audit Log stream SHA-256 hash chain
Coverage LLM calls only LLM and shell / MCP
Failure mode Fail-open (soft) Fail-closed by default

The three-pillar moat:

  1. Signed configuration — every workspace signs its active policy set. Every Guard check verifies the signature before enforcing. A tampered pack — pushed by anyone, at any layer — is rejected before it can decide anything.
  2. Hash-chained audit — every decision appends to a SHA-256 chain rooted at workspace genesis. Any missing or altered entry breaks the chain and is caught on one-click verification. Evidence you can hand to an auditor.
  3. Policy-first, not detection-first — rules decide before the action executes, with structured reasons. Not anomaly detection after the fact.

Discovery — the free wedge

New here? Start with Discovery mode: read-only visibility into every AI action your team takes for 14 days. No policy to author, nothing to install upstream, no cost. When you're ready to enforce, promote a rule from what Discovery already saw.

conductai.ai/sign-up


git clone https://github.com/sseshachala/conductai
cd conductai
docker compose up
  • API on http://localhost:8000 (Guard + Router live at /guard/* and /proxy/*)
  • Canvas UI on http://localhost:3000
  • Redis worker + Postgres come up in the same stack

Point any provider SDK at Router:

curl https://api.conductai.ai/proxy/anthropic/v1/messages \
  -H "Authorization: Bearer cond_agt_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4-6","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'

Or wrap your CLI hooks with Guard:

pip install conduct-cli
conduct login
conduct sync        # installs hook + MCP, pulls policies

Now every Claude Code, Cursor, Copilot, ChatGPT, or Codex session on that machine is governed by the same active packs.


Component Path
Guard runtime apps/api/app/modules/guard/
Router (proxy) apps/api/app/modules/guard/routers/proxy.py
Compliance packs apps/api/app/modules/guard/skill_packs/
Canvas UI apps/web/
Playbook DSL loader apps/api/app/dsl/
Playbook library apps/api/playbooks/ (22 pre-built)
CLI packages/conduct-cli/

20+ compliance packs ship out of the box: OWASP, SOC 2 CC7.3, HIPAA §164.312, PCI DSS 4.0, EU AI Act Art. 15/16, NIST AI RMF, ISO 42001, and framework-specific packs for Python, Node, and Terraform.

22 pre-built playbooks: Issue → PR, code review, incident response, prod deploy gate, CI/CD triage, security scanner triage, Slack digest, and more. Each is one YAML file; edit-and-run.


   Developer / agent                     Guard control plane
   ─────────────────                     ───────────────────
   Claude Code   ──┐                     ┌── Canvas UI (Next.js)
   Cursor        ──┤   CLI hook  ────►   ├── FastAPI + policy engine
   Copilot       ──┤   (cond_cli)        ├── Postgres (state, audit)
   Codex         ──┘                     ├── Redis (workers, queues)
                     ┌──── MCP  ────►    └── Hash chain (SHA-256)
   Any SDK       ────┤
   (Anthropic,       └── Router ────►    Upstream provider (Anthropic,
    OpenAI,             /proxy/*         OpenAI, Perplexity, ...)
    Perplexity)

Guard checks fire at three chokepoints:

  • CLI hook — every Claude Code / Cursor / Copilot / Codex tool call.
  • MCP layer — every MCP tool invocation.
  • Router — every LLM call by any SDK.

One policy, three enforcement surfaces.


  • Self-host with docker compose — the command above. Runs everything locally.
  • Self-host on Kubernetes — deployment templates ship in issue #1149.
  • Hostedconductai.ai. Free tier includes Discovery; paid tiers unlock enforcement + Router + hash-chain verification API.

  • SECURITY.md — vulnerability reporting policy, scope, coordinated disclosure, and safe harbor.
  • Threat model — system context, trust boundaries, attacker goals, mitigations, and residual risks.
  • Policy decision contractguard_check decision semantics and fail-mode behavior.
  • Audit log verification — independent prev_hash/entry_hash chain verification procedure and example script.
  • API versioning — proxy/MCP compatibility, deprecation windows, and OpenAPI publication guidance.

Apache License 2.0 — the entire repository, including the CLI, Guard, Router, Agent Booster, playbooks, and packs.

  • Free for commercial and non-commercial use, modification, and redistribution.
  • Includes an explicit patent grant from all contributors (Apache 2.0 §3).
  • Trademark rights are not granted; see NOTICE — "Conduct", "Conduct AI", and "Conduct Guard" remain trademarks of Conduct AI.
  • Redistribution must preserve the LICENSE and NOTICE files.

The hosted control plane at conductai.ai (canvas UI, team RBAC, marketplace, managed Guard) is a commercial offering built on top of this repository.

For enterprise support, indemnification, or licensing questions, email [email protected].


We accept bug reports, docs fixes, new playbooks, new packs, tests, and code. Read CONTRIBUTING.md first.

⭐ If Conduct saves your team time, star it — it helps other teams find it.

联系我们 contact @ memedata.com