Skip to main content

AgentGraph API

AgentGraph API is a generic FastAPI service layer for agentgraph-core.

It is intentionally separate from the core runtime package:

  • agentgraph-core: UI-free runtime/control-plane primitives.
  • agentgraph-api: generic HTTP routes, auth hook, JSON serialization, CRUD, and mirror endpoints.
  • Applications provide their own adapters, tools, authentication, and product UI.

Included routes

All generic routes live under:

/api/agentgraph

Current v0 routes:

  • GET /summary
  • GET|POST /agents
  • GET|POST /graphs
  • GET|POST /tools
  • GET|POST /tools/executions
  • GET /tools/executions/{id}
  • POST /tools/executions/{id}/decision
  • GET|POST /runs
  • POST /runs/import
  • GET /runs/{id}
  • GET /runs/{id}/events
  • GET /runs/{id}/artifacts
  • GET /human-gates
  • GET /human-gates/{id}
  • POST /human-gates/{id}/decision
  • GET|POST /knowledge
  • GET /knowledge/{id}
  • GET /knowledge/{id}/evidence
  • POST /knowledge/{id}/decision
  • GET|POST /schedules
  • GET /schedules/{id}
  • POST /schedules/{id}/decision

Health:

  • GET /health

Minimal usage

from agentgraph_api import AgentGraphApiContext, create_app
from agentgraph_core.models import ToolDefinition, ToolRisk

context = AgentGraphApiContext.create(
    db_path="data/my-project-agentgraph.sqlite3",
    tools=[ToolDefinition(id="echo", name="Echo", description="Echo input", risk=ToolRisk.read)],
    tool_handlers={"echo": lambda payload: {"echo": payload}},
    project_name="my-project",
)

app = create_app(context, auth_token="dev-token")

Run:

uvicorn agentgraph_api.app:app --host 127.0.0.1 --port 18889

Auth

create_app(..., auth_token="...") enables a simple Bearer-token dependency for /api/agentgraph/* routes.

Applications can replace this entirely with their own auth layer. AgentGraph API does not own user/session management.

Application adapter pattern

application UI / service
  -> application adapter
  -> agentgraph-api generic routes
  -> agentgraph-core store + policies
  -> application-specific tools and state authority

Use this package when an application wants the standard AgentGraph HTTP surface without copying FastAPI route code into every project.

Development

python -m venv .venv
. .venv/bin/activate
pip install -e '.[test]'
pytest -q
python -m compileall agentgraph_api tests

Metadata

Release files for agentgraph-api 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentgraph-api 0.1.0
File Size Uploaded Provenance Actions
agentgraph_api-0.1.0.tar.gz 5.1 kB Without provenance Details for agentgraph_api-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentgraph-api 0.1.0
File Interpreter ABI Platform Actions
agentgraph_api-0.1.0-py3-none-any.whl Python 3 none any Details for agentgraph_api-0.1.0-py3-none-any.whl

Total release size: 11.4 kB

Release files / agentgraph_api-0.1.0.tar.gz

Download URL agentgraph_api-0.1.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
140dbb295a4a7acb798721b719269dd227f908c2721c3612f44267a55b359c9d
BLAKE2b-256 checksum
How to use checksums
8dd97c10c5f36c24bc88da781ff37a0e7850dbcb1a648d6deff433c7e4299476
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release files / agentgraph_api-0.1.0-py3-none-any.whl

Download URL agentgraph_api-0.1.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff3835d3de9ecff50497c49de54fcb459211e47b185d781a338efc768e86b3de
BLAKE2b-256 checksum
How to use checksums
4d3a9ea2fd35cb818bc70df4f83973d912d6b5b2e9aa73573637c3b8ddfc2136
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Security for agentgraph-api 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page