Abstract
An AI agent that converses with the same person across several messaging providers — WhatsApp, Telegram, Signal, Discord — conventionally keeps one message history per provider. When a contact moves between channels the agent loses continuity: the earlier exchange is in another store, behind another code path, keyed by another identity. The two common remedies both fail: a table-per-provider design forces a schema migration every time a new channel is onboarded, and a lowest-common-denominator schema discards the provider-specific fields (Discord guild id, WhatsApp template id, Telegram thread id) that the agent later needs.
This publication discloses a design that resolves both failures simultaneously. (1) Every interaction across every provider is stored in one relational table whose typed columns are exactly the cross-channel invariants — channel, contact, direction, body, occurred_at — plus one polymorphic metadata column (JSONB) that absorbs each provider's idiosyncratic fields with no schema migration when a new provider is added. (2) A contact-anchored timeline view resolves a contact's several channel-specific identities (E.164 phone, @handle, numeric user-id, email) to a canonical contact and returns the time-ordered union of that contact's interactions across all channels as a single thread. (3) That single timeline — not a per-channel slice — is what the agent reads as conversation memory.
The contribution is the specific combination: migration-free polymorphic metadata, an identity-resolution join that anchors the timeline on a canonical contact rather than on a channel, and an agent-context framing in which the unified timeline is the model's working memory. The design is published defensively to keep it free to practice. This document is exhaustive and enabling: it gives architecture, mechanics, the data model, a runnable clean-room reference, a worked example, failure-mode analysis, framework mapping, an evaluation methodology, and a full set of disclosed claims.
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 License.
Recommended Citation
Assuncao, gustavo matthew, "Unified Multi-Channel Messaging History", Technical Disclosure Commons, (June 29, 2026)
https://www.tdcommons.org/dpubs_series/10582