AbstractGateway: deployable Run Gateway host for AbstractRuntime (commands + ledger).
Project description
AbstractGateway
AbstractGateway is a deployable Run Gateway host for AbstractRuntime runs:
- start durable runs
- accept a durable command inbox
- replay/stream a durable ledger (replay-first)
- enforce a security baseline (token + origin allowlist + limits)
This decouples the gateway service from any specific UI (AbstractFlow, AbstractCode, web/PWA thin clients).
Start here: docs/getting-started.md
Quickstart (HTTP server, bundle mode)
pip install "abstractgateway[http]"
export ABSTRACTGATEWAY_FLOWS_DIR="/path/to/bundles" # *.flow dir (or a single .flow file)
export ABSTRACTGATEWAY_DATA_DIR="$PWD/runtime/gateway"
# Required by default: the server refuses to start without a token.
export ABSTRACTGATEWAY_AUTH_TOKEN="$(python -c 'import secrets; print(secrets.token_urlsafe(32))')"
# Browser-origin allowlist (glob patterns). Default allows localhost; customize when exposing remotely.
export ABSTRACTGATEWAY_ALLOWED_ORIGINS="http://localhost:*,http://127.0.0.1:*"
abstractgateway serve --host 127.0.0.1 --port 8080
OpenAPI docs (Swagger UI): http://127.0.0.1:8080/docs
Smoke checks:
curl -sS "http://127.0.0.1:8080/api/health"
curl -sS -H "Authorization: Bearer $ABSTRACTGATEWAY_AUTH_TOKEN" \
"http://127.0.0.1:8080/api/gateway/bundles"
Client contract (replay-first)
- Clients start runs:
POST /api/gateway/runs/start - Clients act by submitting durable commands:
POST /api/gateway/commands- supported types:
pause|resume|cancel|emit_event|update_schedule|compact_memory
- supported types:
- Clients render by replaying/streaming the durable ledger:
- replay:
GET /api/gateway/runs/{run_id}/ledger?after=... - stream (SSE):
GET /api/gateway/runs/{run_id}/ledger/stream?after=...
- replay:
See docs/api.md for curl examples and the live OpenAPI spec (/openapi.json).
Install
Base (runner + stores + CLI)
Requires Python >=3.10 (see pyproject.toml).
pip install abstractgateway
HTTP API/SSE server (FastAPI + Uvicorn)
pip install "abstractgateway[http]"
Optional extras
abstractgateway[visualflow]: run VisualFlow JSON from a directory of*.jsonfiles (requiresabstractflow)abstractgateway[telegram]: Telegram bridge dependenciesabstractgateway[voice]: enable voice/audio endpoints (TTS/STT) viaabstractvoiceabstractgateway[all]: batteries-included install (HTTP + tools + voice + media + visualflow)abstractgateway[dev]: local test/dev deps
Bundle-dependent dependencies (only if your workflows need them)
- LLM/tool nodes in bundle mode require AbstractRuntime’s AbstractCore integration.
- If you installed
abstractgateway[http], this is already included. - If you installed only the base package, install it explicitly:
- If you installed
pip install "abstractruntime[abstractcore]>=0.4.0"
Visual Agent nodes require abstractagent (also included by abstractgateway[http]):
pip install abstractagent
For details on ABSTRACTGATEWAY_PROVIDER/MODEL, store backends, and workflow sources, see docs/configuration.md.
Creating a .flow bundle (authoring)
Use AbstractFlow to pack a bundle:
abstractflow bundle pack /path/to/root.json --out /path/to/bundles/my.flow --flows-dir /path/to/flows
See docs/getting-started.md for running, split API/runner, and file→SQLite migration.
Docs
Project docs
- Changelog: CHANGELOG.md (compat:
CHANGELOD.md) - Contributing: CONTRIBUTING.md
- Security policy (vulnerability reporting): SECURITY.md
- Acknowledgments: ACKNOWLEDGMENTS.md (compat:
ACKNOWLEDMENTS.md)
Package docs
- Docs index: docs/README.md
- Getting started: docs/getting-started.md
- FAQ: docs/faq.md
- Architecture: docs/architecture.md
- Configuration: docs/configuration.md
- API overview: docs/api.md
- Security: docs/security.md
- Operator tooling (optional): docs/maintenance.md
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
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 abstractgateway-0.2.1.tar.gz.
File metadata
- Download URL: abstractgateway-0.2.1.tar.gz
- Upload date:
- Size: 281.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc6a64d0a8b750c05008290d5f1ea8c911297b5c67ffefcf3d9d7e4f0320478b
|
|
| MD5 |
1d95716aaa4dc3d3096a213480d08892
|
|
| BLAKE2b-256 |
c516c1e226f8f77aceaace5dcd3a03731abe6bd1938372fc37fb9851c06ecd62
|
File details
Details for the file abstractgateway-0.2.1-py3-none-any.whl.
File metadata
- Download URL: abstractgateway-0.2.1-py3-none-any.whl
- Upload date:
- Size: 209.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e0148f99ac08295619162b987513e9f1dc1973b3726f22412381552b7862578
|
|
| MD5 |
09480aa2bcae6519dd2be482ce3b75bd
|
|
| BLAKE2b-256 |
75a5f115c5b0a9100f9362e9ce4494d23694bc1af89d8647ff6eb84443ecd608
|