Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_workbench_fastapi-0.2.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_workbench_fastapi-0.2.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file agent_workbench_fastapi-0.2.0.tar.gz.

File metadata

  • Download URL: agent_workbench_fastapi-0.2.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agent_workbench_fastapi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 374dc3c46cbb247ccbc3b64c737c7c90b0ab2f7e9cb1c378cf736fd13d9c48c5
MD5 43d9b2ab6c8d39629c9d53d311c6b989
BLAKE2b-256 75f292c5083eee92decb1e7f1eaf6abd4c91c15ab7a57bfde6e8cb06929e98ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_workbench_fastapi-0.2.0.tar.gz:

Publisher: python-release.yml on Dark-Horse-Labs/agent-workbench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_workbench_fastapi-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_workbench_fastapi-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b52e9e73346497f214afdb8774bb06e3033a01009418cbf96f48b3cbb92c9c71
MD5 65232331b637c1f09810ccfa20108d5f
BLAKE2b-256 d76e4f506e58bc15e2b18d8f0dc6b341477f0cf301e4ed1a813eea186858a6b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_workbench_fastapi-0.2.0-py3-none-any.whl:

Publisher: python-release.yml on Dark-Horse-Labs/agent-workbench

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

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