Skip to content

Jocasta — CRM Agent

Jocasta in the archive — she already knows why you're here

Every system has a memory problem. Not the RAM kind — the human kind. Who you talked to last Tuesday. What you promised the contractor. Whether your mother-in-law’s birthday is the 14th or the 15th and whether getting it wrong again will finally collapse the fragile détente that has held since Thanksgiving 2019.

Jocasta is Sanctum’s answer to this. She manages contacts, tracks relationships, integrates with Affinity CRM, and has direct access to every messaging channel on the Mac. She is named after Jocasta Nu, the Jedi Temple’s Chief Librarian — the one who maintained the Archives, who could locate any record in the galaxy, and who famously told Obi-Wan that if something wasn’t in her archives, it didn’t exist. The confidence was warranted. The naming is aspirational.

Jocasta is the CRM agent: contact management, relationship intelligence, and communication orchestration. She is the only agent running on the Mac side (DenchClaw), physically separated from the five VM agents by a network boundary and a philosophical one. The VM agents reason about the world. Jocasta remembers who’s in it.

This separation is not architectural vanity. iMessage, Apple Contacts, Calendar, Signal’s local database — these are Mac-native services that cannot be accessed from a Linux VM. Jocasta lives on the Mac because the relationships live on the Mac. She goes where the data is.

Jocasta connects to Affinity CRM for structured relationship management — deal flow, contact metadata, interaction history, the kind of organized human-tracking that would be unsettling if it weren’t also exactly what every professional does with a spreadsheet and worse memory.

She can query contacts, update records, log interactions, and surface relationship context when you need it. The LinkedIn browser extension feeds her new connections automatically. You meet someone at a conference; by the time you’re back at your desk, she already knows.

Through the apple-toolkit skill and automated ETL pipelines, Jocasta has direct access to five messaging channels, which she continuously syncs into her DuckDB memory (workspace.duckdb):

Apple Mail

Via JXA bridge (mail-to-duckdb.py), distinguishing Personal vs Business by domain.

iMessage

Native macOS Messages integration (chat.db).

WhatsApp

Via WhatsApp local sandbox database (ChatStorage.sqlite).

Signal

Local SQLCipher database, decrypted securely using Keychain.

Telegram

Via Telethon (telegram-to-duckdb.py) securely pulling from the API.

To ensure these pipelines never fail silently or corrupt her memory, Jocasta’s ETL daemons are hardened with 5 military-grade measures:

  1. Concurrency Locking: Strict UNIX file locks (fcntl.flock) prevent DuckDB write collisions across parallel hourly cron jobs.
  2. Dead Man’s Switch: Global try...except loops intercept any script crashes and POST stack traces directly to Force Flow, alerting you on Signal instantly.
  3. Bulletproof Timezones: All incoming dates are parsed into strict UTC timezone-aware objects, mitigating edge cases with Daylight Saving Time or differing local protocols.
  4. Zero-Trust Secrets: Telegram’s API_ID and API_HASH are stored exclusively in the Mac’s hardware Keychain, fetched in-memory at runtime via /usr/bin/security.
  5. Pre-Sync DB Snapshots: A pristine workspace.duckdb.bak is cloned automatically the second the script gets a lock, ensuring 1-hour rollback safety in case of power failure during writes.

She does not combine these channels recklessly. A message that belongs on Signal stays on Signal. A contact who prefers WhatsApp gets WhatsApp. Jocasta understands that channel preference is itself a form of relationship intelligence.

The unglamorous core of what she does. Jocasta maintains a working model of your professional and personal network — not through surveillance, but through the residue of normal communication. When did you last speak to someone? What was it about? Is a follow-up overdue? Is a birthday approaching that you will, once again, almost forget?

She surfaces this context when it matters and stays quiet when it doesn’t. The best librarians don’t follow you around the stacks recommending books. They’re simply there when you need to find something.

Jocasta is the sole resident of the DenchClaw gateway on the Mac. This makes her both privileged and isolated — she has exclusive access to Mac-native services, but she’s cut off from the VM agent council by a host-only network boundary.

The Council Bridge solves this. When Yoda needs relationship context, or Jocasta needs to inform the council about an incoming message, communication routes through SSH between the two gateways. It is not elegant. It is reliable, which is better.

Jocasta (Mac:1977) ──SSH──> Yoda (VM:OpenClaw)
Yoda (VM) ──SSH──> Jocasta (Mac:1977)

She shares the council-brain model tier with Yoda — the highest reasoning tier in the system. This is not favoritism. Relationship intelligence requires the same caliber of judgment as general coordination, and getting someone’s name wrong in a follow-up email is, in its own quiet way, a system failure.

ParameterValue
Agent typecrm
HostMac (DenchClaw gateway)
Gateway port1977
Model tiercouncil-brain (Claude Opus 4.7 primary, MiniMax M2.7 fallback)
Config profile~/.openclaw/ (DenchClaw)
Skillsapple-toolkit, Affinity CRM, LinkedIn extension
Pluginssanctum-memory (local, :42069) + Jina Reranker
BridgeCouncil Bridge (SSH, bidirectional with Yoda)
HeartbeatEvery 2 hours via Council Bridge
Named afterJocasta Nu, Chief Librarian of the Jedi Archives

Jocasta is defined in instance.yaml under the services section:

jocasta:
enabled: true
type: crm
host: mac
gateway: denchlcaw
port: 1977
model: council-brain
config: "~/.openclaw/"
skills:
- apple-toolkit
integrations:
- affinity-crm
- linkedin-extension
bridge:
target: yoda
transport: ssh
heartbeat: 7200
description: "CRM Agent — contact management and relationship intelligence"

The DenchClaw gateway is managed by a LaunchAgent on the Mac:

~/Library/LaunchAgents/com.sanctum.gateway.plist

Jocasta does not make decisions about relationships. She does not draft messages on your behalf without being asked. She does not rank your contacts by importance or suggest you “circle back” with anyone. She is an archivist, not a social strategist.

She keeps the records. She surfaces the context. She remembers the birthday. What you do with that information is between you and your conscience and, occasionally, your mother-in-law.