API documentation

AgentSafe gateway

AgentSafe is the open execution boundary in front of an agent's consequential actions. Its gateway relays each HTTP write only once Decionis has decided on it and the single-use grant is claimed, and it records the evidence of each attempt. This page states the current release and how it meets the Decionis API.

Versions

Release v0.5.0 shipped on 27 October 2026. The runtime, its container image and its Helm chart share one version; the library and the release tag share another.

ArtifactVersionWhat it is
@decionis/agentsafe0.7.0The runtime: the HTTP gateway, the TCP connector and tunnel, and the trusted executor, with the agentsafe CLI.
docker.io/decionis/agentsafe, ghcr.io/decionis/agentsafe0.7.0The same runtime as a distroless, non-root image, one digest on both registries.
oci://ghcr.io/decionis/charts/agentsafe0.7.0The Helm chart: one Deployment in front of one Service.
@decionis/agent-safe-pipeline0.5.0The library: intent capture, the Decionis gate, the SafeExecutor, and local test doubles.
agent-safe.intent/11The execution intent both send, hashed with RFC 8785 canonical JSON and SHA-256.
Decionis API contract0.6.0The OpenAPI document at /.well-known/openapi.json that this release is built against.
New in runtime 0.7.0

An operator route can pin a published policy bundle with policyId, policyVersion or both, bound into the hashed intent so a caller cannot override it. A hosted tenant can enforce on a dedicated gateway that holds its API's credential. agentsafe actions manifest writes the action space as one agent-safe.actions/1 document. A write can be held to its target's state version. The CHANGELOG has the rest.

Install

Every install form runs the same runtime. Node.js 22.14 or newer for the npm package.

PlatformCommand
npmnpm install --global @decionis/agentsafe@0.7.0
macOSbrew tap decionis/agent-safe https://github.com/decionis/agent-safe-pipeline && brew trust decionis/agent-safe && brew install agentsafe
Linuxcurl -fsSL https://raw.githubusercontent.com/decionis/agent-safe-pipeline/master/packaging/install.sh | sh
Dockerdocker run --rm ghcr.io/decionis/agentsafe:0.7.0 --help
Kuberneteshelm install agentsafe oci://ghcr.io/decionis/charts/agentsafe --version 0.7.0
# What reaches a synthetic target with no boundary, in shadow, and under enforcement
agentsafe test

Authority calls

The gateway asks Decionis about one exact intent and holds the grant for exactly that request. These are the calls, in order; the deprecated aliases answer from the same handlers.

StepRouteDeprecated alias
Decide and bindPOST /v1/authority/grantsPOST /v1/authority/enforce-and-bind
Claim, immediately before forwardingPOST /v1/authority/grants/{grantId}/claimsPOST /v1/execution/claim-token, POST /v1/execution/consume-token
Finalize, before the claim lease expiresPOST /v1/authority/grants/{grantId}/receiptsPOST /v1/execution/finalize-token
Resolve an INDETERMINATE attemptPOST /v1/authority/grants/{grantId}/reconciliations—
Finalize every claim

A claim that is not finalized before claim_lease_expires_at is recorded INDETERMINATE, and every later claim on the same target answers 409 CURRENT_STATE_UNRESOLVED until the attempt is reconciled. The runtime finalizes each claim it makes; a client of its own must do the same.

Idempotency-Key

Send no Idempotency-Key, or one equal to the intent's intent_id: intent_id is the grant's issuance boundary. Any other value, including the intent's own context.idempotency_key, is refused with 400 AUTHORITY_IDEMPOTENCY_KEY_MISMATCH.

Credentials

Five credentials meet at a gateway. Each admits one thing, and none stands in for another.

CredentialWho holds itWhat it admits
Ingress key: the AgentSafe-Tenant-Key header, also called the tenant keyThe agent's host, for a hosted gateway onlyTraffic to that gateway. The gateway strips it before relaying, and it means nothing to the Decionis API.
Gateway key: a Decionis API key, sent as BearerThe gateway, never the agent. On the hosted fleet Decionis holds it for youDecisions and grants for one workspace, nothing else. A hosted gateway's key is a MEMBER key with decision:shadow, or decision:enforce once it enforces.
Workspace API key: the ADMIN key onboarding returnsThe workspace's administratorsAdministering the workspace, including issuing the other keys. It holds org:*, so it belongs in neither a gateway nor an agent.
Policy authoring keyThe person or pipeline that publishes policypolicy:read and policy:write, issued apart from the gateway key (below). A gateway key never writes policy.
Upstream credentialThe agent, or the gateway itself when a hosted tenant enforcesThe protected API. On an enforcing hosted gateway the agent no longer holds it, so it cannot go around the gateway.
# Issue a policy authoring key with the workspace API key (ADMIN)
curl -X POST https://api.decionis.com/v1/orgs/<org_id>/api-keys \
  -H "Authorization: Bearer $DECIONIS_WORKSPACE_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"policy-author","role":"MEMBER","scopes":["policy:read","policy:write"],"provision_default_policy":false}'

# Publish with it, then name the policy on the gateway's route or mode switch
POST /v1/protocol/policies/bundles   (Bearer: the policy authoring key)
Intent modeThe gateway key needs one ofThe workspace
SHADOWdecision:write, decision:run, decision:*, org:*, decision:shadow, decision:enforceAny, provisional included
PARALLEL, ENFORCEMENTdecision:write, decision:*, org:*, decision:enforceClaimed by an owner
Enforcement needs an owned workspace

A provisional workspace, one minted without an account, runs SHADOW only: any other mode answers 403 PROVISIONAL_WORKSPACE_SHADOW_ONLY whatever scopes the key holds. An owner claims it through POST /v1/orgs/{org_id}/claim/start and /claim/verify. Claiming does not widen a key's scopes, and a SHADOW success says nothing about whether enforcement will be accepted.

Health and policy checks

A gateway that answers is not yet a gateway that enforces the policy you meant. Check each layer on its own.

CheckHowWhat it proves
Process healthGET /_agentsafe/healthz and /_agentsafe/readyzThe process lives, its listener is bound and an authority is configured. Nothing about keys or policy.
Ingress key and relayA test POST through the gatewayIn shadow, agentsafe-mode: SHADOW and agentsafe-execution: PASSTHROUGH: the key admitted the request and the relay reached the API.
Gateway keyThe same POST, then the decision it producedA Decision Dossier for that intent exists in the workspace: the gateway's key reached the authority.
PolicyRead the verdict and reason codes of that decisionWhich rule decided: the Decision Dossier names the rule that matched. A catch-all, such as the starter policy's starter_allow_routine, means no rule names the action yet.

Hosted gateway

Decionis runs the same runtime as a hosted fleet at {id}.decionisedge.com. Every tenant starts in shadow; enforcement, in private beta, runs on a dedicated gateway that holds the API's credential.

Shadow

POST, PUT, PATCH and DELETE are evaluated as they pass and nothing is held or blocked. The tenant proves control of the API's origin at /.well-known/agentsafe-upstream or in a TXT record before the fleet forwards.

Enforcement

The tenant's own pods: ALLOW forwards once its grant is claimed, BLOCK is 403, ESCALATE is 202 and held, and an unreachable authority forwards nothing.

A hosted TCP resource is reached with the runtime's connector and tunnel, set up under Gateway deployments in the workspace.

Reference

The runtime's own documentation, pinned to v0.5.0.

TopicDocument
Changes in this releasehttps://github.com/decionis/agent-safe-pipeline/blob/v0.5.0/CHANGELOG.md
Gateway configurationhttps://github.com/decionis/agent-safe-pipeline/blob/v0.5.0/docs/gateway/configuration.md
Gateway routes and policy pinshttps://github.com/decionis/agent-safe-pipeline/blob/v0.5.0/docs/gateway/routes.md
Deployment, hosted and on premiseshttps://github.com/decionis/agent-safe-pipeline/blob/v0.5.0/docs/gateway/deployment.md
Hosted TCP relayhttps://github.com/decionis/agent-safe-pipeline/blob/v0.5.0/docs/gateway/hosted-tcp-relay.md
CLI referencehttps://github.com/decionis/agent-safe-pipeline/blob/v0.5.0/docs/reference/cli.md
Agent-Safe Intent specificationhttps://github.com/decionis/agent-safe-pipeline/blob/v0.5.0/spec/intent/v1/README.md