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

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentforge_chat_http-0.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 cf46a7027fe70579a25f69d00eac6a487b80b1ed46922fbe96cbaa2de673c712
MD5 f4a40c78a804907247fe19bbc76c33f8
BLAKE2b-256 1eeae1bcd23e48966321fc7a6792a7230e2dfb4b09bfff818cd44f0c88fe6139

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for agentforge_chat_http-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dde0868e36f2268397013f20de2c0f6fa08743a2844bef8ff5e1b7dba620a846
MD5 27ae3fc45760dae7c35c1ecacba7eae2
BLAKE2b-256 3d09865bf458b973d65ad9605e14f7a88a9998fb9c78c02e249e408ed6a1e712

See more details on using hashes here.

Provenance

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