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

The SQLite history driver (SqliteChatHistory) works out of the box — aiosqlite ships as a hard dependency.

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 Distribution

agentforge_chat-0.2.4.tar.gz (29.8 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-0.2.4-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agentforge_chat-0.2.4.tar.gz
Algorithm Hash digest
SHA256 055ef45dfb8870fea4b4738d756fb8da558524e3c1fc37ffb1801de72a4fead3
MD5 e68e09b1ffd477f7eed209436b03e18d
BLAKE2b-256 22147560ed638b862235504bf388308882ffaa2f231e38555a4974655cfcb93d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agentforge_chat-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 15f7458a7935a7cb1ea5b427b9c6a3f57e66242ef6afa2f1d0edef17b6045e10
MD5 026b44a8efd879c9813c621146788a8e
BLAKE2b-256 1a799d07fc74ea087617ab6b15d57ec3f0280f7bbf30921b0eab31528a41716f

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