agent-webkit-server
Server-side toolkit for exposing the Claude Agent SDK over HTTP+SSE. One Python package; bundled adapters cover the common deployment shapes.
Install
pip install agent-webkit-server # core only
pip install "agent-webkit-server[fastapi]" # + FastAPI HTTP adapter
pip install "agent-webkit-server[postgres]" # + PgSessionStore
pip install "agent-webkit-server[fastapi,postgres]"
Core
Framework-agnostic primitives — no FastAPI, no asyncpg until you opt in.
from agent_webkit_server import PROTOCOL_VERSION
from agent_webkit_server.session import SessionRegistry, SessionConfig
from agent_webkit_server.event_log import EventLog
from agent_webkit_server.sdk_bridge import (
PermissionRouter,
build_can_use_tool,
translate_sdk_messages,
)
These pieces are what you'd otherwise reimplement: per-session inbound queue + receive-loop, append-only event log with multi-subscriber fan-out, permission/AskUserQuestion correlation router, the can_use_tool wiring, and the SDK→wire-event translator.
FastAPI adapter
from agent_webkit_server.adapters.fastapi import create_app
from agent_webkit_server.auth import AuthConfig
app = create_app(auth=AuthConfig.from_env())
Exposes:
POST /sessionsGET /sessions/{id}/stream(SSE, withLast-Event-IDresume)POST /sessions/{id}/input(every inbound message type)DELETE /sessions/{id}
Postgres adapter (PgSessionStore)
Plug into the SDK directly via ClaudeAgentOptions(session_store=...):
from claude_agent_sdk import ClaudeAgentOptions, ClaudeSDKClient
from agent_webkit_server.adapters.pg_session_store import PgSessionStore
store = await PgSessionStore.connect("postgresql://...")
options = ClaudeAgentOptions(session_store=store, resume=session_id)
client = ClaudeSDKClient(options=options)
Passes the SDK's published run_session_store_conformance suite plus adapter-specific contracts (uuid idempotency, concurrent-append serialization, multi-tenant isolation).
Wire protocol
Documented in docs/wire-protocol.md. The Pydantic models in agent_webkit_server.models are the canonical schema.
Metadata
Release files for agent-webkit-server 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_webkit_server-0.2.0.tar.gz | 17.3 kB | With provenance | Details for agent_webkit_server-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_webkit_server-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for agent_webkit_server-0.2.0-py3-none-any.whl |
Total release size: 40.0 kB
Release files / agent_webkit_server-0.2.0.tar.gz
| Download URL | agent_webkit_server-0.2.0.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d848a16c70ca6842269a971e6477b3cc431076cd7fe225f3774664ef743cbe92
|
|
BLAKE2b-256 checksum How to use checksums |
389ef75f18588591d1e20d03a73b6505a8ece4927545b1b19a3b75a1e48c72bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 27, 2026.
Transparency logRelease files / agent_webkit_server-0.2.0-py3-none-any.whl
| Download URL | agent_webkit_server-0.2.0-py3-none-any.whl |
|---|---|
| Size | 22.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a37b7ba25622744040d250748f235ee8a71df3b092cbdaa54b0765b41d00a82e
|
|
BLAKE2b-256 checksum How to use checksums |
10f6dc2b07d9ad67fd7e3743c2b322499bdcdf48d945eff0930e2926feefee12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 27, 2026.
Transparency logSecurity for agent-webkit-server 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
Both files in this release have been uploaded with provenance metadata.
Attestation for agent_webkit_server-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 Apr 27, 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.