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.6.1.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.6.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentdom-3.6.1.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.6.1.tar.gz
Algorithm Hash digest
SHA256 b2ddce44fec9978a99c8da7251e790a83374b98accd2ebad1e23915275af9c96
MD5 b958d6125018978965159563463c6578
BLAKE2b-256 5067214ade3282b12a502ddc4d7bf4a1beb9722e1c4e5564e015ea2ba1977bb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentdom-3.6.1.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.6.1-py3-none-any.whl.

File metadata

  • Download URL: agentdom-3.6.1-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.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ff2a6fdcfffea2d3fccc05de9708c205b14d9cee8ea237a4aeb1b0969988455
MD5 0e1fedfd8ca49586794c6b9d597fff10
BLAKE2b-256 4be2cc7ef66d6cdc36886022be01750cadc90628466bf0a53c03601698d93f6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentdom-3.6.1-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