Core Components
Every Reliant deployment consists of these components:
reliant daemon process that connects to the cloud via a bidirectional gRPC stream.
Database — Stores chats, messages, content blocks, workflows, projects, and worktree associations. Postgres for all deployments.
Streaming Layer — Delivers real-time updates (new messages, tool outputs, workflow state changes) from workers to the frontend via NATS.
Deployment Architecture (reliant server {api,worker,gateway})
Three separate process types split the workload:
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.
Architecture Summary
| Aspect | Details |
|---|---|
| Database | Postgres (external) |
| Temporal | External cluster |
| Tool Routing | NATSDaemonRouter (via NATS) |
| Streaming | NATSUpdateHub |
| Daemon | Separate reliant daemon + Gateway |
| Scaling | N API + N workers + few gateways |
| TLS | External certificate management |
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 through NATS and the gateway.
- 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
- Distributed Mode — Architecture of the cloud deployment: API server, worker, and gateway process types, NATS topology, and scaling considerations.