Skip to content

Data Model

The Friends system uses both SQLite tables (in the controller) and workspace files (in the agent pod) for data storage.

The controller database (/data/manyclaws.db) contains:

ColumnTypeDescription
idTEXT PKSlug identifier (e.g., "alice")
display_nameTEXTHuman-readable name
discord_idTEXTDiscord user snowflake
signal_uuidTEXTSignal UUID
whatsapp_idTEXTWhatsApp phone/JID
preferred_channelTEXTPreferred contact method
namespaceTEXTk8s namespace (friend-<id>)
created_atDATETIMECreation timestamp
ColumnTypeDescription
agent_idTEXTAgent name (composite PK)
friend_idTEXT FKfriends.id (composite PK)
statusTEXTactive / inactive / blocked
created_atDATETIMEWhen relationship started
ColumnTypeDescription
tokenTEXT PKSession token (nanoid, 32 chars)
friend_idTEXT FKfriends.id
expires_atDATETIMEExpiration timestamp (30 days)

Per-friend data in the agent’s workspace:

workspace/friends/<name>/
├── profile.json # Contact info, platform IDs, preferred channel
├── notes.md # Agent's notes about the friend
├── MEMORY.md # Friend-editable memory (portal-visible)
├── memory/ # Friend-specific daily logs
│ ├── 2026-03-01.md
│ └── 2026-03-02.md
└── projects/ # Friend-owned projects
└── my-project/
{
"display_name": "Alice",
"discord_id": "123456789012345678",
"signal": "+1-555-0100",
"whatsapp": "+1-555-0100",
"preferred_channel": "signal"
}

This file is the source of truth for friend identity. The controller reads it via readWorkspaceFile() which exec’s into the agent pod.