Files
api/services/chat

Chat Service

Owns: deep_agent (home + floating chat), memory middleware, domain agents (task, note, project, timeline), LLM orchestration.

Tables owned

  • memory_core
  • memory_associative
  • memory_episodic
  • memory_proactive

Tables read (cross-service)

  • users (for encryption_key — memory decryption)

Endpoints

  • POST /chat (REST fallback)

Redis channels

  • Subscribe: chat:request:{user_id}
  • Publish: ws:out:{user_id} (stream frames + tool calls)
  • BRPOP: tool:result:{call_id} (30s timeout)