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.0.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.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentforge_chat_http-0.3.0.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.0.tar.gz
Algorithm Hash digest
SHA256 c6f17a70df2883e0c704260630b157699217e33545a83915616b0f5bd11ac308
MD5 f5f28b36ec71570d102e60852e513be1
BLAKE2b-256 b04acc8e37bece7c5d625bb78cc8388e635fe87f6801239d5d156dfb9238058c

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentforge_chat_http-0.3.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentforge_chat_http-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f16308f14abaf6b418d131a752ca8fb9af61cb4e7136b7f1bd8e71b730dfa8af
MD5 cdcaae0d28fc7b4edfb5e2afbbe85418
BLAKE2b-256 ffabf9b96927c463f41fa3891863d148262ec772008ed3cd4650a000f12ed616

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentforge_chat_http-0.3.0-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