A Rust server that gives software agents their own identity tokens and lets one agent act on behalf of another in a recorded chain.
Pre-1.0 (version 0.1.0). Not published on crates.io. The workspace builds crates for token issue, token exchange, a server, a client and an operator console. The build and test commands below are the ones in the Makefile and the previous README. They were not run for this README, so treat them as not verified here.
AIM does two jobs in one binary. First, it issues short-lived tokens to agents. Each token is a signed JWT (ES256). The subject is a SPIFFE URI such as spiffe://<trust-domain>/agent/<id>. The default lifetime is 300 seconds or less.
Second, it implements OAuth 2.0 token exchange (RFC 8693). A caller presents a token from a trusted outside identity provider plus an agent token. AIM returns a new token that records the delegation as a nested act claim. The broker checks both input tokens, limits the chain depth, narrows the scopes, and can ask SpiceDB whether this agent may act for this subject.
AIM does not log in humans, store passwords, run multi-factor enrolment or issue refresh tokens. Customer and operator tokens come from your own OIDC identity provider, which must publish a JWKS endpoint. A downstream gateway or resource server then checks AIM's tokens and the outside tokens using the published keys and reads the act chain.
The workspace has these crates: aim-core (signing, keys, claims), aim-issuer, aim-broker, aim-server (HTTP: /oauth/token, /agents/{id}/tokens, /verify, /healthz, /readyz, /.well-known/openid-configuration, /.well-known/jwks.json), aim-client (Rust client), aim-webui (optional operator console), and three small helper crates for redaction, an MCP server SDK and tree-sitter grammars. See docs/ARCHITECTURE.md.
cargo build --workspace
cargo test --workspace
make dev # writes dev-keys/dev.active.pem, then docker compose up --build (AIM + Postgres)
curl localhost:8443/healthz
curl localhost:8443/.well-known/openid-configuration
make down # stop and drop the Postgres volumemake help lists the other targets. The operator console is behind the webui feature: cargo run -p aim-server --features "postgres,webui". Never commit the files in dev-keys/.
- It issues agent identity and brokers machine-to-machine delegation. It is not a human login system.
- It trusts the outside identity providers you list in
AIM_TRUSTED_ISSUERS. It does not run them. - Standards followed: RFC 8693, 7519, 7515, 7518, 7517, 7638, 8414, SPIFFE, and the IETF WIMSE drafts.
Apache-2.0. See LICENSE and NOTICE.md.
The tree-sitter helper crate under crates/ adopts grammar-vendoring code from colbymchenry/codegraph and DeusData/codebase-memory-mcp (both MIT). See that crate's source for details.
See SECURITY.md. Report privately through GitHub's private vulnerability disclosure for this repository. The file gives an email address as a fallback.