REPL.io
A lightweight agentic tooling core with API, CLI and REPL interfaces.
REPL.io is deliberately small and auditable zero-dependency agentic core built on a single streaming agent loop. The model plans, the tool registry acts, and one loop serves three front-ends: an interactive REPL, a headless one-shot CLI, and an HTTP API.
Why
- Zero dependencies — everything is Python standard library. No dependency tree to audit, no supply-chain surface, no lockfile churn
- One agent loop — a single SSE stream per turn powers the REPL, the CLI, and the API. No duplicated logic across front-ends
- Local-first — config and session logs live on your disk. Bring your own provider key, or run fully local
Features
- Agentic REPL — streaming token-by-token output, dimmed thinking, markdown-aware rendering, readline history and tab completion
- Tool calling — web search, page fetching, file read/write/search, and shell execution via OpenAI-compatible function calling
- Permissions — every tool is gated by
allow/ask/deny, with path-scoped confirmations for anything outside your worktree - Plugins — external repositories register tools, providers, and slash commands; the core stays zero-dependency and plugin deps are imported lazily, only when you activate a plugin
- Multi-provider — Ollama, OpenAI, Groq, Anthropic, plus any OpenAI-compatible endpoint, with automatic detection from the base URL
- Sessions — complete append-only conversation logs, including every tool call and its result
- Compaction — summarize long conversations and trim the provider context without losing history
- Headless modes —
replio runfor scripting andreplio servefor an HTTP JSON API
Quick Start
pipx install replio
replio
Or from source:
git clone https://github.com/emyasnikov/replio.git && cd replio
python3 -m venv .venv && .venv/bin/pip install -e .
.venv/bin/replio
Usage
REPL
First-time setup with /connect, then type any message. Tab-complete / commands and session names. Use arrow keys to navigate history.
>>> /connect
Provider [ollama]:
Base URL [https://ollama.com]:
API key: ...
Model [gpt-oss:20b-cloud]:
>>> Hi
<<< Hello! How can I help you today?
>>> /exit
CLI
Stream plain text with --output text or return the results as JSON, log tool status and diagnostics to stderr with --verbose, and address a persistent session with --session-id <id>. Tools that require confirmation are auto-denied in by default, just pass --yes to approve them.
replio run --prompt "Hi"
{
"content": "Hello! How can I help you today?",
"thinking": null,
"tool_calls": [],
"errors": [],
"duration": 7.0,
"usage": null,
"model": "gpt-oss:20b-cloud",
"provider": "ollama",
"session": "20260814_192251_hi",
"status": "ok"
}
API
Server exposes different JSON endpoints like POST /chat ({"prompt": ...}, optionally {"session_id": ...}) returns the same turn result as the CLI etc.
replio serve &
curl localhost:8787/chat -X POST -d '{"prompt": "Hi"}'
{"content": "Hello! 👋 How can I help you today?", "thinking": null, "tool_calls": [], "errors": [], "duration": 7.0, "usage": null, "model": "gpt-oss:20b-cloud", "provider": "ollama", "session": "20260814_192711_hi", "status": "ok"}
Roadmap
Personas and delegation are planned next. The directory-based plugin system is in place — see docs/plugins.md for building and managing plugins. Open tasks live in TODO.md.
Contributing
The project is stdlib-only with no external dependencies. See AGENTS.md for architecture and conventions, and CONTRIBUTING.md for the contribution workflow.
Documentation
Detailed references are in the docs:
License
Release files for replio 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| replio-0.12.0.tar.gz | 52.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| replio-0.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.3 kB
Release files / replio-0.12.0.tar.gz
| Download URL | replio-0.12.0.tar.gz |
|---|---|
| Size | 52.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
140326ea66758bd017ec7c7fe298fb14a597c5fa2eff3fd0dc3170a4650b4cf6
|
|
BLAKE2b-256 checksum How to use checksums |
2991b7625997e69e7a87071f923c8b7ea3d95b74b0b8cbdb90c4328fee1cee17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / replio-0.12.0-py3-none-any.whl
| Download URL | replio-0.12.0-py3-none-any.whl |
|---|---|
| Size | 40.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
342ba5bd195c14a256ebe3d9fda71a8395130cc8350d10bb97650c010de51471
|
|
BLAKE2b-256 checksum How to use checksums |
ba28d9bb1d6b433a18fe7d43d40cb155c005b23bebb690ae63c1932ebd8bc04d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|