Skip to content

Repository files navigation

Docent

The local-first coding agent for your terminal. Frontier quality, private by default.

Ask for a change and docent writes it: new files whole, changes to the files there as small edits, each shown as a diff as it streams and written as soon as it's done. Changes to files that are there ask first. Before it writes, it reads the current API of the libraries the change uses from their installed packages. It checks its work with your language servers (rust-analyzer, gopls, typescript-language-server, pyright, clangd), your build and your tests, hands any errors back to the model to fix, then runs the commands the reply gives, such as a commit, co-authored by docent. What you ask it to remember, it keeps for the project.

It's a document assistant too: chat with your PDFs and Office files, search the web, and connect MCP servers. The first run downloads the models it needs; nothing else to set up.

docent run: a reply editing two files, each shown as a diff, the status line and the prompt

More at: docs.smartloop.ai

Install

macOS and Linux

curl -fsSL https://smartloop.ai/install | sh

Windows (PowerShell):

irm https://smartloop.ai/install.ps1 | iex

Installs to ~/.local/bin (%USERPROFILE%\.smartloop\bin on Windows) and adds it to your PATH; open a new terminal to pick it up. Set SMARTLOOP_CLI_VERSION to pin a release.

Builds for macOS (Apple Silicon), Linux (x86_64, aarch64) and Windows (x86_64), with GPU inference through Metal or Vulkan.

Quick start

All you need is docent. Run it and you're chatting: no account and nothing else to set up.

docent

The first run downloads the models it needs (see First run). /login in the chat is optional: it signs you in and enables web (AI) search.

Usage

First run

The agent is built into docent and starts with it. On first use it:

  1. Downloads the embedding model (bge-m3-Q4_K_M.gguf, ~417 MB) for document search.
  2. Downloads the decision model, creates the default project and loads the model.

Each step is skipped when its files are already there. Progress shows as a checklist on stderr under the Docent banner that redraws in place, with the active download's bar in Smartloop pink:

■ Start agent                    port 50578
■ Embeddings                         417 MB
■ Decision model sl-mini
  ██████████████▋░░░░░░░░░░░░░░░   49%  377 MB/769 MB
□ Default project
□ Load model
□ Skills and connections

A step without a bar shows its elapsed time once it runs past a couple of seconds, and it ends with ✓ Setup complete in 1min 12s.

When stderr isn't a terminal, each step prints one line as it finishes instead. Enabling a model with /models shows the same checklist for its download.

Login, projects and models

These live in the chat: /login signs in (optional; it unlocks AI search and the models marked (sign in)), /project switches, creates, imports and deletes projects, and /models enables and disables models. See the command table under the chat.

Chat

docent

docent on its own is short for docent run. While a reply runs, a status line above the prompt shows what it's doing and for how long. The finished reply keeps its sources and the model that answered:

> what is the capital of France?

■ Paris is the capital of France.

  References
  [1] https://en.wikipedia.org/wiki/Paris
  ⎿  sl-mini · 7 tokens · 0.4 tok/s · 16s

[-] Reading en.wikipedia.org… (4s)
────────────────────────────────────────────────────────────────────────
> Ask anything, or drop a file to attach it
────────────────────────────────────────────────────────────────────────
  [enter] queue  [esc] interrupt  [tab] auto-approve off  [?] shortcuts

It chats in the server's current project, or the one given with --project. On exit it prints the session id, to resume with docent -s <session-id> (or --session).

Key Does
? shortcuts
Enter send the prompt; while a reply runs, queue it to go once the reply and what follows are done
Shift+Enter, Alt+Enter, Ctrl+J new line
Esc interrupt the reply; the next queued prompt goes at once
Esc Esc clear the prompt
↑ with prompts queued take back the last queued prompt to edit it
↑ ↓ earlier prompts, past the prompt's first or last line
Enter, Tab, Esc a reply's commands, asked in the prompt: run, run and always this session, skip
Tab on an empty prompt: auto-approve on or off, so a reply's commands run without asking
wheel, PgUp/PgDn scroll; drag to select and copy
drop a file attach an image (PNG, JPEG) or document (PDF, Office, CSV, text)
drop a .zip on an empty prompt, fills in /project import for it
Ctrl+O models: enable, disable, download
Ctrl+P projects: switch (in a new session), create, delete
Ctrl+B the commands still running (/tasks)
Ctrl+C quit
Command Does
/login, /logout sign in with a code you confirm in any browser (--token to paste one)
/models enable, disable and download models
/models <name> caps <list|auto> set a model's capabilities here, over the catalog's, as in text,vision,reasoning; auto goes back to the catalog's
/models <name> thinking on|off reasoning first, or a sooner answer (Ctrl+T in /models)
/mcp MCP servers; /mcp add <url> connects one
/project projects: switch (in a new session), create, import, delete
/project <name> switch to a project by its name or ID
/project new <name> create a project and switch to it
/project import <zip> import an exported project and switch to it
/status account, model, agent and versions
/usage credits used this month (cloud models and web search)
/upgrade Pro or Plus plan: more credits a month
/clear clear the chat and start a new session
/memory what docent was asked to remember in this folder; /memory clear forgets it
/<skill> [prompt] run one of the project's skills; / lists them with the commands
!<command> run a shell command in the working directory, its output shown as it comes, each command of a script on a $ line over what it printed; the output goes to the agent with your next prompt, so it stays in the session. The prompt turns pink with ! ahead as it's typed, and the footer says shell mode, as in Claude Code
!<command> & run it in the background, as a dev server: nothing waits for it, and it's listed under the prompt, out of the chat, until it ends
/tasks the commands still running, as in Claude Code: ↑ ↓ pick one, Enter shows all it printed, x stops it; ctrl+b opens it too (twice under tmux, where it's the prefix)
click a running command its ✕ stop in its entry stops it; a click on the command expands all it printed
/help, /quit

Pass an initial prompt to send immediately:

docent run "what are some things to do in madrid spain?"

Options:

docent run --project <project-id>   # chat in this project (-p)
docent run --session <session-id>   # resume an existing session (-s); a new one is created when omitted

docent runs in a terminal only: with its input or output piped, it says so and stops.

A folder and its project

A folder belongs to one project. Nothing in it is uploaded: the model reads the code itself with its explore tool, as far as a request needs.

  • Opening docent in a folder that isn't linked to a project yet gives it one of its own, named after the folder (a project by that name with no folder of its own is reused), and writes the link to .docent/manifest.json. Opening docent in a linked folder, or one under it, opens the chat in its project. --project opens another project instead, and links nothing.
  • The folder is the nearest one up from where docent was opened that holds a .docent/, as git finds its repository. With none, it's the folder docent was opened in. Your home folder (or one holding it) is never linked.
  • Skills are .docent/skills/<name>.md or .docent/skills/<name>/SKILL.md, with optional name: and description: frontmatter. They go to the project when the chat opens it and as soon as a reply writes one: new ones are added, changed ones updated, deleted ones removed. They are what you commit from .docent/; the manifest is kept out of git by .docent/.gitignore, as it names this machine's project.

Coding

Open docent in a code project and just ask for a change. It reads the folder, writes the code, builds it, fixes what breaks, and then asks before it touches anything outside your files:

› make greet take a name and commit it

← src/main.rs  +2 −2
  @@ -1,4 +1,4 @@
   1  1  fn main() {
   2    -    greet();
      2 +    greet("docent");
   3  3  }
   4    -fn greet() { println!("hello"); }
      4 +fn greet(name: &str) { println!("hello, {name}"); }

! cargo check --quiet

! cargo test --quiet

? Run these in the folder?
  $ git commit -am "greet takes a name"
  [enter] run   [tab] always this session   [esc] skip

What happens on each prompt:

  1. It reads the project. The agent is told what kind of project it is and its git state (branch, remotes, what's changed), and is given an explore tool. It calls it first for an overview of the codebase (its files with their sizes, manifests and README), then for the files, or the lines of a large one, that the request concerns, and decides from them what to do. Reading only reads, inside the folder, so it's never asked about. For what the code and the model's own knowledge don't tell, or may have out of date, it calls web_search, which searches through Smartloop's hosted search and reads the top pages. Web search is on by default (signed out, the tool says so). That way it answers from your code, and goes to the web only for what the code can't tell it, like a library's current API. It's also told about the machine (OS and version, shell, the package managers and toolchains on PATH, active virtualenvs), so commands use apt-get on Ubuntu and brew on a Mac. It's also told what you asked it to remember here (see below).
  2. It reads the current API. The libraries the prompt names (three at most), or if it names none, the one whose package name has a word of the prompt in it that best fits what it asks ("yaml" for js-yaml, "MUI" for @mui/material), at the versions your lockfile pins, have their API read from the packages installed for the project: a crate's source in cargo's registry, node_modules' type declarations, the project's virtualenv, Go's module cache, or a Maven or Gradle jar. The parts the prompt uses go to the agent with it, so it doesn't write against an API it remembers from an older version. It's offline and costs nothing; a library that isn't installed yet goes without (building the project installs it), and the agent can look it up itself with web_search. Each is kept in .docent/cache/api/ as markdown you can read, which has a .gitignore of its own, so it's read once a version. Esc stops it.
  3. You see diffs as they stream in. Each file shows as numbered hunks, additions in green and removals in red. Then it's written into the folder.
  4. It checks the build and fixes it. It runs a fast check for the kind of project: cargo check, go build, tsc --noEmit, or bash -n and py_compile for loose scripts. Errors go back to the agent, round after round, until the check passes. It stops after five rounds, or sooner when a round brings back errors it had already given. Esc stops it.
  5. It runs the tests. Once the change builds, the project's tests run: its end-to-end tests when it has them (an npm test:e2e or e2e script, a make e2e or test-e2e target), else cargo test, go test, npm test, pytest, mix test, swift test, mvn test or ./gradlew test. Failures go back to the agent, three rounds at most.
  6. It remembers what you ask. Say "remember we use pnpm" or "from now on, tabs" and it's kept in .docent/memory.md, one line each, and told to the agent in every later session in the folder. /memory lists it, and /memory clear forgets it; the file is yours to edit or commit.
  7. Commands wait for your OK. Commits, installs and test runs come back as shell commands. Enter runs them, Tab runs them and approves every later one too, and Esc skips them. Their output streams into the chat and goes back to the agent, so a failing test gets fixed next.
  8. Long runs go to the background. Dev servers and watchers (npm run dev &) keep running under the prompt while you go on chatting.
Command Does
!<command> [&] run a shell command yourself, in the background with &
/tasks or ctrl+b see, expand or stop running commands
Tab on an empty prompt turn auto-approve on or off

More in the coding docs.

License

Docent is source-available under the Business Source License 1.1 (BUSL-1.1).

  • You may read, modify, self-host and use it in production, including inside your company.
  • You may not offer it to third parties as a hosted or embedded commercial product that competes with Smartloop's paid offerings.
  • Each version converts to the Apache License 2.0 four years after it is published.

For a commercial license or questions, contact hello@smartloop.ai.

Versions released before November 27, 2026 remain available under the MIT License to anyone who received them under it.