Awesome Go

AegisFlow

CategoryArtificial Intelligence
SubcategoryArtificial Intelligence
Stars35

AI gateway for routing, securing, and monitoring LLM traffic across 10+ providers. OpenAI-compatible API, WASM policy plugins, canary rollouts, real-time dashboard

About AegisFlow

AegisFlow

AegisFlow is a local-first policy gateway for coding agents. Allow, review, or block routed MCP actions and verify signed session evidence.

CI CodeQL OpenSSF Scorecard Go Report Card Go Reference Release Docker pulls License

Start here

Run a governed PR-writer policy locally. No provider key or paid service required.

git clone https://github.com/saivedant169/AegisFlow.git
cd AegisFlow/starter-kit
./install-pr-writer.sh

Installer builds AegisFlow, starts local gateway and admin services, loads PR-writer policy, and checks allow, review, and block decisions.

Connect an agent after checks pass:

What gets enforced

Routed MCP tool calls become an ActionEnvelope. Tool policy evaluates protocol, tool, target, capability, actor, task, and session context. Model API requests use input and output policy; they do not dispatch external tools. See runtime support and verification.

Routed actionExampleDefault PR-writer decision
Read repository contentgithub.get_file_contentsallow
Run testsshell.go_testallow
Delete files recursivelyshell.rmblock
Open a pull requestgithub.create_pull_requestreview
Merge or force pushgithub.merge_pull_requestblock
Read database rowssql.selectallow with sql-explorer
Change database rowssql.updatereview with sql-explorer

Review decisions enter an approval queue. Optional upstream credential issuance is disabled in the development candidate pending broker hardening. See candidate behavior and migration; published v0.9.0 has a different persistence and credential contract.

MCP client -> authenticated gateway -> tool policy -> decision evidence
                                           |
                              allow -> upstream -> result evidence
                              review -> approval queue -> matching retry
                              block -> error response

Model API client -> input policy -> provider -> output policy -> response

Boundary support

PathGoverned behaviorStatus
MCP remote gatewaytools/list, tool calls, arguments, review resumesupported
MCP stdio bridgeRouted tool calls and gateway failuressupported
OpenAI-compatible APIInput, output, streams, tool definitions, tool callssupported
Anthropic Messages APIInput, output, streams, optional tool passthroughsupported
Built-in editor file or shell toolsOnly covered when routed through MCP or another configured boundarynot intercepted directly
Standalone shell, SQL, GitHub, and HTTP gate librariesLibrary behavior and unit testsexperimental, not wired

messages_api.tool_passthrough remains off by default. Enable it only after testing selected provider tool loops.

Install

Verified release binary

curl -fsSL https://raw.githubusercontent.com/saivedant169/AegisFlow/v0.9.0/scripts/install.sh | AEGISFLOW_VERSION=v0.9.0 sh

Installer downloads SHA256SUMS from same release and rejects mismatched binaries.

Homebrew

brew install saivedant169/tap/aegisflow
brew install saivedant169/tap/aegisctl

Go

go install github.com/saivedant169/AegisFlow/cmd/[email protected]
go install github.com/saivedant169/AegisFlow/cmd/[email protected]

Source builds require Go 1.26.9 or later.

Container

docker run --rm -p 8080:8080 -p 8081:8081 -p 8082:8082 \
  saivedant169/aegisflow:0.9.0

Same image also publishes at ghcr.io/saivedant169/aegisflow:0.9.0.

Docker Compose

git clone https://github.com/saivedant169/AegisFlow.git
cd AegisFlow
docker compose -f deployments/docker-compose.yaml up --build

Gateway listens on 8080, admin API and dashboard on 8081, MCP gateway on 8082.

Policy packs

PackIntended useReadRisky writeDestructive action
readonlyInspection and analysisallowblockblock
pr-writerRead, test, edit, open PRallowreviewblock
docs-writerDocumentation changesallowreviewblock
infra-reviewInfrastructure planningallowreviewblock
sql-explorerData explorationallowreviewblock

Policy files and tuning notes live under starter-kit/policies.

Evidence and approvals

# Check gateway, admin API, providers, approvals, and evidence state
./bin/aegisctl status

# List pending actions
./bin/aegisctl pending

# Approve one exact action
./bin/aegisctl approve <action-id> "reviewed diff"

# Export and verify a session
./bin/aegisctl evidence export <session-id> --file evidence.json
./bin/aegisctl verify --session <session-id>

Memory storage remains default. Enable SQLite when approvals and evidence must survive restart:

state:
  enabled: true
  sqlite_path: "data/aegisflow.db"

Set AEGISFLOW_EVIDENCE_KEY from a secret manager before starting. Same key authenticates approval rows and evidence records while staying outside SQLite. AEGISFLOW_STATE_DB can override configured path. SQLite mode supports one running AegisFlow instance; it is not shared state for multiple replicas.

Run restart, replay, changed-argument, and evidence-tamper checks with make e2e-approval-security.

Release verification

v0.9.0 release includes checksums, Sigstore bundle, SPDX SBOM, and GitHub build provenance.

asset=aegisflow-linux-amd64
grep "  ${asset}$" SHA256SUMS | sha256sum --check -
cosign verify-blob \
  --bundle SHA256SUMS.sigstore.json \
  --certificate-identity-regexp '^https://github\.com/saivedant169/AegisFlow/\.github/workflows/release\.yaml@refs/tags/v0\.9\.0$' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  SHA256SUMS
gh attestation verify aegisflow-linux-amd64 \
  --repo saivedant169/AegisFlow

See v0.9.0 release notes for upgrade steps and known limits.

Documentation

NeedDocument
First local requestGetting started
Governed PR examplePR-writer proof
Runtime componentsArchitecture
API endpointsOpenAPI specification
ConfigurationAnnotated config
Deployment checksProduction checklist
Incident responseOperations runbook
Metrics and tracesObservability
Performance methodPerformance
Threat boundaryThreat model
Provider and policy problemsTroubleshooting

Development

make build
make test
make vuln
make smoke

Current CI runs formatting, build, race tests, vulnerability checks, installer verification, Docker smoke tests, CodeQL, and OpenSSF Scorecard.

Contribution rules: CONTRIBUTING.md. Security reports: SECURITY.md. Questions and policy examples belong in GitHub Discussions.

License

Apache License 2.0. See LICENSE.

Frequently Asked Questions

What is AegisFlow?

AegisFlow is a Artificial Intelligence library for the Go programming language. AI gateway for routing, securing, and monitoring LLM traffic across 10+ providers. OpenAI-compatible API, WASM policy plugins, canary rollouts, real-time dashboard

How do I install AegisFlow?

Install AegisFlow with the Go module system using `go get saivedant169/AegisFlow`. Check the repository for the current installation instructions.

What category does AegisFlow belong to?

AegisFlow is listed under Artificial Intelligence, specifically Artificial Intelligence.

← Back to Artificial Intelligence