io.github.getaegis/aegis

编码与调试

by getaegis

Credential isolation for AI agents. Inject secrets at the network boundary.

什么是 io.github.getaegis/aegis

Credential isolation for AI agents. Inject secrets at the network boundary.

README

Aegis

CI npm version Docker License

Stop putting API keys where AI agents can read them.

Aegis is a local-first credential isolation proxy for AI agents. It sits between your agent and the APIs it calls — injecting secrets at the network boundary so the agent never sees, stores, or transmits real credentials.

<p align="center"> <img src="docs/assets/demo.gif" alt="Aegis demo" width="720" /> </p>

How It Works

<p align="center"> <img src="docs/assets/how-it-works.svg" alt="How Aegis works — agent sends request through Gate, credentials injected at the network boundary" width="900" /> </p>

Why?

AI agents (Claude, GPT, Cursor, custom bots) increasingly call real APIs — Slack, GitHub, Stripe, databases. The current pattern is dangerous:

  1. Agents see raw API keys — one prompt injection exfiltrates them
  2. No domain guard — a compromised agent can send your Slack token to evil.com
  3. No audit trail — you can't see what an agent did with your credentials
  4. No access control — every agent can use every credential

Aegis solves all four. Your agent makes HTTP calls through a local proxy. Aegis handles authentication, enforces domain restrictions, and logs everything.

Quick Start

bash
# Install
npm install -g @getaegis/cli

# Initialize (stores master key in OS keychain by default)
aegis init

# Add a credential
aegis vault add \
  --name slack-bot \
  --service slack \
  --secret "xoxb-your-token-here" \
  --domains slack.com

# Start the proxy
aegis gate --no-agent-auth

# Test it — Aegis injects the token, forwards to Slack, logs the request
# X-Target-Host tells Gate which upstream server to forward to (optional if credential has one domain)
curl http://localhost:3100/slack/api/auth.test \
  -H "X-Target-Host: slack.com"

Production Setup (with agent auth)

bash
# Create an agent identity
aegis agent add --name "my-agent"
# Save the printed token — it's shown once only

# Grant it access to specific credentials
aegis agent grant --agent "my-agent" --credential "slack-bot"

# Start Gate (agent auth is on by default)
aegis gate

# Agent must include its token
curl http://localhost:3100/slack/api/auth.test \
  -H "X-Target-Host: slack.com" \
  -H "X-Aegis-Agent: aegis_a1b2c3d4..."

MCP Integration

Aegis is a first-class MCP server. Any MCP-compatible AI agent can use it natively — no HTTP calls needed.

Before (plaintext key in config):

json
{
  "mcpServers": {
    "slack": {
      "command": "node",
      "args": ["slack-mcp-server"],
      "env": { "SLACK_TOKEN": "xoxb-1234-real-token-here" }
    }
  }
}

After (Aegis — no key visible):

json
{
  "mcpServers": {
    "aegis": {
      "command": "npx",
      "args": ["-y", "@getaegis/cli", "mcp", "serve"]
    }
  }
}

Generate the config for your AI host:

bash
aegis mcp config claude   # Claude Desktop
aegis mcp config cursor   # Cursor
aegis mcp config vscode   # VS Code
aegis mcp config cline    # Cline
aegis mcp config windsurf # Windsurf

The MCP server exposes three tools:

ToolDescription
aegis_proxy_requestMake an authenticated API call (provide service + path, Aegis injects credentials)
aegis_list_servicesList available services (names only, never secrets)
aegis_healthCheck Aegis status

The MCP server replicates the full Gate security pipeline: domain guard, agent auth, body inspection, rate limiting, audit logging.

Setup Guides

Features

FeatureDescription
Encrypted VaultAES-256-GCM encrypted credential storage with PBKDF2 key derivation
HTTP Proxy (Gate)Transparent credential injection — agent hits localhost:3100/{service}/path
Domain GuardEvery outbound request checked against credential allowlists. No bypass
Audit LedgerEvery request (allowed and blocked) logged with full context
Agent IdentityPer-agent tokens, credential scoping, and rate limits
Policy EngineDeclarative YAML policies — method, path, rate-limit, time-of-day restrictions
Body InspectorOutbound request bodies scanned for credential-like patterns
MCP ServerNative Model Context Protocol for Claude, Cursor, VS Code, Windsurf, Cline
Web DashboardReal-time monitoring UI with WebSocket live feed
Prometheus Metrics/_aegis/metrics endpoint for Grafana dashboards
Webhook AlertsHMAC-signed notifications for blocked requests, expiring credentials
RBACAdmin, operator, viewer roles with 16 granular permissions
Multi-VaultSeparate vaults for dev/staging/prod with isolated encryption keys
Shamir's Secret SharingM-of-N key splitting for team master key management
Cross-Platform Key StorageOS keychain by default (macOS, Windows, Linux) with file fallback
TLS SupportOptional HTTPS on Gate with cert/key configuration
Configuration Fileaegis.config.yaml with env var overrides and CLI flag overrides

Example Integrations

Step-by-step guides with config files and policies included:

  • Slack Bot — Protect your Slack bot token with domain-restricted proxy access
  • GitHub Integration — Secure GitHub PAT with per-agent grants and read-only policies
  • Stripe Backend — Isolate Stripe API keys with body inspection and rate limiting
  • OpenClaw Skill — Aegis skill for OpenClaw personal AI assistant

Security

  • Published STRIDE threat model — 28 threats analysed, 0 critical/high unmitigated findings
  • Full security architecture documentation (trust boundaries, crypto pipeline, data flow)
  • AES-256-GCM + ChaCha20-Poly1305 encryption at rest
  • Domain guard enforced on every request — no bypass
  • Agent tokens stored as SHA-256 hashes — cannot be recovered, only regenerated
  • Request body inspection for credential pattern detection
  • Open source (Apache 2.0) — read the code

How Aegis Compares

.env filesVault/DopplerInfisicalAegis
Agent sees raw keyYesYes (after fetch)Yes (after fetch)No — never
Domain restrictionsNoNoNoYes
MCP-nativeNoNoAddingYes
Local-firstYesNoNoYes
Setup10 sec30+ min15+ min~2 min

See full comparison for detailed breakdowns against each approach.

Documentation

DocumentDescription
Usage GuideFull reference: CLI commands, configuration, RBAC, policies, webhooks, troubleshooting
Security ArchitectureTrust boundaries, crypto pipeline, data flow diagrams
Threat ModelSTRIDE analysis — 28 threats, mitigations, residual risks
ComparisonDetailed comparison with .env, Vault, Doppler, Infisical
FAQCommon questions and objections
RoadmapFeature roadmap
ContributingCode style, PR process, architecture overview

Install

bash
# npm
npm install -g @getaegis/cli

# Homebrew
brew tap getaegis/aegis && brew install aegis

# Docker
docker run ghcr.io/getaegis/aegis --help

Requires Node.js ≥ 20 — check with node -v

Development

bash
git clone https://github.com/getaegis/aegis.git
cd aegis
yarn install
yarn build
yarn test

See CONTRIBUTING.md for code style, PR process, and architecture overview.

License

Apache 2.0

常见问题

io.github.getaegis/aegis 是什么?

Credential isolation for AI agents. Inject secrets at the network boundary.

相关 Skills

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描111.8k

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描111.8k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描111.8k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
83.1k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
51.8k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.2k

评论