Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.6.1 instead.

Riley AI

One conversation. Three interfaces. Your machine.

Riley connects a local Ollama model or Google Gemini to two practical tools: web research and symbolic math. It keeps one conversation on your machine, streams replies, and lets you choose the interface that fits your workflow.

Get started · Explore the interfaces · Read the docs

At a glance

Riley gives you
Your model Local Ollama by default; Gemini when you add a key to your system keyring
Your interface A browser chat, a Rich terminal chat, and a FastAPI HTTP API
Your tools SymPy calculations and a search → scrape → rank web pipeline
Your history One saved conversation shared by all three interfaces

Riley is designed for one person running one instance. The API and CLI cannot run at the same time against the same local configuration.

Start in three steps

1. Get the current source. Python 3.12 or newer and uv are required.

git clone https://codeberg.org/ChocolatePastry/riley-ai.git
cd riley-ai
uv sync

This checkout contains the browser and API described here. The published PyPI 0.6.1 release predates those changes; see setup before installing from PyPI.

2. Prepare a model. For local chat, install Ollama, start its service, and pull Riley's default model:

ollama pull qwen3.5:9b

Want Gemini instead? Get a key and add it through uv run riley --cli. The setup guide walks through it.

3. Start chatting.

uv run riley

Open http://127.0.0.1:8000/ for the browser chat. Without a stored Gemini key, Riley uses Ollama. The API starts without asking for input.

Try it: Ask a normal question, enter /calculate 2+2, or use /web_search Python 3.14 release notes. Tool-backed answers depend on your model and available network access.

Three ways to chat

Interface Launch Best for
Browser uv run riley → local chat A visual chat with streamed replies and saved history
Terminal uv run riley --cli Keyboard-first chat, token counts, and tool notices
HTTP API uv run riley → POST /chat Scripts and local integrations

The server listens on 127.0.0.1:8000 by default. Set its bind address with --host and --port; for example, uv run riley --host 127.0.0.1 --port 8080.

A minimal API request:

curl -X POST http://127.0.0.1:8000/chat \
  -H 'Content-Type: application/json' \
  -d '{"message":"Explain recursion simply"}'

The reply is JSON with a response field. See commands and API for streaming, history, every CLI command, and exact request shapes.

How a message moves

flowchart TD
    Entry["riley · main.py"] --> CLI["CLI"]
    Entry --> API["FastAPI + browser"]
    CLI --> Controller["Shared controller"]
    API --> Controller
    Controller --> Provider["Ollama or Gemini"]
    Controller --> Tools["Math or web search"]
    Controller --> History["Local chat history"]

main.py chooses the interface. Both interfaces call the same controller, which selects a provider, runs tools when needed, and saves the conversation. The architecture guide follows a request through the actual files.

Built for self-hosting

  • Local by default. No Gemini key means Riley selects the configured Ollama model. Web search still fetches pages from the network.
  • One conversation. History lives on disk and is shared between browser, CLI, and API. Riley trims older messages as the context grows.
  • One active instance. A file lock keeps two Riley processes from using the same configuration at once.
  • Local API. The server binds to localhost by default and has no built-in authentication. Add access controls before exposing it beyond your machine.

The setup guide explains prerequisites, local files, optional SearXNG, and common startup problems.

Documentation

Guide Start here when you want to…
Setup & prerequisites Install Riley, Ollama, or Gemini and prepare web search
Commands & API Find a CLI command, launch flag, or HTTP route
Architecture Understand the controller, providers, tools, and history

Each guide owns the detailed instructions for its topic; this README is the guided tour.

Develop Riley

From the source checkout used above, run the tests:

uv run python -m unittest discover -s tests -p 'test_*.py'

The separate scraper benchmark fetches live pages and is intentionally outside that test command. See the architecture guide for the main extension points.

License

Riley is licensed under the GNU General Public License v3.

Metadata

Release files for riley-ai 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for riley-ai 0.6.2
File Size Uploaded Provenance
riley_ai-0.6.2.tar.gz 51.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for riley-ai 0.6.2
File Interpreter ABI Platform
riley_ai-0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 109.4 kB

Release files / riley_ai-0.6.2.tar.gz

Download URL riley_ai-0.6.2.tar.gz
Size 51.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5ebbc392fa1b87adb9dd01342aaf53306af6b4e11d3608d01d0651efda35d433
BLAKE2b-256 checksum
How to use checksums
7d26a7e820a5e91619632941acc00633e76b9ce3a24c084789c4cde717141770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / riley_ai-0.6.2-py3-none-any.whl

Download URL riley_ai-0.6.2-py3-none-any.whl
Size 58.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
997d2e60c70a79e5bcbb2f1eae42b948e0ec3467cb4b66789a0e27a3963a5c01
BLAKE2b-256 checksum
How to use checksums
74b0ad133e14bc7ca6d61e22f77dd666454645fc3a9cf5e28ef6dce6fc012a0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for riley-ai 0.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page