Skip to documentation
Documentation navigation

Documentation navigation

Documentation / start

Build a coding assistant

Build a useful coding assistant from one model call to a durable, tool-using Harness session with a workspace, sandboxed processes, and your choice of interface.

developer

This tutorial builds a coding assistant that can answer a question, inspect files through declared tools, keep a resumable session, work inside a session-owned directory, and confine process tools. The final runtime is independent of its presentation, so you can keep the CLI or attach the TUI, Web UI, ACP, or MCP later.

What you will build

%%{init: {"theme":"dark"}}%%
flowchart LR
  U[CLI input] --> S[Harness Session]
  S --> L[Loop]
  L --> I[Inference Client]
  L --> T[Read-only Tools]
  S --> J[Session Store]
  S --> W[Workspace]
  T --> X[Sandboxed Process]
  S --> E[Events]
  E --> U

The tutorial uses one project named looprig-coding-assistant. Each page adds one boundary without changing the responsibilities added earlier.

How the pieces fit

ModuleResponsibility in the assistantAdded when
Core and InferenceMessages, model identity, requests, responses, and streamingFirst model call
LLMOpenAI, Anthropic, Ollama, and other provider clientsModel configuration
HarnessLoop, Rig, Session, commands, events, tools, and shutdownAgent runtime
ToolsRead, search, edit, process, interaction, and delegation definitionsTool registration
Fsstore and StorageDurable session history and workspace snapshotsPersistence
SandboxNative confinement for child processesProcess execution
TUI or ClientTerminal and framework-neutral browser presentationInterface selection

You do not need to adopt the full stack at once. Inference is useful by itself. Harness becomes useful when you need a live agent runtime. Storage, Sandbox, protocols, workflows, and interfaces remain optional composition boundaries.

Tutorial path

  1. Create the Go project.
  2. Connect a model with Inference.
  3. Run the agent with Harness.
  4. Add read-only tools and gates.
  5. Persist and restore sessions.
  6. Add a session workspace.
  7. Sandbox process tools.
  8. Run the coding assistant CLI.
  9. Choose an interface and extend the agent.

Start with the project directory. You will have a working model call before introducing Harness.

← back to documentation