Connect to your AAES Govern service
The evaluation package comes only with a paid, scoped evaluation. You run it in your environment, or AAES hosts the evaluation for a fixed fee. The platform package holds binaries only. The SDKs are not in it; install them from PyPI or npm. The Python SDK package is aaes-govern-sdk and the TypeScript SDK package is @aaes-ai/govern-sdk. Published releases are aaes-govern-sdk 0.1.3 on PyPI and @aaes-ai/govern-sdk 0.2.0 on npm. Earlier releases remain under aaes-sdk and @aaes-ai/sdk. From other languages, call the HTTP API using the OpenAPI contract.
- AAES_ENDPOINT
- The daemon address configured with
platform -listen. The listener defaults to127.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_idandactor_idso 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.
Python
Install aaes-govern-sdk 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-govern-sdkFor an offline environment, use the wheel and version recorded in your package manifest. The published Python SDK 0.1.3 wheel is named:
python3 -m pip install ./aaes_govern_sdk-0.1.3-py3-none-any.whlRead 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 @aaes-ai/govern-sdk 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/govern-sdkFor an offline environment, install the matching supplied tarball. This example names TypeScript SDK 0.2.0; use the filename and version recorded in your package manifest:
npm install ./aaes-ai-govern-sdk-0.2.0.tgzImport the installed package:
import { Client } from "@aaes-ai/govern-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.
Methods and helpers
The table lists Python entry points. JavaScript uses camelCase (requestAccess, presentGrant). Use the SDK methods page for the full matrix.
| Python entry point | Purpose |
|---|---|
Client.from_env() | Construct a client from the environment. |
capabilities | Read the capabilities this caller may use. |
catalog | Read capabilities this caller can request access to. |
health | Check daemon health. |
action | Record a decision and, when allowed, mint a grant. Does not execute the downstream action. |
brokered | Decide, then execute through AAES Govern's connector. |
federate | Federation interface; unavailable in the supplied distribution. Calls return 403 ("no federated backend") until an operator wires a minting backend. |
present_grant | Bind a stored grant to the authenticated caller. |
request_access | Submit an access request. |
access_request | Read an access request. |
observe | Report an effect authorized under pass_through custody. |
refresh | Clear the cached caller identity so the next action fetches it again. |
verify_hint | A helper, not receipt verification. Use the public aaesverify CLI to check export integrity. |
list_task, task | Bounded task pages and one task record. |
list_approvals, approval | Authorized approval queue and intent-bound decisions. |
list_entitlements | Usable, expired, and revoked access for the permitted actor. |
list_receipts, receipt | Scoped 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. |
manager_cards, decide_manager_card | Agent-manager inbox and explicit bound decisions; never automatically retried. |
OperatorClient, revoke_access_request | Separate 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_idandactor_idare 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
aaesverifyCLI to check export integrity. From v0.3.0 it also verifiesaaes.trust-receipt/v1receipts with--receiptand binds a current records sidecar with--records. Stored records outside that profile need 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.
| Situation | What it means | Next step |
|---|---|---|
Action-decision route: 503 before the decision is sealed | No new grant was released. | Follow the release's retry procedure with the same request and effect key. |
Brokered route: 503 | The 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 failure | No 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 receipt | AAES 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 error | The missing response does not establish whether anything was committed or executed. | Investigate the records and provider result before retrying. |
409 | A 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.