- tracing.py: add compile_prompt() that uses Langfuse .compile(**vars)
for {{variable}} substitution, falls back to Python .format() for
hardcoded {variable} templates
- agent_runner.py: replace _get_system_prompt().format() with
tracing.compile_prompt() for batch_file_classifier, batch_processing,
batch_cloud_processing prompts
- journey.py: replace get_prompt + .format() with compile_prompt()
for journey_system prompt
- chat tracing.py: add compile_prompt() for parity (chat prompts
currently have no variables, but ready for future use)
- Remove unused _get_system_prompt helper
Chat Service
Owns: deep_agent (home + floating chat), memory middleware, domain agents (task, note, project, timeline), LLM orchestration.
Tables owned
memory_corememory_associativememory_episodicmemory_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)