| FastAPI |
await executor.run(...) in routes; create_app mounts the tool server |
server (mount only) |
FastAPI |
examples/backend_fastapi.py
examples/backend_common.py |
tests/docs/test_backend_examples.py::test_fastapi_routes_approve_ask_and_mount_the_tool_server in docs-examples |
| Starlette |
Mount("/agent", app=create_app(registry, ...)) |
server |
Other web frameworks |
examples/backend_other_asgi.py |
tests/docs/test_backend_handler_examples.py::test_other_asgi_starlette_mount in docs-examples |
| Litestar, Quart, Sanic |
mount create_app(registry, ...) as an ASGI app |
server |
Other web frameworks |
none |
documented recipe: the same ASGI app is tested under Starlette |
| Flask |
run_sync(..., timeout=) in views; create_wsgi_app mounts the tool server |
server-wsgi (mount only) |
Flask |
examples/backend_flask.py |
tests/docs/test_backend_examples.py::test_flask_views_run_sync_approve_and_mount_the_wsgi_tool_server in docs-examples |
| Django |
await in async views, run_sync in sync views; create_app beside it |
server (tool server only) |
Django |
examples/backend_django.py |
tests/docs/test_backend_examples.py::test_django_async_and_sync_views_approve_and_ask in docs-examples
tests/docs/test_backend_examples.py::test_django_asgi_app_serves_django_and_the_tool_server in docs-examples |
| aiohttp |
a handler that forwards to ToolService |
none |
Other web frameworks |
examples/backend_other_asgi.py |
tests/docs/test_backend_handler_examples.py::test_other_asgi_forward_and_grpc_servicer in core, core-floor, docs-examples; the shim's forward
tests/docs/test_backend_handler_examples.py::test_other_asgi_aiohttp_shim skipped: no nox session installs aiohttp |
| gRPC |
servicer await invoke(...); sync servers run_sync or LoopRunner |
none |
Other web frameworks |
examples/backend_other_asgi.py |
tests/docs/test_backend_handler_examples.py::test_other_asgi_forward_and_grpc_servicer in core, core-floor, docs-examples; fake request, no grpc |
| Celery |
run_sync(..., timeout=) in the task body |
none |
Celery |
examples/backend_celery.py |
tests/docs/test_backend_examples.py::test_celery_task_bodies_park_and_resume_without_celery in core, core-floor, docs-examples
tests/docs/test_backend_examples.py::test_celery_tasks_run_eagerly_and_resume_after_review in docs-examples |
| RQ, Dramatiq, Huey |
LoopRunner().run(lambda: handle_envelope(...)) |
none |
Queues and consumers |
examples/backend_queue.py |
tests/docs/test_backend_handler_examples.py::test_queue_sync_job_and_activity in core, core-floor, docs-examples; job body, no broker |
| Arq, Taskiq |
await handle_envelope(executor, payload, message_id=...) |
none |
Queues and consumers |
examples/backend_queue.py |
tests/docs/test_backend_handler_examples.py::test_queue_consumer_acks_parks_dead_letters_and_redelivers in core, core-floor, docs-examples; fake queue |
| Kafka, SQS, Pub/Sub consumers |
await handle_envelope(...); ack by reply status |
none |
Queues and consumers |
examples/backend_queue.py |
tests/docs/test_backend_handler_examples.py::test_queue_consumer_acks_parks_dead_letters_and_redelivers in core, core-floor, docs-examples; fake queue, no broker
tests/docs/test_backend_handler_examples.py::test_queue_pubsub_push_uses_the_stable_message_id in core, core-floor, docs-examples |
| Temporal activities |
await handle_envelope(...) in the activity |
none |
Queues and consumers |
examples/backend_queue.py |
tests/docs/test_backend_handler_examples.py::test_queue_sync_job_and_activity in core, core-floor, docs-examples; activity body, no worker |
| AWS Lambda |
handler = tool_handler(executor, tools=..., timeout=...) |
none |
Serverless functions |
examples/backend_serverless.py |
tests/docs/test_backend_handler_examples.py::test_serverless_lambda_parks_reviews_and_resumes_once in core, core-floor, docs-examples; fake SQS events |
| Cloud Run functions, Azure Functions, Modal |
await handle_envelope(...), or the sync tool_handler |
none |
Serverless functions |
examples/backend_serverless.py |
tests/docs/test_backend_handler_examples.py::test_serverless_async_function_returns_problems in core, core-floor, docs-examples; function body, no host runtime |
| Airflow, Prefect, Dagster |
async task await executor.run_many(...); sync run_sync |
none |
Data pipelines |
examples/backend_pipeline.py |
tests/docs/test_backend_handler_examples.py::test_pipeline_task_partition_and_one_backend_per_process in core, core-floor, docs-examples; no orchestrator |
| Ray, Spark |
run_sync(...) in a remote function or a partition body |
none |
Data pipelines |
examples/backend_pipeline.py |
tests/docs/test_backend_handler_examples.py::test_pipeline_task_partition_and_one_backend_per_process in core, core-floor, docs-examples; no orchestrator |
| Jupyter |
top-level await executor.run(...), or run_sync |
none |
Notebooks and apps |
examples/backend_notebook.py |
tests/docs/test_backend_handler_examples.py::test_notebook_cell_streamlit_and_gradio in core, core-floor, docs-examples |
| Streamlit |
run_sync(..., timeout=); the backend in st.cache_resource |
none |
Notebooks and apps |
examples/backend_notebook.py |
tests/docs/test_backend_handler_examples.py::test_notebook_cell_streamlit_and_gradio in core, core-floor, docs-examples; fake st |
| Gradio |
an async handler that awaits executor.run(...) |
none |
Notebooks and apps |
examples/backend_notebook.py |
tests/docs/test_backend_handler_examples.py::test_notebook_cell_streamlit_and_gradio in core, core-floor, docs-examples; no gradio |
| Scripts and CLIs |
run_sync(batch) with executor.run_many(...) in main(argv) |
none |
Scripts and batch jobs |
examples/backend_script.py |
tests/docs/test_backend_examples.py::test_script_runs_a_batch_denies_unattended_and_sets_the_exit_code in core, core-floor, docs-examples
tests/docs/test_backend_examples.py::test_script_asks_on_the_terminal_when_interactive in core, core-floor, docs-examples |
| Any warm sync process |
LoopRunner().run(executor.run(...), timeout=...) |
none |
Runtime |
examples/backend_loop_runner.py |
tests/docs/test_deploy_examples.py::test_loop_runner_example_keeps_one_client_warm in core, core-floor, docs-examples |
| Other languages over HTTP |
create_app(registry, ...); REST + SSE from any client |
server |
HTTP tool server |
examples/serve_tools.py |
tests/server/test_examples_server.py::test_serve_tools_demo in core, core-floor, server
tests/server/test_examples_server.py::test_serve_tools_builds_the_app in server |
| Other languages over MCP |
streamable_http_app(registry) at /mcp |
mcp |
Cross-language: MCP |
examples/mcp_http.py |
tests/integrations/mcp/test_examples.py::test_mcp_http_builds_the_app_at_mcp in contract-all-compatible, contract-mcp |
| TypeScript client |
@agent-adapter/client against create_app |
server |
Cross-language: TypeScript client |
clients/typescript/examples/quickstart.ts |
tests/server/test_ts_client.py::test_typescript_client_against_the_live_server in ts; runs node --test |