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 Distribution

agentforge_chat-0.2.2.tar.gz (27.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-0.2.2-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agentforge_chat-0.2.2.tar.gz
Algorithm Hash digest
SHA256 2f8ffcae59d37e1adea8e21e053ff50d2ae76589ec5032862ab4a0fc057f9c5a
MD5 aa70775c23e15bed1ed28b2db63088ab
BLAKE2b-256 a1f73890165eef315f69cfea3a09bc6e31583547d6eb9b7d10a7cd9b036f8a8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agentforge_chat-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e7bb218b0c6790d7b97f93f077c6974e2240df12370291c8e588125172994caf
MD5 a098325878f6e74418035e4af25a37df
BLAKE2b-256 3f79cfd4ab6c047fbd543c295f9d98812ac009cefe636a796b2eed1029624ab5

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