agent-workbench-fastapi
Thin streaming adapter for mounting a standalone Agent Workbench service in a FastAPI application without giving the Python process a Node or Postgres dependency.
pip install agent-workbench-fastapi
from contextlib import asynccontextmanager
from fastapi import FastAPI
from agent_workbench_fastapi import AgentWorkbenchProxy
workbench = AgentWorkbenchProxy("http://agent-workbench:8080/api/agent")
@asynccontextmanager
async def lifespan(_app: FastAPI):
await workbench.verify_upstream()
yield
app = FastAPI(lifespan=lifespan)
app.mount("/api/agent", workbench)
The proxy forwards only standard content negotiation, content, authentication,
cookie, tracing, and idempotency headers by default. It does not forward
client-supplied identity or tenant headers. The upstream Workbench service must
verify the user credential, or the host must provide a resolve_headers
callback that creates a trusted service-to-service identity assertion.
Request and response bodies are streamed. Long-running agent responses are not buffered by the adapter.
The adapter validates and caches the upstream service manifest before the first
forwarded request. It returns agent_protocol_incompatible when the service is
not Agent Workbench protocol v1, and agent_service_unavailable when it cannot
be reached. Calling verify_upstream() during FastAPI lifespan makes a bad
sidecar fail application startup instead of waiting for live traffic.
The adapter and TypeScript runtime have independent versions. Python releases
use tags in the form agent-workbench-fastapi-vX.Y.Z and are published to
PyPI. The Agent Workbench service itself can run beside the FastAPI application
or elsewhere on the company's private network.
Metadata
Release files for agent-workbench-fastapi 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_workbench_fastapi-0.2.0.tar.gz | 5.3 kB | With provenance | Details for agent_workbench_fastapi-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_workbench_fastapi-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for agent_workbench_fastapi-0.2.0-py3-none-any.whl |
Total release size: 10.0 kB
Release files / agent_workbench_fastapi-0.2.0.tar.gz
| Download URL | agent_workbench_fastapi-0.2.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
374dc3c46cbb247ccbc3b64c737c7c90b0ab2f7e9cb1c378cf736fd13d9c48c5
|
|
BLAKE2b-256 checksum How to use checksums |
75f292c5083eee92decb1e7f1eaf6abd4c91c15ab7a57bfde6e8cb06929e98ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency logRelease files / agent_workbench_fastapi-0.2.0-py3-none-any.whl
| Download URL | agent_workbench_fastapi-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b52e9e73346497f214afdb8774bb06e3033a01009418cbf96f48b3cbb92c9c71
|
|
BLAKE2b-256 checksum How to use checksums |
d76e4f506e58bc15e2b18d8f0dc6b341477f0cf301e4ed1a813eea186858a6b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency logSecurity for agent-workbench-fastapi 0.2.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for agent_workbench_fastapi-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency logA 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.