Skip to main content

FastAPI HTTP + WebSocket + SSE server for AgentForge chat sessions

Project description

agentforge-chat-http

FastAPI server for agentforge-chat: REST + WebSocket + SSE, bearer auth, in-process rate limiting, multi-tenant session isolation.

See docs/features/feat-020-chat-agents.md §4.1 for the HTTP wire format.

Install

pip install agentforge-chat-http

Run a chat server

import asyncio
from agentforge import Agent
from agentforge_chat import InMemoryChatHistory
from agentforge_chat_http import ChatServer, EnvBearerAuth

async def main() -> None:
    server = ChatServer(
        agent_factory=lambda: Agent(model="anthropic:claude-sonnet-4-6", strategy="react"),
        history_store=InMemoryChatHistory(),
        auth=EnvBearerAuth("API_TOKENS"),
        host="0.0.0.0",
        port=8080,
    )
    await server.serve()

asyncio.run(main())

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

agentforge_chat_http-0.3.1.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

agentforge_chat_http-0.3.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file agentforge_chat_http-0.3.1.tar.gz.

File metadata

  • Download URL: agentforge_chat_http-0.3.1.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentforge_chat_http-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5e2af6ed833a69a95b8fb43a0d2fc44887effa18cb14d45d4fc0ccabef48b165
MD5 ca82a5a49002a19a1fa118bfe3f87f26
BLAKE2b-256 a1cb79609b746920dcb7cca27384789929e11b6667922f6595e1b4761ea327e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentforge_chat_http-0.3.1.tar.gz:

Publisher: release.yml on Scaffoldic/agentforge-py

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

File details

Details for the file agentforge_chat_http-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agentforge_chat_http-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb8bde8b1eb7b51502eef98a256086f0add0283ea011112312e6d8e74e81b815
MD5 4eca514fb1c1b08dc7829a670a0335ee
BLAKE2b-256 d466cb906320ad07796b3a5b82c1683a10a51fc1b7aa1ba14d6951aa7ca6851d

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentforge_chat_http-0.3.1-py3-none-any.whl:

Publisher: release.yml on Scaffoldic/agentforge-py

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page