Skip to main content

Conversation entity, three-tier collection, and per-agent schema migrations shared by memory and tool packages

Project description

3tears-conversations

Canonical owner of the per-agent conversations table plus its entity and three-tier collection.

Purpose

Tracks one row per user-facing conversation an agent is engaged in: ownership scope (agent_id, customer_id, user_id), external reference (channel_type, conversation_ref), lifecycle (status, summary), timestamps (date_created, date_updated, date_last_message).

This table is owned here because multiple packages key off conversation_id (memory, agent-tools context items, workspace bindings) and no single consumer is the natural owner of the shape. Owning the table here lets each downstream package depend on conversations without pulling in memory's extraction pipeline.

Public API

Exports (see src/threetears/conversations/__init__.py):

  • Conversation -- BaseEntity subclass for a single row.
  • ConversationsCollection -- three-tier (L1 SQLite / L2 NATS KV / L3 postgres) collection with the usual get / save / subscript semantics.
  • register(runner) -- agent-scope migration entry point. Contributes the conversations table creation to a canonical threetears.core.data.migrations.MigrationRunner. No depends_on edges; this is the root of the agent-schema dependency graph, so memory / workspace / tools migrations that reference conversations.id sort after it.

Minimal usage

from threetears.conversations import Conversation, ConversationsCollection, register
from threetears.core.data.migrations import MigrationRunner

# 1. register the package's migrations on the runner
runner = MigrationRunner(store)
register(runner)
await store.run_migrations(runner)

# 2. use the collection like any other 3tears collection
collection = ConversationsCollection(registry=registry)
conv = await collection.get(conversation_id)
conv.summary = "follow-up on last week's analysis"
await conv.save()

Reference

  • Downstream consumers: threetears.agent.memory, threetears.agent.tools (context items), threetears.agent.workspace (bindings)

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

3tears_conversations-0.20.0.tar.gz (65.4 kB view details)

Uploaded Source

Built Distribution

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

3tears_conversations-0.20.0-py3-none-any.whl (55.1 kB view details)

Uploaded Python 3

File details

Details for the file 3tears_conversations-0.20.0.tar.gz.

File metadata

  • Download URL: 3tears_conversations-0.20.0.tar.gz
  • Upload date:
  • Size: 65.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for 3tears_conversations-0.20.0.tar.gz
Algorithm Hash digest
SHA256 558085db46fe2ad75f5d10b6a921a990d5453221b49f6d852d2a9f3642dd7e27
MD5 c41cc2f69725cbeea805a590ffd21abc
BLAKE2b-256 8f0ae4fb85c7a2e9bd43d3f6d566017e5cd2980e7e5325a51d6738a59987e8c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for 3tears_conversations-0.20.0.tar.gz:

Publisher: release.yml on pacepace/3tears

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file 3tears_conversations-0.20.0-py3-none-any.whl.

File metadata

File hashes

Hashes for 3tears_conversations-0.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efbfcee8e432b25b5713431ebb2d23590285b8f30ff1af7be0d283f9013bfabf
MD5 b73e318d744ab9c92c90587596c9c708
BLAKE2b-256 57c18c832b8d23ae30420e12914db8282986bbe0cdf48ddc15905a75e11a8256

See more details on using hashes here.

Provenance

The following attestation bundles were made for 3tears_conversations-0.20.0-py3-none-any.whl:

Publisher: release.yml on pacepace/3tears

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