While authed is open source, we are currently only support our hosted registry (https://api.getauthed.dev). Self-hosting registries is possible but not officially supported or documented yet.

Getting started

Get up and running with Authed in three simple steps:

1

Register as a Provider

Head over to getauthed.dev and create an account. You’ll receive:

  • A Provider ID (unique identifier for your organization)
  • A Provider Secret (keep this safe!)

Register now

Create a provider account to start managing agents

2

Install the SDK

Install using pip:

pip install authed
3

Initialize Your First Agent

# This command will:
# - Generate a secure key pair for your agent
# - Create a new agent under your provider
# - Set up your .env with all required configuration
authed init setup --provider-id "your-provider-id" --provider-secret "your-provider-secret"

Basic integration

Here’s a minimal example using FastAPI:

from fastapi import FastAPI, Request
from authed import Authed, verify_fastapi, protect_httpx
import httpx

app = FastAPI()

# Initialize Authed from environment variables (configured by `authed init setup`)
auth = Authed.from_env()

# Protected endpoint
@app.post("/secure-endpoint")
@verify_fastapi
async def secure_endpoint(request: Request):
    return {"message": "Authenticated!"}

# Making authenticated requests
@app.get("/call-other-agent")
@protect_httpx()
async def call_other_agent():
    async with httpx.AsyncClient() as client:
        response = await client.post(
            "http://other-agent/secure-endpoint",
            headers={"target-agent-id": "target-agent-uuid"},
            json={"message": "Hello!"}
        )
    return response.json()

For brevity, this example shows keys as strings. In practice, you should load them from your environment or key files.

The authed init setup command will automatically configure your environment variables, but here’s what gets set up:

# Registry and agent configuration
AUTHED_REGISTRY_URL="https://api.getauthed.dev"
AUTHED_AGENT_ID="your-agent-id"
AUTHED_AGENT_SECRET="your-agent-secret"

# Keys for signing and verifying requests
AUTHED_PRIVATE_KEY="your-private-key"
AUTHED_PUBLIC_KEY="your-public-key"

Next Steps

Remember to never commit agent secrets or provider credentials to version control. Use environment variables or secure secret management solutions in production.