{"id":50551247,"url":"https://github.com/agentic-layer/guardrail-adapter","last_synced_at":"2026-06-04T03:30:32.201Z","repository":{"id":351006859,"uuid":"1209143599","full_name":"agentic-layer/guardrail-adapter","owner":"agentic-layer","description":"The guardrail adapter connects gateways with guardrail providers using envoys ext_proc API for example.","archived":false,"fork":false,"pushed_at":"2026-05-05T06:57:52.000Z","size":10699,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-05T08:29:55.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agentic-layer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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-04-13T06:16:50.000Z","updated_at":"2026-05-05T06:57:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/agentic-layer/guardrail-adapter","commit_stats":null,"previous_names":["agentic-layer/guardrail-adapter"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/agentic-layer/guardrail-adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentic-layer%2Fguardrail-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentic-layer%2Fguardrail-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentic-layer%2Fguardrail-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentic-layer%2Fguardrail-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentic-layer","download_url":"https://codeload.github.com/agentic-layer/guardrail-adapter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentic-layer%2Fguardrail-adapter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33888302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-04T03:30:31.604Z","updated_at":"2026-06-04T03:30:32.189Z","avatar_url":"https://github.com/agentic-layer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Guardrail Adapter\n\nThe guardrail adapter is a middleware service that connects API gateways with guardrail providers via Envoy's External Processing (ext_proc) API. It inspects MCP tool-call traffic and applies content moderation, PII masking, or policy enforcement before the request reaches the upstream tool server.\n\n📖 **Documentation:** https://docs.agentic-layer.ai/guardrail-adapter/\n\n## Development\n\n### Prerequisites\n\n- **Go** 1.24+\n- **Docker** (with Docker Compose)\n- **make**\n- **curl**, and optionally [grpcurl](https://github.com/fullstorydev/grpcurl)\n- For the Envoy Gateway E2E path: a local Kubernetes cluster, [Tilt](https://tilt.dev/) v0.33+, **helm**, **kubectl**, **jq**\n\n**Tip:** [mise](https://mise.jdx.dev/) pins every tool to the version this repo uses. Run `mise install`.\n\n### Build and run\n\n```shell\n# Build the binary\nmake build\n# Run directly with default settings\nmake run\n```\n\nThe adapter listens on `:9001` (gRPC ext_proc) and `:8080` (HTTP health). See the [reference docs](https://docs.agentic-layer.ai/guardrail-adapter/reference.html) for flags, environment variables, and the static config file schema.\n\n### Test\n\n```shell\nmake lint       # linting (use `make lint-fix` to auto-fix)\nmake fmt        # format\nmake vet        # go vet\nmake test       # unit tests with coverage\n```\n\n### Verify with end-to-end tests\n\nTwo E2E paths exercise the adapter against real services.\n\n**Docker Compose** — adapter + Presidio + echo MCP server, no Kubernetes required:\n\n```shell\n# Start the stack\ndocker compose up -d\n# Run the test script\n./test/e2e.sh\n# Tear down\ndocker compose down\n```\n\n**Envoy Gateway via Tilt** — full Kubernetes Gateway API wiring (kind, Docker Desktop, Colima, ...):\n\n```shell\n# Install Envoy Gateway, Presidio, echo-mcp-server, the adapter, and the\n# Gateway / HTTPRoute / EnvoyExtensionPolicy / EnvoyPatchPolicy manifests\ntilt up\n# Run the test script (sends an MCP tools/call with a PII payload and asserts\n# the adapter masked the email)\n./test/e2e-gateway.sh\n```\n\n## Contributing\n\nSee the [Contribution Guide](https://github.com/agentic-layer/guardrail-adapter?tab=contributing-ov-file).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentic-layer%2Fguardrail-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentic-layer%2Fguardrail-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentic-layer%2Fguardrail-adapter/lists"}