Skip to main content

The universal runtime that makes every website, desktop app, and API accessible to AI agents — zero human in the loop.

Project description

agentdom

The universal runtime that makes every website, desktop app, and API accessible to AI agents — zero human in the loop.

PyPI version Python versions License npm

Website · Docs · GitHub · npm package


Install

pip install agentdom

With framework support:

pip install "agentdom[flask]"    # Flask integration
pip install "agentdom[fastapi]"  # FastAPI integration
pip install "agentdom[dispatch]" # dispatch_intent() support (requires httpx)
pip install "agentdom[all]"      # everything

Quick start — dispatch an intent

import asyncio
from agentdom import dispatch_intent

async def main():
    # Create a GitHub issue — routes via REST API, no browser needed
    result = await dispatch_intent(
        "issues.create",
        {
            "title": "Login crash on iOS 17",
            "body":  "Reproducible on iPhone 15 Pro",
            "labels": ["bug", "mobile"],
        },
        host="github.com",
    )
    print(result)  # → {"id": 42, "url": "https://github.com/..."}

asyncio.run(main())

Or synchronously:

from agentdom import dispatch_intent_sync

result = dispatch_intent_sync("repos.list", {"username": "octocat"}, host="github.com")

Embed AgentDOM in your app

Flask

from flask import Flask
from agentdom import AgentDOM

app = Flask(__name__)
agent = AgentDOM(
    host="api.myapp.com",
    auth={"method": "api_key", "key_header": "Authorization"},
)

@agent.capability("todos.create", description="Create a new todo item",
                  args={"title": {"type": "string", "required": True}})
def create_todo(args):
    return {"id": 1, "title": args["title"]}

@agent.capability("todos.list", description="List all todo items")
def list_todos(args):
    return [{"id": 1, "title": "Buy milk"}]

agent.register(app)

# Now your app automatically serves:
#   GET  /.well-known/agentdom.json  → manifest
#   POST /api/agentdom/todos.create  → your handler
#   POST /api/agentdom/todos.list    → your handler

FastAPI

from fastapi import FastAPI
from agentdom import AgentDOM

app = FastAPI()
agent = AgentDOM(host="api.myapp.com")

@agent.capability("orders.ship", description="Ship a pending order",
                  args={"order_id": {"type": "string", "required": True}})
async def ship_order(args):
    # async handlers are fully supported
    return await shipping_service.ship(args["order_id"])

agent.register(app)

Standalone manifest

from agentdom import AgentDOM

agent = AgentDOM(host="api.myapp.com")

@agent.capability("items.create", description="Create an item")
def create_item(args):
    return {"created": True}

# Get the manifest dict to serve however you like
manifest = agent.manifest()
print(manifest)
# → {"version": "1.0", "host": "api.myapp.com", "capabilities": [...], ...}

Auth configuration

# API key
agent = AgentDOM(
    host="api.myapp.com",
    auth={
        "method": "api_key",
        "key_header": "Authorization",
        "key_format": "Bearer {token}",
    },
)

# OAuth 2.0
agent = AgentDOM(
    host="api.myapp.com",
    auth={
        "method": "oauth2",
        "auth_url":  "https://api.myapp.com/oauth/authorize",
        "token_url": "https://api.myapp.com/oauth/token",
        "scopes":    ["read", "write"],
    },
)

# No auth (public API)
agent = AgentDOM(host="api.myapp.com", auth={"method": "none"})

Environment variables

Variable Description
AGENTDOM_API_URL Override the AgentDOM API server URL
AGENTDOM_TOKEN Default auth token for dispatch_intent
<HOST>_TOKEN Per-host token (e.g. GITHUB_COM_TOKEN)

Agent Token Protocol

Publishers can declare an agent_tokens endpoint so agents provision their own scoped tokens automatically:

agent = AgentDOM(
    host="api.myapp.com",
    auth={
        "method": "api_key",
        "agent_tokens": {
            "issue":  "POST https://api.myapp.com/agent-tokens",
            "revoke": "DELETE https://api.myapp.com/agent-tokens/{id}",
            "scopes": ["read", "write"],
            "max_ttl_seconds": 86400,
        },
    },
)

Supported providers

Provider Auth Capabilities
github.com Device Flow repos, issues, PRs, actions (811)
linear.app OAuth 2.0 issues, teams, cycles (8)
slack.com OAuth 2.0 messages, channels (6)
notion.so OAuth 2.0 pages, databases (6)
stripe.com API Key payments, customers (442)
resend.com API Key emails, domains (5)

More providers at getagentdom.com/providers.

License

MIT © Ragavendhra Machikatla

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

agentdom-3.7.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

agentdom-3.7.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file agentdom-3.7.0.tar.gz.

File metadata

  • Download URL: agentdom-3.7.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentdom-3.7.0.tar.gz
Algorithm Hash digest
SHA256 8494c91715872c0d658799369e802de154c56dc7a710f9dddf0ad8fb42d1c52b
MD5 6ba8ccb2c18ba3628b046dfa560f13d2
BLAKE2b-256 7af6509e6f9fc3b09d74d9635d04c4e7f56aa098d17a12475c755f36ffd580be

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentdom-3.7.0.tar.gz:

Publisher: publish-pypi.yml on RagavRida/agentdom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentdom-3.7.0-py3-none-any.whl.

File metadata

  • Download URL: agentdom-3.7.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentdom-3.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4d856662d3c306161c488e5ad75f7cbbd632044bc96f9ecee3064079f14a1f7
MD5 fa7e6cbdd412dbddc4f52094b7eb8ded
BLAKE2b-256 ebffd7dbdccbe85a88c4babbea3b604aa5c693cddf0796950300bc67b9203975

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentdom-3.7.0-py3-none-any.whl:

Publisher: publish-pypi.yml on RagavRida/agentdom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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