
Yagami AI Context Firewall
io.github.MatthewTracy由 GitHub 帳號 MatthewTracy 發布v0.8.6更新於 Nov 3, 2026
開源 AI 上下文防火牆,用於受管控的模型、檢索、記憶和工具存取。
AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。
原文描述
Open-source AI context firewall for governed model, retrieval, memory, and tool access.
概覽
Yagami AI Context Firewall 的本機 MCP 服務;無需登入;STDIO。
暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Yagami AI Context Firewall,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Yagami
An AI router that chooses models and protects privacy.
Yagami automatically routes requests to local or cloud models based on the task and your privacy policy. Detected sensitive information, including PHI, stays local under the default policy. Local models can reduce cloud API costs; more demanding work and image generation can use cloud providers when allowed.
[CI] [PyPI] [Python] [License: MIT]
Documentation | Gateway API | Deployment | Security | Roadmap
Watch Yagami in action
[Preview of Yagami generating an image with the cloud route highlighted]
Watch the 59-second demo: local
answers, a fictional patient case kept on the machine, and cloud image
generation. The recording uses real models, synthetic patient information,
and configured providers with yagami serve. The no-credential demo below
keeps cloud routing disabled.
Try it in 60 seconds
The no-credential demo uses your configured Ollama model when it is installed; otherwise it opens a clearly labeled policy-only fallback. Choose one command:
Open http://127.0.0.1:8000, or use
docker compose -f compose.demo.yaml up from a clone. Demo mode blocks cloud
routing while exercising the UI, policy, lineage, storage, and audit path. For
local AI answers, install Ollama and run
ollama pull llama3.2:3b-instruct-q4_K_M before starting the demo.
[Yagami workspace with conversation history, chat, and session insights]
Yagami is for developers and platform/security teams that need to control where agent context goes and which tools it may execute. For example: a coding agent can keep repository secrets on-device and require an identity-bound, one-time approval before a dangerous tool call.
Yagami sits between software and local models, cloud LLMs, retrieval systems,
memory, and tools. Existing OpenAI SDK applications can adopt it by changing
one base_url; Yagami then classifies context locally, applies versioned
policy, and records content-free evidence for each decision.
Take the no-data security tour or run the flagship security demos for secret containment, poisoned retrieval, and identity-bound tool approval.
Protect an application
Initialize persistent user configuration, check the host, and start Yagami:
Install yagami[providers] when the Yagami process or the example client uses
Anthropic/OpenAI-compatible SDKs. PDF ingestion and OS key storage are separate
ingest and desktop extras; see configuration.
Then point an OpenAI client at the gateway:
Supported caller sensitivity values are none, phi, phi_medical, and
secret. A caller hint can make the policy stricter; it cannot lower a
sensitivity detected by Yagami.
For production authentication, policy, and deployment settings, follow the deployment guide.
Why teams use Yagami
- Deterministic containment after classification. Once context is labeled as PHI or secret, default policy permits local backends only. Sensitive history and tool results inherit the same restriction.
- One governed data plane. Chat Completions, Responses, the browser chat, and MCP use the same policy, lineage, transformation, output-DLP, budget, and audit pipeline.
- Policy as code. Preview and replay decisions, run regression cases in CI, and promote deterministic Ed25519-signed policy bundles.
- Evidence without prompt logging. Policy passports, hash-chained audit records, Prometheus metrics, and OpenTelemetry spans carry labels, hashes, IDs, and counts rather than prompt or completion content.
- Model choice without policy duplication. Route to local engines, direct cloud providers, or an existing OpenAI-compatible gateway behind one enforcement point.
- Governed tools. Evaluate function tools and MCP calls before execution, require short-lived one-time approvals, and keep inbound credentials from being forwarded to downstream servers.
Core capabilities
Models and integrations
Local generation works with Ollama, llama.cpp through
the optional llama-cpp-python runtime, and Microsoft Foundry Local through
its loopback OpenAI-compatible service. Direct cloud adapters cover Anthropic,
OpenAI, Mistral, Groq, OpenRouter, Google Gemini, and Stability AI image
generation.
Yagami also works with LangChain/LangGraph, the Vercel AI SDK, Microsoft Presidio, Splunk HEC and generic SIEM webhooks, Slack and Teams approval notifications, and upstream gateways such as LiteLLM, Portkey, Kong, or Envoy. See the integration recipes.
How it compares
Yagami is not trying to replace every gateway, validator, or security scanner. Its focus is deterministic post-classification containment, governed tool execution, and content-free decision evidence. See the honest comparison guide for when LiteLLM, Guardrails AI, NeMo Guardrails, Presidio, LlamaFirewall, or a direct provider SDK is the better choice—and how to combine them with Yagami.
How enforcement works
Policy is the final authority. Slash commands and explicit backend selection cannot override a sensitive-data restriction. Classifier failures fail local by default, and cloud routes can be blocked entirely or stopped at a daily spend cap.
Important limitations
Yagami is an enforcement component, not a compliance certification. Automated detection can miss sensitive data. Strict deployments should declare sensitivity at the caller, use a local-only policy, test organization-specific cases, encrypt storage at the host or volume layer, and review the threat model.
The project is alpha. Validate policy and failure behavior against your own requirements before production use.
Documentation
Contributing
Focused issues and pull requests are welcome. Read CONTRIBUTING.md, the security policy, and the code of conduct.
License
MIT - Copyright (c) 2026 Matthew Tracy and Yagami contributors.
來源:README.md,提交 c56fc99
工具
0版本歷史
4- v0.8.6最新Nov 3, 2026
- v0.8.4Oct 30, 2026
- v0.8.3Oct 6, 2026
- v0.7.3Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分