selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

AgentSafe logo

Self-host AgentSafe

v0.5.0

Gateway that authorizes AI agent actions before they execute

BetaOpen SourceApache-2.0
Updated13 hours ago
LanguageTypescript
Setup difficultyModerate
Stars
672
Port
8080 (HTTP gateway listener)
Docker
ghcr.io/decionis/agentsafe

What is AgentSafe?

AgentSafe is an execution-authority gateway that sits between AI agents or APIs and their target services. It intercepts consequential HTTP requests (writes, payments, deletions), captures them as canonical intents, and asks the Decionis control plane — an independent execution authority — for a decision: ALLOW (forward once on a single-use grant), ESCALATE (hold for human approval via Presence), or BLOCK (refuse with a signed dossier). The gateway runs in three modes: a local demo authority for testing, shadow mode to observe Decionis decisions on live traffic, and enforcement mode where nothing executes without a verified grant. It installs via Docker, Helm, Homebrew, Linux packages, or standalone binaries. The project is Apache-2.0 licensed and includes a comprehensive test suite (the Compromised Principal Test) that validates the boundary against adversarial attempts. AgentSafe does not make policy decisions itself; it enforces decisions from Decionis, which operates the policy control plane and Presence human-verification layer as separate services.

Should you self-host AgentSafe?

AgentSafe scores 53/100 on selfhost.directory (how scoring works) and ranks #18 of 39 in API Gateway. It has 672 GitHub stars.

It shipped 9 stable releases in the past year. The latest, v0.5.0, came out on 27 October 2026. New versions land roughly every 2 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Kong Gateway (82/100, 44 314 stars). It scores higher overall, so compare the two before you pick. See AgentSafe vs Kong Gateway side by side.

Features

  • Execution-authority gateway

AgentSafe README

How to configure AgentSafe

  • AGENTSAFE_EVIDENCE_DIRDirectory for evidence journal and chain heads

    Directory for evidence journal and chain heads

    values: directory path

  • AGENTSAFE_FAILURE_POLICYfailClosedFailure policy when authority is unreachable

    Failure policy when authority is unreachable

    values: failClosed|failOpen

  • AGENTSAFE_LISTEN127.0.0.1:8080Host and port for the gateway to listen on (e.g., :8080 or 127.0.0.1:8080)

    Host and port for the gateway to listen on (e.g., :8080 or 127.0.0.1:8080)

    values: host:port or :port

  • AGENTSAFE_LOG_FORMAThumanLog output format

    Log output format

    values: json|human

  • AGENTSAFE_LOG_LEVELLog level

    Log level

    values: debug

  • AGENTSAFE_MODEshadow (with Decionis key) or enforcement (with demo authority)Authority mode: shadow or enforcement

    Authority mode: shadow or enforcement

    values: shadow|enforcement

  • AGENTSAFE_UPSTREAMhttp://localhost:3000The upstream service URL to protect

    The upstream service URL to protect

    values: URL

  • AGENTSAFE_UPSTREAM_INSECUREfalseAllow plain HTTP upstream off loopback

    Allow plain HTTP upstream off loopback

    values: true|false

  • DECIONIS_API_KEYDecionis API key (outside production only)

    Decionis API key (outside production only)

    values: API key string

  • DECIONIS_API_KEY_FILEPath to file holding Decionis API key (production form)

    Path to file holding Decionis API key (production form)

    values: file path

  • DECIONIS_API_URLhttps://api.decionis.comDecionis API endpoint

    Decionis API endpoint

    values: URL

  • DECIONIS_TENANT_IDDecionis organization/tenant ID

    Decionis organization/tenant ID

    values: UUID

  • DECIONIS_TIMEOUT_MS4000Timeout for Decionis API calls in milliseconds

    Timeout for Decionis API calls in milliseconds

    values: integer (max 15000)

  • NODE_ENVNode environment; production refuses demo authority and env key

    Node environment; production refuses demo authority and env key

    values: production|development

AgentSafe releases & version history

More in API Gateway

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…