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.14.1.tar.gz (64.7 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.14.1-py3-none-any.whl (54.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: 3tears_conversations-0.14.1.tar.gz
  • Upload date:
  • Size: 64.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for 3tears_conversations-0.14.1.tar.gz
Algorithm Hash digest
SHA256 551c44e51b21fdecb49c9697ad0d53981b942e23034cef1d787090d69aacbea6
MD5 dc85f1c04043f91e27c7e2eefa31021a
BLAKE2b-256 f5ce21b8bebecabcac3cc89606381540a77203f134164ba749f714720f9eb3d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: 3tears_conversations-0.14.1-py3-none-any.whl
  • Upload date:
  • Size: 54.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for 3tears_conversations-0.14.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47af4b445fc35e5d80319189bec2ebf472558800233a22cd638deb41d7f9f951
MD5 4b8d3e4881eee5e52b0d50c99dbac2b2
BLAKE2b-256 23366aced58c0d628060f3460dce33f268b05b266fff2180b941357aee16a619

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