Local-first, OpenAI-compatible agent · v3.0

Scribe helps you research, write, and work with code from a local workspace.

Use Scribe with a local llama.cpp, Ollama, or LM Studio server, or point it at a cloud API on weaker hardware. It keeps sessions, files, RAG, and memory in plain local folders — and in 3.0 its three guarantees are measured: a public leaderboard ranks models on citation discipline, and tool calls survive on every backend.

v3.0.0 on PyPI MIT License Python 3.10+ CLI + TUI + Web UI
scribe quick start
$ git clone https://github.com/pedjaurosevic/scribe-llm.git
$ cd scribe-llm && ./scripts/install.sh
$ scribe-llm config show
base_url: http://127.0.0.1:18083/v1
workspace: ~/scribe-workspace

$ scribe-llm chat
# Work with files, sessions, RAG, and tools
# inside your local Scribe workspace.

Scribe 3.0 — guarantees you can measure

Three properties that hold by construction, not by prompt-tuning — and an instrument that puts a number on them. Full story in the whitepaper.

Tool calls on any backend

On llama.cpp a GBNF grammar makes a malformed call grammatically impossible. New in 3.0: everywhere else the same forced-call path degrades to structured outputs (json_schemajson_object → text parse).

Cite or refuse

Grounded answers map every claim to a numbered source [n], tag contradictions, and refuse outside the sources — even when the model "knows" the answer.

A metric that can fall

The held-out suite was hardened in 3.0 (8 → 24 tasks) after the old one saturated. Deterministic SPI, checksum-locked tasks, no LLM judge.

Grounding leaderboard

Seven models, one identical grounded prompt, 24 locked tasks. Local 4–12B models match or beat 70B/120B cloud models on citation discipline. Full report · reproduce with scribe-llm bench --models.

1 · qwen3-32b (Groq)
SPI 0.885
2 · gemma-4-12B (local)
SPI 0.865
3 · gemma-4-E4B (local, ~4B)
SPI 0.865
4 · gpt-oss-120b (Groq)
SPI 0.839
5 · llama-3.3-70b (Groq)
SPI 0.760
6 · gemma-4-E2B (local)
SPI 0.673
7 · llama-3.1-8b (Groq)
SPI 0.451

Install from GitHub or PyPI

The GitHub install is editable, so a later git pull updates the same checkout. The install script also creates ~/.config/scribe/config.toml and ~/scribe-workspace.

Source install

git clone https://github.com/pedjaurosevic/scribe-llm.git
cd scribe-llm
./scripts/install.sh
scribe-llm --version

PyPI install

python3 -m pip install scribe-llm
scribe-llm --help
scribe-llm chat

Run local, remote, or both

Scribe talks to OpenAI-compatible APIs. On llama.cpp it can use grammar-constrained tool calls; on cloud providers it falls back to regular tool-call/text parsing.

Local

llama.cpp

Good for private work, local files, and long-context setups. Default endpoint is http://127.0.0.1:18083/v1.

Desktop

Ollama or LM Studio

Use a smaller model locally, or test Scribe without running a custom server. Set base_url and model.

Cloud

OpenRouter, Groq, DeepSeek

Useful on weaker machines. Keep the API key in SCRIBE_API_KEY, not in a committed config file.

Config file

[scribe]
base_url = "https://api.deepseek.com"
model = "your-deepseek-model"
api_key = "use-env-instead"
reasoning = false
tool_grammar = "off"

Environment

export SCRIBE_BASE_URL="https://api.deepseek.com"
export SCRIBE_MODEL="your-deepseek-model"
export SCRIBE_API_KEY="..."
scribe-llm chat

What Scribe includes

The project is a practical agent stack: model adapter, session manager, local tools, RAG, semantic memory, and a web writing studio.

Workspace file tools

The agent reads and writes inside a configured workspace directory, with scoped file operations.

Research workflows

Web search, web fetch, source-grounded answers, contradiction tags, and citation-oriented prompts.

Hybrid RAG

SQLite FTS5 plus vector search with multilingual embeddings, combined with reciprocal rank fusion.

Semantic memory

Cross-session recall through SME and a durable WorldModel for persistent context.

Code mode

Command gates, Python AST checks, sandbox support, and git checkpoints for safer local changes.

Book Studio

A localhost web editor for chapters, outlines, terminal work, and Markdown/PDF/EPUB export.

Project status

Scribe 3.0 ships as stable on PyPI, tested by a 361-test suite (10 tests new in 3.0, covering the structured-outputs fallback and leaderboard robustness) and an 18/18 live gauntlet. The site should still make the boundaries clear instead of overselling them.

Best supported backend
llama.cpp with OpenAI-compatible server endpoints.
Cloud API support
Works with OpenAI-compatible providers through base_url, model, and api_key.
Hard tool-call guarantee
Grammatically enforced on llama.cpp (GBNF). Since 3.0 other backends get a structured-outputs fallback (json_schemajson_object → text parse) instead of best-effort parsing alone.
Workspace data
Local by default. Your sessions and documents are not committed to the source repo.

Common commands

scribe-llm chatinteractive terminal chat
scribe-llm weblocalhost Book Studio
scribe-llm discoverfind local model servers
scribe-llm status --jsonmachine-readable status
scribe-llm rag searchsearch indexed documents
scribe-llm initcreate a project vault
scribe-llm compareblind A/B model test
scribe-llm benchquality and grounding checks
Keep cloud API keys in environment variables or a local config that is not committed. The source repo is public; your workspace and secrets are local state.