Developers · AAES Govern · SDKs

Three languages.
One service contract.

Use Go, Python, or TypeScript to call the AAES service your organization runs. Governed action requests select registered capabilities rather than caller-supplied application destinations or credentials.

This page describes AAES Govern’s controls. AAES Operate has private-work permissions, operational reviews and recorded-spend limits; it does not include Govern. About AAES Govern

Connect to your AAES service

The platform evaluation package for AAES Govern and AAES Operate runs in your environment and is included only in the paid design partnership. The platform package (v0.2.0) includes binaries and SDK archives. Public SDK downloads are separate from that package. The Python SDK is published on PyPI as aaes-sdk and the TypeScript SDK on npm as @aaes-ai/sdk; the Go module is tagged sdk/go/v0.1.0 and fetched with repository access, because the source repository is private.

AAES_ENDPOINT
The daemon address configured with platformd -listen. The listener defaults to 127.0.0.1:8090. Packaged Compose uses TLS by default; native TLS requires a certificate/key pair. Plain HTTP needs -allow-insecure-http. SDKs permit plaintext HTTP only to an explicit loopback address. Use your operator's HTTPS endpoint and configure trusted certificate roots for your language runtime.
AAES_TOKEN
The operator-issued bearer token. The credential resolves the tenant. The SDKs fill tenant_id and actor_id so they match the token.

These examples assume a running daemon and a token associated with a registered caller. Set AAES_ENDPOINT and AAES_TOKEN first. Each example reads the capabilities the caller may use.

For routes and the HTTP contract, see the API reference and download the OpenAPI 3.1 contract. Remaining integration notes ship with the evaluation package.

Go

A zero-dependency Go 1.27 module, separate from the daemon tree. The module is tagged sdk/go/v0.1.0; with repository access, go get github.com/aaes-ai/aaes/sdk/go fetches it, and the evaluation package supplies the source for an offline replace:

go mod edit -replace=github.com/aaes-ai/aaes/sdk/go=./sdk/go

Read permitted capabilities and handle a failed request:

package main

import (
    "context"
    "fmt"
    "log"

    aaes "github.com/aaes-ai/aaes/sdk/go"
)

func main() {
    client, err := aaes.FromEnv()
    if err != nil { log.Fatal(err) }
    result, err := client.Capabilities(context.Background())
    if err != nil { log.Fatal(err) }
    fmt.Printf("%d permitted capabilities\n", len(result.Capabilities))
}

Python

Install from PyPI. The runtime uses only the standard library; annotated source and PEP 561 metadata are included. Package metadata requires Python 3.9+:

python3 -m pip install aaes-sdk

For an offline environment, the evaluation package ships the same wheel for a local install:

python3 -m pip install ./aaes_sdk-0.1.1-py3-none-any.whl

Read the caller's permitted capabilities:

from aaes import AaesError, Client

try:
    result = Client.from_env().capabilities()
    print(f"{len(result.capabilities)} permitted capabilities")
except AaesError as error:
    raise SystemExit(str(error))

JavaScript

Install from npm. The ESM package metadata permits Node 18+; that installation floor is distinct from the supported evaluation runtimes below. Public TypeScript declarations and wire response types are included. JavaScript method names are camelCase throughout:

npm install @aaes-ai/sdk

For an offline environment, install the matching supplied tarball. This example names TypeScript SDK 0.1.2; use the filename and version recorded in your package manifest:

npm install ./aaes-ai-sdk-0.1.2.tgz

Import the installed package:

import { Client } from "@aaes-ai/sdk";

try {
  const result = await Client.fromEnv().capabilities();
  console.log(`${result.capabilities.length} permitted capabilities`);
} catch (error) {
  console.error(String(error));
  process.exitCode = 1;
}

Read the method and authorization matrix. New read APIs retain daemon wire names, such as task_id; existing action results retain their language-native fields.

Release changes: Python changelog, TypeScript changelog, and Go changelog.

Methods and helpers

The table lists Go entry points. Python uses snake_case (request_access, present_grant). JavaScript uses camelCase (requestAccess, presentGrant). Use the SDK methods page for the full matrix.

Go entry pointPurpose
aaes.FromEnv()Construct a client from the environment.
CapabilitiesRead the capabilities this caller may use.
CatalogRead capabilities this caller can request access to.
HealthCheck daemon health.
ActionRecord a decision and, when allowed, mint a grant. Does not execute the downstream action.
BrokeredDecide, then execute through AAES Govern's connector.
FederateFederation interface; unavailable in the supplied distribution. Calls return 403 ("no federated backend") until an operator wires a minting backend.
PresentGrantBind a stored grant to the authenticated caller.
RequestAccessSubmit an access request.
AccessRequestRead an access request.
ObserveReport an effect authorized under pass_through custody.
RefreshClear the cached caller identity so the next action fetches it again.
aaes.VerifyHintA helper, not receipt verification. Use the public aaesverify CLI to check export integrity.
ListTask, TaskBounded task pages and one task record.
ListApprovals, ApprovalAuthorized approval queue and intent-bound decisions.
ListEntitlementsUsable, expired, and revoked access for the permitted actor.
ListReceipts, ReceiptScoped sealed evidence with daemon-reported coverage: an AAES-defined accounting measure over the configured and captured population, not a measure of all enterprise agent activity.
ManagerCards, DecideManagerCardAgent-manager inbox and explicit bound decisions; never automatically retried.
NewOperator, RevokeAccessRequestSeparate person-token client for access revocation; not an agent authority grant.

Daemon refusals are JSON with a reason. A remedy is included when the daemon can name the smallest change that would satisfy the refusal.

Request safety and verification

  • Registered destinations. An action does not accept a caller-supplied application URL, HTTP method, or credential. Brokered calls use deployment-controlled application credentials. Federation, when separately wired and validated, instead returns credential material or issuance instructions and the registered target to the caller. The bearer token authenticates the daemon caller; it is not an application credential to embed in an action.
  • Caller identity. tenant_id and actor_id are claims that must match the token. The SDKs fill them.
  • Explicit retries. Retries are opt-in, limited to 503, and require the original effect key: the identifier that keeps a repeat tied to the same requested action. Enable automatic retries only for operations and failure stages documented by your release. Never use a new key to get past a conflict or an uncertain result.
  • Receipt verification. The SDKs do not verify receipts. Use the public aaesverify CLI to check export integrity. Checking stored-record fields also requires the records sidecar and the separate operator binding check.

Decide what to do after a failed request

An HTTP status describes the response from AAES. It does not, on its own, establish what happened in the provider's system. Check the route, recorded reason, and evidence before repeating an action.

SituationWhat it meansNext step
Action-decision route: 503 before the decision is sealedNo new grant was released.Follow the release's retry procedure with the same request and effect key.
Brokered route: 503The provider may have completed the action before AAES Govern failed to save its outcome receipt.Reconcile the recorded decision with the provider's actual result before deciding whether to repeat the identical request.
Federated route: 503 after a sealed decision, from minting or marker failureNo grant material was released, and the live-grant slot remains held.A retry with the same effect-key step is permitted for this failure stage.
403 with a sealed receiptAAES Govern recorded a refusal or failure. The status alone does not establish the provider outcome.Read the reason and reconcile any uncertain result.
Timeout, reset connection, or intermediary errorThe missing response does not establish whether anything was committed or executed.Investigate the records and provider result before retrying.
409A duplicate-effect reason identifies an existing recorded claim, not downstream success. Other state conflicts also use this status.Read the reason; do not create a new effect key to bypass the conflict.

Start reconciliation with GET /v1/receipts?task_id=… and the intent, effect, and effect-id fields returned by the read API. If you need help, give the operator the task ID, effect-key step, and your correlation identifiers so they can find the sealed decision in the journal. A missing receipt does not prove nothing was committed. Remaining retry notes ship with the evaluation package.

Verify offline

Given an export and public key from your evaluation install, run:

aaesverify --export <export.jsonl> --pubkey <key.pub>

No running service is required. See the CLI reference for offline audit commands, or return to the API reference for the daemon contract.