1.6 KiB
1.6 KiB
Data Flows and Event Model
Primary Request Flow
flowchart LR
U[User] --> G[Gateway]
G --> R[Router]
R --> TM[Tool Manager]
TM --> SW[Swapper]
TM --> MEM[Memory Service]
TM --> AR[Artifact Registry]
R --> LLM[Cloud or Local LLM]
R --> G
G --> U
Canonical NATS Run Subject Policy
- Canonical publish:
agent.run.requested.{agent_id} - Canonical subscribe:
agent.run.requested.* - Keep
run_id,trace_id,tenant_idin payload.
Migration Plan (No Downtime)
- Consumers subscribe to both:
agent.run.requestedandagent.run.requested.*. - Producers publish to new canonical subject and temporarily duplicate to legacy.
- Remove legacy publish after metric confirms no consumers need it.
- Remove legacy subscribe after legacy traffic reaches zero.
Runtime Subject Inventory (Current vs Target)
- Current in code:
agent.run.requested(subscriber inservices/crewai-worker/main.py). - Target canonical:
agent.run.requested.{agent_id}with wildcard consumer. - Artifact jobs already namespaced (
artifact.job.<job_type>.requested). - Attachment pipeline uses typed subjects (
attachment.created.{type},attachment.parsed.{type}).
Ingest/Parser Placement Note
- On NODE1: currently not active in compose.
- Flow remains architecturally defined and must be bound to concrete deploy location (node/host/manifest) before marked DEPLOYED.
Source pointers
services/crewai-worker/main.pyservices/router/main.pyservices/artifact-registry/app/main.pyservices/ingest-service/main.pyservices/parser-pipeline/main.pydocs/NATS_SUBJECT_MAP.md