Generic FastAPI service layer for AgentGraph Core.
Project description
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 /summaryGET|POST /agentsGET|POST /graphsGET|POST /toolsGET|POST /tools/executionsGET /tools/executions/{id}POST /tools/executions/{id}/decisionGET|POST /runsPOST /runs/importGET /runs/{id}GET /runs/{id}/eventsGET /runs/{id}/artifactsGET /human-gatesGET /human-gates/{id}POST /human-gates/{id}/decisionGET|POST /knowledgeGET /knowledge/{id}GET /knowledge/{id}/evidencePOST /knowledge/{id}/decisionGET|POST /schedulesGET /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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentgraph_api-0.1.0.tar.gz.
File metadata
- Download URL: agentgraph_api-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
140dbb295a4a7acb798721b719269dd227f908c2721c3612f44267a55b359c9d
|
|
| MD5 |
0249db1625fde71c41314b02712c25ca
|
|
| BLAKE2b-256 |
8dd97c10c5f36c24bc88da781ff37a0e7850dbcb1a648d6deff433c7e4299476
|
File details
Details for the file agentgraph_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentgraph_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff3835d3de9ecff50497c49de54fcb459211e47b185d781a338efc768e86b3de
|
|
| MD5 |
52307b2075ae9a3acd96f5913991fd72
|
|
| BLAKE2b-256 |
4d3a9ea2fd35cb818bc70df4f83973d912d6b5b2e9aa73573637c3b8ddfc2136
|