Databases
Each SynapseX service owns its own tables. In local development, services default to SQLite. In production, setDATABASE_URL to PostgreSQL and keep service ownership boundaries intact.
Service-Owned Tables
| Service | Tables | Purpose |
|---|---|---|
api-gateway | agents, mcp_tools | Public API agent records and seeded MCP catalog |
tenant-service | tenants, tenant_members | Organizations, plans, limits, members |
event-bus-service | events | Durable event queue with ack/nack/dead-letter states |
workspace-service | workspaces, artifacts | Agent workspaces, outputs, generated files and reports |
webhook-service | webhook_subscriptions, webhook_deliveries | Subscriptions, signed delivery attempts and retries |
update-service | releases, rollouts | VM agent/runtime versions and rollout targeting |
model-registry-service | models | Model catalog metadata, provider, capabilities, pricing metadata |
observability-service | telemetry_events | Traceable service events and summaries |
mcp-router-service | mcp_servers, mcp_plans | MCP registry, routing decisions and explainable plans |
Runtime Configuration
Every new service supports:/data.
Production Rules
- Prefer one PostgreSQL database with service-owned schemas or separate databases per service.
- Do not let Chat write directly to internal service tables.
- Chat, CLI and SDK must go through
api-gateway. - Service-to-service migrations should be explicit before production rollout.
- Do not share ORM models across services unless they are part of
packages/contracts.
MCP Router Persistence
mcp-router-service stores:
mcp_servers: registered MCP surfaces such asqcos-mcpandsynapsex-ops-mcp.mcp_plans: generated plans shown to users before approval/execution.
Event And Audit Relationship
Useevent-bus-service for operational events that drive workflows.
Use audit-service for compliance records that should answer “who did what, when, and was it successful?”
Use observability-service for operational telemetry and trace-level debugging.