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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agentforge_chat-0.4.0.tar.gz
Algorithm Hash digest
SHA256 be1123e315ebf32fa7abdf9c3a95bb75d885bf8c07ec8cf879886d9328462501
MD5 f065a8d6f31f86ef7ebacab70a046cda
BLAKE2b-256 3c2f669adfde756f0f2eba5d8d98c4fcda549be86a7834535597af572946ca0c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: agentforge_chat-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentforge_chat-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e778beadaf078c7a82eeff18fb4f519ccbbc106ed95e10fb1fffe1a02a1def1
MD5 815cbcd8a5ce0a2dcbe01dafba2cbe1e
BLAKE2b-256 54bd47479323b2022690bb9b09e6193ade69c134c8efbaf75645bc703a788fb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentforge_chat-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