# Architecture

[Docs](https://www.rightnowai.co/docs) / [RightNow Agent](https://www.rightnowai.co/docs/agent) / [Architecture](https://www.rightnowai.co/docs/architecture)

Updated 2026-10-11

> **Release status**
>
> RightNow Agent, the terminal coding agent, is paused. Its guides stay online as reference.

**RightNow Agent** is a local tool runner with remote model inference.

**Text**

```text
launcher or direct binary
  +--> seed or synchronize user config
  +--> interactive session or one-shot prompt
         +--> configured provider request
         +--> validate model tool call
         +--> permission decision
         +--> local file, search, web, or terminal tool
         +--> result returns to the model loop
```

## Startup

- At startup, the installed `rightnow` command seeds and synchronizes `config.toml` from its embedded template; see the [synchronization rules](https://www.rightnowai.co/docs/configuration#synchronization-rules).
- The product home is `RIGHTNOW_HOME` when set, otherwise `~/.rightnow`; a legacy home and its variable are still honored.
- Two commands dispatch before the main parser: `rightnow config sync --config <path> --template <path>` and `rightnow telemetry speed [--log <path>] [--since <RFC3339>] [--json]`. Other arguments continue to the main binary parser.

## Provider selection

The shipped model entry calls RunInfra:

**Endpoint**

https://api.runinfra.ai/v1

**Key**

RIGHTNOW\_API\_KEY

**Model**

qwen3-8-flash-next

User-defined provider entries use the same parser, and `-m <model-entry>` selects one for an invocation. No local inference process, model-weight download, GPU scheduler, or local embedding model is shipped.

## Prompt and tool boundary

- Before each provider request, RightNow assembles the system prompt, configured rules, workspace context, and selected tool schemas. The source launchers do not inject a system prompt override.
- For a fresh session, `--rules` appends a `<human_rules>` block. Without an effective system prompt override, a resumed session retains its original rules. With an effective override, the resumed session uses that override and the currently supplied rules.
- File and terminal tools run locally under the selected permission policy. Web tools make network requests when called. Configured MCP servers and hooks keep their own command, credential, and network behavior.

## Process reuse

The shipped configuration enables the warm agent service. It reuses the lightweight client process and parsed runtime state, not model weights. A connection timeout can fall back to the embedded process path before a turn starts.

### Service management

Manage it with `rightnow leader`: `start`, `status`, `stop`, `list`, `info`, and `kill`. `daemon` remains a compatibility alias for `leader`. Flags and PID targeting are in the [CLI Reference](https://www.rightnowai.co/docs/cli-reference#warm-agent-service).

**Text**

```text
rightnow leader status
```

With the service stopped, the status and stop commands answer:

**rightnow · daemon status and stop**

```text
# With the warm service stopped (excerpt)
rightnow daemon status
RightNow warm service is stopped.

rightnow daemon stop
RightNow warm service is already stopped.
```

## Diagnostics

Local JSONL diagnostics are written to `logs/unified.jsonl` under the resolved product home. Named events include:

**Text**

```text
shell.turn.inference_done
shell.turn.loop_phase_timings
shell.handle_prompt.done
shell.tool.exec_done
shell.turn.speed_shadow
```

The speed-shadow record includes model-call and tool-round counts, narration-only and narration-with-tool counts, narration size and estimated savings, one-call transaction outcomes, and tool-profile fields. `rightnow telemetry speed` summarizes it.

See [Measured Evidence](https://www.rightnowai.co/docs/measured-evidence) for recorded process-reuse observations. If startup or terminal checks fail, continue with [Troubleshooting](https://www.rightnowai.co/docs/troubleshooting).

## Previous

[Terminal Support](https://www.rightnowai.co/docs/terminal-support)

## Next

[Capabilities](https://www.rightnowai.co/docs/capabilities)
