Core Components
Every Reliant deployment consists of these components, regardless of mode:reliant daemon process that connects to the cloud via a bidirectional gRPC stream.
Database — Stores chats, messages, content blocks, workflows, projects, and worktree associations. SQLite for local/desktop deployments, Postgres for cloud.
Streaming Layer — Delivers real-time updates (new messages, tool outputs, workflow state changes) from workers to the frontend. Memory-based pub/sub in monolith mode, NATS in distributed mode.
Two Deployment Modes
Monolith (reliant monolith)
Everything runs in a single OS process. The embedded Temporal server uses a local SQLite database (temporal.db), the application database is SQLite (reliant.db), and the tools daemon runs in-process via LazyDaemonStarter—starting on the first authenticated request rather than at boot. Streaming uses MemoryUpdateHub, an in-process pub/sub channel. Tool execution routes through LocalDaemonRouter, which dispatches directly to the in-process daemon connection.
This is the mode the Electron desktop app uses. Running reliant monolith starts the HTTP API, gRPC server, Temporal engine, workers, and daemon all within one process. TLS certificates are auto-generated (self-signed) and stored in the data directory.
Distributed (reliant server {api,worker,gateway})
Three separate process types split the workload for cloud deployment:
reliant server api— Stateless HTTP + gRPC server. Connects to external Temporal, Postgres, and NATS. Runs as N replicas behind a load balancer.reliant server worker— Temporal workflow worker. Executes activities (LLM calls, tool routing). Runs as N replicas for horizontal scaling.reliant server gateway— Manages bidirectional gRPC streams toreliant daemonprocesses. Routes tool execution requests from API servers and workers to the correct daemon via NATS. Runs as a small number of stateful replicas.
reliant daemon start on their local machine, which establishes a persistent gRPC stream to the gateway. Tool execution requests flow through NATS (NATSDaemonRouter) to the gateway, which forwards them to the appropriate daemon stream. Streaming updates propagate through NATSUpdateHub so all API server replicas can push events to their connected frontends.
Comparison
| Aspect | Monolith | Distributed |
|---|---|---|
| Database | SQLite (embedded) | Postgres (external) |
| Temporal | Embedded in-process | External cluster |
| Tool Routing | LocalDaemonRouter (in-process) | NATSDaemonRouter (via NATS) |
| Streaming | MemoryUpdateHub | NATSUpdateHub |
| Daemon | In-process via LazyDaemonStarter | Separate reliant daemon + Gateway |
| Scaling | Single process | N API + N workers + few gateways |
| TLS | Auto-generated self-signed | External certificate management |
| Use Case | Local development, desktop app | Cloud SaaS deployment |
Request Data Flow
A user message flows through the system in this sequence:- The frontend sends the message via the gRPC server, which creates a chat workflow execution in Temporal.
- Temporal dispatches workflow activities to a worker. The worker calls the configured LLM provider with the conversation history and available tools.
- When the LLM responds with tool calls, the worker routes them to the tools daemon—directly in monolith mode, or through NATS and the gateway in distributed mode.
- The daemon executes each tool (running a shell command, editing a file, calling an MCP server) and returns the results to the worker.
- The worker feeds tool results back to the LLM for the next iteration of the agent loop.
- At each step, the worker publishes streaming updates (message chunks, tool outputs, status changes) through the streaming layer. The gRPC server picks up these events and pushes them to the frontend over the active stream.
- This loop continues until the LLM produces a final response with no further tool calls.
Further Reading
- Monolith Mode — Detailed breakdown of the single-process deployment, including configuration, data directories, and the Electron integration.
- Distributed Mode — Architecture of the cloud deployment: API server, worker, and gateway process types, NATS topology, and scaling considerations.