Skip to main content

Chat-agent runtime (ChatSession + history drivers + truncation) for AgentForge

Project description

agentforge-chat

Chat-agent runtime for AgentForge: ChatSession, InMemoryChatHistory / SqliteChatHistory drivers, and four truncation strategies (sliding-window, token-budget, summarise-oldest, hybrid).

See docs/features/feat-020-chat-agents.md for the design and runbook.

Install

pip install agentforge-chat
# or, with the SQLite driver pre-pulled:
pip install "agentforge-chat[sqlite]"

Three-line chat from a one-shot agent

from agentforge import Agent
from agentforge_chat import ChatSession, SqliteChatHistory

agent = Agent(model="anthropic:claude-sonnet-4-6", strategy="react")
session = ChatSession(
    agent=agent,
    history_store=await SqliteChatHistory.from_path("./chat.db"),
)
print((await session.send("Hi")).content)
print((await session.send("What did I just say?")).content)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

agentforge_chat-0.2.1-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file agentforge_chat-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agentforge_chat-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e5c34b96213f0a014347f9c49e8b60373c65045aa077990825e05f09cd238c62
MD5 df1c3388879b020e93cc7951df0bbd33
BLAKE2b-256 e9b898d4b775f37c19b3c29116150b26e0349b904dce5fd3bfed234956ec9223

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