{"id":45384449,"url":"https://github.com/agentbouncr/agentbouncr","last_synced_at":"2026-02-23T19:01:07.885Z","repository":{"id":339593880,"uuid":"1159830302","full_name":"agentbouncr/agentbouncr","owner":"agentbouncr","description":"Not on the list, not getting in. — Governance layer for AI agents.","archived":false,"fork":false,"pushed_at":"2026-02-21T16:08:17.000Z","size":166,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-21T22:22:28.910Z","etag":null,"topics":["agents","ai","audit-trail","eu-ai-act","governance","policy-engine","security","typescript"],"latest_commit_sha":null,"homepage":"https://agentbouncr.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agentbouncr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-17T08:01:49.000Z","updated_at":"2026-02-21T16:08:20.000Z","dependencies_parsed_at":"2026-02-22T18:00:42.960Z","dependency_job_id":null,"html_url":"https://github.com/agentbouncr/agentbouncr","commit_stats":null,"previous_names":["agentbouncr/agentbouncr"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/agentbouncr/agentbouncr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentbouncr%2Fagentbouncr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentbouncr%2Fagentbouncr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentbouncr%2Fagentbouncr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentbouncr%2Fagentbouncr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentbouncr","download_url":"https://codeload.github.com/agentbouncr/agentbouncr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentbouncr%2Fagentbouncr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29721044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T15:10:41.462Z","status":"ssl_error","status_checked_at":"2026-02-22T15:10:04.636Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","ai","audit-trail","eu-ai-act","governance","policy-engine","security","typescript"],"created_at":"2026-02-21T17:18:04.431Z","updated_at":"2026-02-22T18:00:59.534Z","avatar_url":"https://github.com/agentbouncr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AgentBouncr\n\n[![npm version](https://img.shields.io/npm/v/@agentbouncr/core.svg)](https://www.npmjs.com/package/@agentbouncr/core)\n[![CI](https://github.com/agentbouncr/agentbouncr/actions/workflows/ci.yml/badge.svg)](https://github.com/agentbouncr/agentbouncr/actions/workflows/ci.yml)\n[![Tests](https://img.shields.io/badge/tests-600%2B%20passing-brightgreen)](https://github.com/agentbouncr/agentbouncr/actions)\n[![License: ELv2](https://img.shields.io/badge/License-ELv2-blue.svg)](LICENSE)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5-blue.svg)](https://www.typescriptlang.org/)\n\nA governance layer that sits between AI agents and their tools. Policy engine, audit trail, kill switch.\n\n---\n\n## Quick Start\n\n```bash\nnpm install @agentbouncr/core\n```\n\n```typescript\nimport { GovernanceMiddleware } from '@agentbouncr/core';\n\nconst governance = new GovernanceMiddleware();\n\ngovernance.setPolicy({\n  name: 'production',\n  version: '1.0',\n  rules: [\n    { tool: 'approve_payment', effect: 'deny', condition: { amount: { gt: 5000 } }, reason: 'Payments over 5000 require manual approval' },\n    { tool: 'file_write', effect: 'deny', condition: { path: { startsWith: '/etc/' } } },\n    { tool: '*', effect: 'allow' },\n  ],\n  createdAt: new Date().toISOString(),\n  updatedAt: new Date().toISOString(),\n});\n\nconst result = await governance.evaluate({\n  agentId: 'claims-agent',\n  tool: 'approve_payment',\n  params: { amount: 12000, claimId: 'CLM-4821' },\n});\n\nconsole.log(result.allowed);  // false\nconsole.log(result.reason);   // \"Payments over 5000 require manual approval\"\nconsole.log(result.traceId);  // \"00-a1b2c3...\"  (W3C Trace Context)\n```\n\nWorks with any agent framework — LangChain, Vercel AI SDK, OpenAI Agents SDK, CrewAI, n8n.\n\n## Features\n\n**Permission Layer** — Per-agent tool allowlists. Register agents with explicit tool sets, enforce at runtime.\n\n**Policy Engine** — Declarative JSON rules with 11 condition operators (`equals`, `gt`, `startsWith`, `matches`, ...), rate limits, and human-in-the-loop approval gates. Deny-before-allow, fail-secure.\n\n**Audit Trail** — Append-only log with SHA-256 hash chain. Every decision is recorded with trace ID, duration, and failure category. Tamper-evident, verifiable, exportable.\n\n**Kill Switch** — Deterministic emergency stop. All tool calls are blocked synchronously in the evaluate path, no LLM involvement. Sub-millisecond activation.\n\n**Injection Detection** — Configurable pattern matching for prompt injection attempts. Detects and logs without blocking (defense-in-depth, not a firewall).\n\n**Event System** — 20 event types with async fire-and-forget dispatch. Subscribe to `tool_call.denied`, `killswitch.activated`, `agent.stopped`, etc. Built-in webhook support in Enterprise.\n\n**W3C Trace Context** — OpenTelemetry-compatible 128-bit trace IDs propagated through every governance decision.\n\n## Architecture\n\n```\nYour AI Agent (LangChain, Vercel AI SDK, OpenAI, CrewAI, ...)\n         │\n         │  evaluate({ agentId, tool, params })\n         ▼\n┌─────────────────────────────────────────────┐\n│            @agentbouncr/core                │\n│                                             │\n│  ┌────────────┐  ┌────────────┐  ┌───────┐ │\n│  │   Policy   │  │   Audit    │  │ Kill  │ │\n│  │   Engine   │  │   Trail    │  │Switch │ │\n│  └────────────┘  └────────────┘  └───────┘ │\n│  ┌────────────┐  ┌────────────┐  ┌───────┐ │\n│  │ Injection  │  │   Event    │  │ Trace │ │\n│  │ Detection  │  │   System   │  │Context│ │\n│  └────────────┘  └────────────┘  └───────┘ │\n└──────────────────────┬──────────────────────┘\n                       │\n         ┌─────────────┴──────────────┐\n         ▼                            ▼\n  @agentbouncr/sqlite          Your database adapter\n  (included)                   (implement DatabaseAdapter)\n```\n\n## Packages\n\n| Package | npm | Description |\n|---|---|---|\n| [`@agentbouncr/core`](packages/core) | [![npm](https://img.shields.io/npm/v/@agentbouncr/core.svg)](https://www.npmjs.com/package/@agentbouncr/core) | Policy engine, audit trail, events, kill switch |\n| [`@agentbouncr/sqlite`](packages/sqlite) | [![npm](https://img.shields.io/npm/v/@agentbouncr/sqlite.svg)](https://www.npmjs.com/package/@agentbouncr/sqlite) | SQLite storage adapter (better-sqlite3) |\n| [`@agentbouncr/cli`](packages/cli) | [![npm](https://img.shields.io/npm/v/@agentbouncr/cli.svg)](https://www.npmjs.com/package/@agentbouncr/cli) | CLI for agent management and audit verification |\n\n## With Persistence\n\n```bash\nnpm install @agentbouncr/core @agentbouncr/sqlite\n```\n\n```typescript\nimport { GovernanceMiddleware } from '@agentbouncr/core';\nimport { SqliteDatabaseAdapter } from '@agentbouncr/sqlite';\nimport pino from 'pino';\n\nconst db = new SqliteDatabaseAdapter(pino({ level: 'info' }), './governance.db');\nawait db.runMigrations();\n\nconst governance = new GovernanceMiddleware({ db });\n\n// Register an agent with an explicit tool allowlist\nawait governance.registerAgent({\n  agentId: 'claims-agent',\n  name: 'Claims Processor',\n  allowedTools: ['search_claims', 'approve_payment', 'send_email'],\n});\n\n// Audit trail is now persisted — verify integrity anytime\nconst verification = await db.verifyAuditChain();\nconsole.log(verification.valid); // true\n```\n\n## Vercel AI SDK Integration\n\n```typescript\nimport { wrapToolsWithGovernance, GovernanceMiddleware } from '@agentbouncr/core';\n\nconst governance = new GovernanceMiddleware();\ngovernance.setPolicy(myPolicy);\n\n// Wraps each tool's execute() with a governance check\nconst governedTools = wrapToolsWithGovernance(myTools, {\n  agentId: 'my-agent',\n  governance,\n});\n// Denied tools throw GovernanceError instead of executing\n```\n\n## Policy Reference\n\nPolicies are declarative JSON, validated with Zod at runtime:\n\n```json\n{\n  \"name\": \"restrict-payments\",\n  \"version\": \"1.0\",\n  \"rules\": [\n    {\n      \"tool\": \"approve_payment\",\n      \"effect\": \"deny\",\n      \"condition\": { \"amount\": { \"gt\": 5000 } },\n      \"reason\": \"Payments over 5000 require manual approval\",\n      \"requireApproval\": true\n    },\n    {\n      \"tool\": \"send_email\",\n      \"effect\": \"allow\",\n      \"rateLimit\": { \"maxPerMinute\": 10 }\n    },\n    { \"tool\": \"*\", \"effect\": \"allow\" }\n  ]\n}\n```\n\n**Condition operators:** `equals` `notEquals` `startsWith` `endsWith` `contains` `gt` `lt` `gte` `lte` `in` `matches`\n\n## CLI\n\n```bash\nnpm install -g @agentbouncr/cli\n\ngovernance agent list\ngovernance agent start claims-agent\ngovernance audit verify\ngovernance import --mcp ./mcp-manifest.json\n```\n\n## EU AI Act\n\nAgentBouncr addresses key requirements of the EU AI Act for high-risk AI systems (effective August 2026). The policy engine maps to Art. 9 (risk management), the append-only audit trail with hash-chain verification satisfies Art. 12 (record-keeping), and approval workflows provide Art. 14 (human oversight) capabilities.\n\n## Enterprise\n\nThe source-available core handles policy evaluation, audit trails, and kill switch for any scale. When you need multi-tenant management, the Enterprise Dashboard at agentbouncr.com adds:\n- **PostgreSQL adapter** with hash-chain verification and retention policies\n- **OIDC/SAML SSO** with self-hosted auth (EU-hosted, GDPR-compliant)\n- **Compliance Reports** mapped to EU AI Act Articles 9, 12, 14\n- **Approval Workflows** for human-in-the-loop governance\n- **Webhooks + RBAC** for team-scale operations\n\n→ [agentbouncr.com](https://agentbouncr.com)\n\n## Examples\n\n- [**quickstart.ts**](examples/quickstart.ts) — Zero-config, policy evaluation in 10 lines\n- [**claims-processor.ts**](examples/claims-processor.ts) — SQLite persistence, events, kill-switch\n- [**mcp-integration.ts**](examples/mcp-integration.ts) — MCP import with auto-risk-detection\n\n## Documentation\n\n- [Getting Started](docs/getting-started.md) — Up and running in 5 minutes\n- [API Reference](docs/api-reference.md) — Complete API documentation\n- [MCP Import Guide](docs/mcp-import-guide.md) — Importing tools from MCP manifests\n\n## License\n\n[Elastic License 2.0 (ELv2)](LICENSE) — free to use, modify, and distribute. Cannot be offered as a competing managed service.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentbouncr%2Fagentbouncr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentbouncr%2Fagentbouncr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentbouncr%2Fagentbouncr/lists"}