The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
threads/store
Chat thread and message storage: transcript persistence, not memory. The store
API, indexing and CRUD are tinyagents_session::threads in
vendor/tinyagents; this directory keeps only the host wiring and re-exports
the store so callers name crate::threads::store::{...}. Memory v2
(crate::memory) is separate: it only ingests committed turns through its own
bus subscriber (see memory/).
Parts
mod.rs: re-exports the store API.ConversationMessageandConversationMessagePatchare host-spelled aliases of the crate'sThreadMessage/ThreadMessagePatch; type names never reach the disk.blocking.rs:spawn_blockingwrappers around every store entry point. The store is synchronous and takesparking_lotlocks across fsync'd file I/O, so request paths must go throughblockingrather than calling it from anasync fn(#5156).bus.rs: thecore::bussubscriber (register_conversation_persistence_subscriber) that mirrors inbound and processed channel turns into the store, so channel transcripts (Slack, Telegram, ...) persist alongside the UI's own threads. A caller that persists a channel turn itself (the hosted-channel relay) callsclaim_channel_turn(channel, message_id)first; the subscriber skips claimed turns rather than mirroring them under a second thread id. In SaaS the subscriber is not registered and a claim is a no-op, so the untenanted(channel, message_id)key never spans profiles.
Persistence
The runtime installs tinyagents_session::threads with the configured
session store. Local profiles use the workspace-backed driver; shared storage
uses the installed backend. This host module does not choose a filesystem
layout.
Tests
blocking_tests.rs and bus_tests.rs cover the wiring; the store's own tests
live in vendor/tinyagents/crates/tinyagents-session/src/threads/.