Skip to main content

Agentity Protocol Registry — REST API for DID lookup, revocation, WebSocket, audit

Project description

agentity-registry

FastAPI REST registry for the Agentity Protocol. Register agent identities, lookup DID status, revoke tokens, stream events via WebSocket — with OIDC auth, rate limiting, and signed audit logs.

Installation

pip install agentity-registry

Quick start

# In-memory (no dependencies)
uvicorn agentity_registry.main:app --port 8000

# With OIDC auth
cp .env.example .env   # fill in Google/GitHub credentials
uvicorn agentity_registry.main:app --port 8765

# Production (PostgreSQL + Redis)
AGENTITY_STORE=postgres docker compose up -d

Endpoints

Method Path Description
GET /health Health check + store + auth info
POST /register Register an agent AID
GET /did/{did} Get full AID document
GET /did/{did}/status Get AID status (active/revoked/expired)
POST /revoke Revoke an AID (optional cascade)
GET /agents List all registered agents
GET /audit Get all audit log entries
GET /audit/{did} Get audit log for a specific DID
GET /audit/{did}/verify Verify an audit entry signature
WS /ws Real-time event stream (created/revoked)

Authentication endpoints (if OIDC enabled)

Method Path Description
GET /auth/login/{provider} OIDC login (google, github, apple, microsoft)
GET /auth/callback/{provider} OIDC callback
GET /auth/session/{token} Get verified owner session

Configuration

Env var Default Description
AGENTITY_STORE memory memory or postgres
REDIS_URL redis://localhost:6379 Redis for rate limiting
DATABASE_URL postgresql://... PostgreSQL connection
AGENTITY_EVM_RPC_URL Optional EVM bridge RPC

OIDC env vars

GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, APPLE_CLIENT_ID, APPLE_CLIENT_SECRET, MICROSOFT_CLIENT_ID, MICROSOFT_CLIENT_SECRET

Features

  • Pluggable storage — InMemoryStore (dev) / PostgresStore (prod)
  • Rate limiting — Redis-backed, 100 req/min per DID, X-RateLimit-Remaining header
  • Signed audit log — HMAC-SHA256 on each entry, verifiable
  • WebSocket broadcasts — Real-time revocation events
  • EVM bridge — Optional on-chain DID registration (via agentity-evm)

Tests

pip install -e .[dev]
pytest agentity_registry/tests/

License: Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentity_registry-0.1.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentity_registry-0.1.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file agentity_registry-0.1.1.tar.gz.

File metadata

  • Download URL: agentity_registry-0.1.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for agentity_registry-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c46850090d19d8dcd82f483be4c3fb5e217f41c3ad879c28516334a69bffe25a
MD5 f95a5232ca1e9957e46e5b000009b2ed
BLAKE2b-256 48c3c720da381e2eb32e343a2fe6ec8b1b81b715920e3ff89f11ec4e5bf0cf45

See more details on using hashes here.

File details

Details for the file agentity_registry-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agentity_registry-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8cbd0b0058f3b5a6b271b9aaa84e9b067ce37d91f02691dee064aeb998354c95
MD5 60e392451698c365f560cbd35873b344
BLAKE2b-256 db6b038b0318b89d7bfc0237ea54da2ad2020512337d5e1fd252098e7c353d82

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page