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.3.tar.gz (11.2 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.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentforge_chat_http-0.2.3.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agentforge_chat_http-0.2.3.tar.gz
Algorithm Hash digest
SHA256 eeddfb22be7a895e65e980e04f644a5e533ebcae11cc789d547b2aaa90c5a581
MD5 50e42bf3d8ed5b7938d83728791f2824
BLAKE2b-256 456c527c22dabf7790ed974c4eb2b37048fdc05f4e89632d79768879066b80ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentforge_chat_http-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agentforge_chat_http-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 76812984b21fc0b130f15722d055e32441dbb9416abd5bd2428108282859d836
MD5 590bcd4ce3691a2a924cb08f70c5a808
BLAKE2b-256 67121ae6c93247427e3b50468b8df11084db574331edc7f06b7d8e5e3c01b01d

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