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.2.4.tar.gz (11.6 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.2.4-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agentforge_chat_http-0.2.4.tar.gz
Algorithm Hash digest
SHA256 16d02ba109a9d70c44f994d799c9c628ffb7f34c0d17b1813ee98ddd25b0c501
MD5 e9622abae9f7f5a1b17faf9909ac0ece
BLAKE2b-256 11b7bec2642ebd34755b0214180b19767213fb32693e97b7b3ebc2db43a90d20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agentforge_chat_http-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3b3482cfa1ede21dd382cf5935bc12ded30a95f64be0f5603f07c63b902aca86
MD5 a77d575ed9b5373ef9d311cfea34991d
BLAKE2b-256 1d24da8a171f92d6c6cbf95438fbc9934b4d46e3e84ef8e00269ac723d48d4d4

See more details on using hashes here.

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