Skip to Content
AgentShield
Contributing

Repository Structure

A map of the AgentShield repository. Where each service, library, contract, migration, and deployment file lives.

control-plane — NestJS management API
dashboard — Next.js operations console
intelligence-engine — Python content analysis
docs — this documentation site (Next.js + Fumadocs)
gateway — Go gateway, event relay, chaos harness
policy-engine — deterministic evaluator (Go library)
identity — v1 request signature (Go library)
examples/sample-agent
benchmarks
tests — repository contracts and Python integration tests
scripts — test.ps1, lint.ps1
docker-compose.yml, Makefile, go.work, package.json

Sources of truth

ConcernSource of truthRule
Database schemainfrastructure/docker/postgres/migrations/Schema changes are new SQL files. No framework creates tables from classes
API contractsdocs/api/*.openapi.yamlChange OpenAPI and implementation together; unfinished routes stay unregistered
Authorization rulesdocs/adr/0004-authorization-decisions.md and runtime/policy-enginePrecedence and default deny are normative
Signing inputdocs/adr/0003-agent-identity.md and runtime/identitySDKs reproduce it and pass the shared vector
Design decisionsdocs/adr/Moving a boundary, rule, or store needs an ADR

Module boundaries

  • runtime/policy-engine and runtime/identity are libraries with no storage or network clients.
  • Services share contracts, not code: there is no shared database module or ORM model.
  • The gateway's internal/authz depends on interfaces; PostgreSQL and Redis implementations are wired in cmd/gateway.
  • Integrations depend only on the Python SDK and their framework.

The documentation site

apps/docs is a standalone Next.js application using Fumadocs. It is intentionally not an npm workspace of the root, so its dependencies cannot affect the services. It keeps a synced copy of docs/api/*.openapi.yaml in apps/docs/openapi/, refreshed by npm run sync:openapi (run automatically before dev and build), and renders the API reference from it.

Was this page helpful?

On this page