Skip to main content

Command Line Tool

Docent, powered by Smartloop, is your private AI assistant in the terminal: think Claude Code for your personal documents, running 100% locally. Chat with your PDFs and Office files, search the web, connect MCP servers, and set up your own local AI infrastructure: the agent, its models, and your projects. It started as the command line companion to Smartloop Studio and still works alongside it. If no local agent is running, Docent downloads the framework and models it needs and starts one itself.

It installs as both docent and smartloop; the two are the same command. For an overview, see Docent on the home page.

Installation​

macOS and Linux:

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

Windows (PowerShell):

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

On macOS and Linux the binary goes to ~/.local/bin (or ~/.cargo/bin if a Rust toolchain already owns it). If that directory isn't on your PATH, the installer adds it to your shell's startup file. On Windows it goes to %USERPROFILE%\.smartloop\bin and is added to your user PATH.

Open a new terminal after installing, then verify:

docent --version

Set SMARTLOOP_CLI_INSTALL_DIR to install elsewhere, or SMARTLOOP_CLI_VERSION to pin a specific release.

First run​

The first command that needs the agent sets everything up. The steps show as a checklist that updates in place:

[✓] SLP framework 1.2.7 667 MB
[✓] Start agent port 50578
[✓] Embeddings (bge-m3) 417 MB
[•] Chat model sl-mini
██████████████▋░░░░░░░░░░░░░░░ 49% 377 MB/769 MB
[ ] Default project
[ ] Load model
[ ] Skills and connections
  1. SLP framework: downloaded into ~/.smartloop/<version>/, the same folder Studio uses, so the two share one install.
  2. Start agent: the agent starts in the background on a free port it picks itself, writes that port to ~/.smartloop/server.port, and logs to ~/.smartloop/server.log. It keeps running after the command exits, so later commands connect right away.
  3. Embeddings: the model behind document search.
  4. Chat model, default project, load model: the default sl-mini orchestration model is downloaded and loaded, and a default project is created.
  5. Skills and connections: the project's skills and connections are set up.

With docent run, the same checklist shows inside the chat app, finished steps marked [x], and the chat opens once the agent is ready. Any step whose files are already on disk is skipped, so later runs start straight away. To run setup up front, or to stop the agent:

docent agent start
docent agent stop

Signing in​

Some models, and hosted features such as web search, need a Smartloop account. Sign in:

docent login

This opens app.smartloop.ai in your browser, the same way Studio does. Once you're in, the page hands the session to the local agent, which stores it. Docent waits up to five minutes and then prints the account you signed in as. If the browser doesn't open, visit the URL the command prints.

To sign in with a token instead, run docent login --token and paste it at the prompt; it isn't echoed to the screen. In scripts, pass it with --token <token> or pipe it in on stdin. To sign out:

docent logout

Projects​

List projects, with each one's ID, name, and whether it is a system project:

docent project list

Create a blank project. It starts with the workspace's default skills:

docent project create --name my-project
docent project create --name my-project --description "Research notes"

Import a project from an archive produced by an earlier export. --name is optional and renames the imported project:

docent project create --import my-project.zip
docent project create --import my-project.zip --name restored-project

The import gets a fresh project ID, and connection credentials are stripped from the archive, so you will need to reconnect its services.

Delete a project:

docent project delete --id <project-id>

Checking the agent​

See where the local agent is listening, whether it is healthy, which model it has loaded, and the agent running for each project. agent status only reports: it never starts anything, and it exits with status 1 when no agent is running, so scripts can use it as a health check.

docent agent status
Endpoint: http://localhost:50578
Status: healthy
Model: sl-mini (Q4_K_M, 32768 ctx, 769 MB)
Process: pid 8738, 249 MB
+--------------+------+-------+-------+------+--------+
| Project | PID | Port | Alive | Idle | Memory |
+--------------+------+-------+-------+------+--------+
| general_chat | 2668 | 62110 | true | 766s | 122 MB |
+--------------+------+-------+-------+------+--------+

Chatting with the assistant​

Start an interactive chat:

docent

docent on its own is short for docent run. In a terminal this opens a full-screen chat. A welcome card shows the project, the agent's address and the versions, with a few commands to get started. While a reply runs, a status line above the prompt shows what the assistant is doing (choosing a model, searching the web, reading a page) and for how long. Replies stream in as they're generated, followed by the sources they used and a line with the model that answered, the token count, speed and time:

● Here are some places to visit in the United States: …

References
[1] https://www.historictours.com/usa-bucket-list-destinations
└ qwen3.5-2b · 322 tokens · 5.2 tok/s · 62s

Web sources show their URL and documents show their name. The chat runs in the server's current project, or the one given with --project.

KeyAction
EnterSend the prompt
EscInterrupt the reply
↑ / ↓Earlier prompts
Shift+Enter, Alt+Enter or Ctrl+JNew line in the prompt
Mouse wheel, PgUp / PgDnScroll the conversation
DragSelect text and copy it to the clipboard
Ctrl+OModels: enable one (downloading it first) or disable it
Ctrl+STurn web search on or off for the project
?All shortcuts

Typing / lists the commands, narrowing as you type:

CommandAction
/loginSign in in the browser without leaving the chat; /login --token pastes a token into a masked field instead
/logoutLog out
/modelsThe project's models: enable one (downloading it first) or disable it
/mcpThe project's MCP servers, with each one's state and tool count; /mcp add <url> connects a new one
/statusThe project, session, account, agent, loaded model and versions
/usageWeb searches left this month, with your plan and reset date, plus the last 7 days' tokens and the estimated cost saved
/upgradeOpen app.smartloop.ai/upgrade to move to Pro or manage billing
/clearClear the chat and start a new session
/helpAll shortcuts and commands
/quitQuit

Models, MCP servers, status, usage and help open under the prompt, where the commands are listed; Esc closes them. When you quit, the session ID is printed so you can resume it.

Drop a file on the terminal, or paste its path, to attach it. It shows in the prompt as [Image 1] or [Doc 1], Backspace removes it, and it's uploaded with your message so the answer can draw on it. Images can be PNG or JPEG; documents can be PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx), CSV, text, HTML or JSON. Any other file is turned away with a note in the chat.

Pass a first prompt to send right away:

docent run "what are some places to visit in the united states?"

When stdin or stdout isn't a terminal, or with --plain, run chats line by line instead, for scripts and pipes. It keeps reading prompts until /quit, /exit or exit. The answer streams on stdout, with its sources listed under it, and the assistant's progress is printed as [step] message lines on stderr, followed by a [stats] line, so a piped reply stays clean.

OptionMeaning
--project <project-id>Project to chat in. With --plain, run otherwise lists your projects and asks which one to use.
--session <session-id>Resume an existing conversation. A new one is started when omitted.
--plainChat line by line instead of in the full-screen app.

Checking your usage​

/usage shows how many of the month's web searches you have left as a bar, with your plan and when the count resets. Under it are the tokens your local models used over the last 7 days and an estimate of what they would have cost on a hosted model. Once you've used 70% of the month's searches, the footer under the prompt says how many are left and points at /upgrade; the Pro plan includes 1,000 searches a month. You can also check your searches at app.smartloop.ai/settings/websearch.

Models​

The orchestrator picks which model handles each step of a request, choosing from the models enabled for the project. See Model orchestration. List the available models and their state in the current project:

docent model list

Enable or disable a model:

docent model enable gemma4-e2b
docent model disable gemma4-e2b

enable downloads the model first if it isn't on disk yet, with the same progress bar as the first run, then turns it on for the project. Models are shared across projects, so each one downloads only once. Models marked (sign in) need docent login first. disable also unloads the model from memory. All three commands work on the current project unless you pass --project <project-id>. The sl-mini orchestration model is always on, so it isn't listed.

Connections​

Connect an MCP server from the chat by its URL:

/mcp add https://mcp.8raise.com/mcp

A server that needs a sign-in opens it in your browser, and the chat says when the server is connected and how many tools it has. /mcp lists the project's servers; in that list, Ctrl+D removes the selected one and Ctrl+R refreshes. Servers added in Studio's Connections panel show up here too, and the other way round — see Connections.

Some servers to try: Tavily for web search, 8Raise for investor search, and Clera for startup hiring.

Using Docent with Studio​

Studio and Docent share one agent: whichever starts first runs it, and the other connects to it. Projects, models, and your sign-in are the same in both.

  • If you quit Studio, it stops the agent, including one Docent started. The next docent command starts it again.
  • docent agent stop stops the agent Studio is using too.
  • The Mac App Store edition of Studio keeps its data inside its app container, not in ~/.smartloop, so it doesn't share projects or models with Docent. Don't run the two at the same time.

Configuration​

Docent connects to the local agent on the port in ~/.smartloop/server.port, and starts the agent when none is running. To use an agent somewhere else, set SMARTLOOP_API_URL. Docent then only connects: it never installs or starts anything for that address.

SMARTLOOP_API_URL=http://localhost:9000 docent project list
VariableDefaultEffect
SLP_HOME~/.smartloopWhere the framework, projects, models, and logs live.
SLP_PORTa free portPin the local agent to this port instead.
SLP_BASE_URLhttps://dl.smartloop.aiWhere the framework is downloaded from.
SMARTLOOP_APP_URLhttps://app.smartloop.aiWhere docent login signs you in.

Platforms​

Prebuilt binaries are published for macOS (Apple Silicon and Intel), Linux (x86_64 and aarch64), and Windows (x86_64).