Local-first, OpenAI-compatible agent

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.

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

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

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-ai.git
cd scribe-ai
./scripts/install.sh
scribe --version

PyPI install

python3 -m pip install scribe-llm
scribe --help
scribe 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 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 is usable, but it is still an alpha project. The site should 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
Only on llama.cpp with GBNF grammar support. Other backends use best-effort parsing.
Workspace data
Local by default. Your sessions and documents are not committed to the source repo.

Common commands

scribe chatinteractive terminal chat
scribe weblocalhost Book Studio
scribe discoverfind local model servers
scribe status --jsonmachine-readable status
scribe rag searchsearch indexed documents
scribe initcreate a project vault
scribe compareblind A/B model test
scribe 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.