Riley: A witty, Agentic AI orchestrator with RAG, web search, and symbolic math tools.
Project description
🤖 Riley AI
The Witty, Agentic Orchestrator
Riley AI is a high-performance, open-source orchestration framework designed to bridge the gap between static LLM chat and dynamic, autonomous problem-solving. Instead of just talking, Riley researches, calculates, and self-corrects using a deterministic logic router.
Riley utilizes advanced reasoning chains (Thought Signals) to tackle complex logic before ever hitting the "send" button.
✨ What’s New in v0.3.0?
- Comprehensive Gemini Integration: Native optimization for the Gemini 3 Series with full backward compatibility for previous Gemini generations.
- Thought Signal Processing: Captures and handles native Thought Signals (internal monologue) and secure
idtracking for complex tool chains. - Unified CLI: Now a global tool. Install via
riley-aiand run anywhere with the simplerileycommand. - Secure Credential Management: Integrated
keyringsupport to securely store API keys outside of plain-text files. - Advanced Multi-line Input: New
/multimode and/sendcommand for handling large data pastes in the terminal. - Enhanced Dependency Management: Fully optimized for uv and Python 3.12+.
🧠 Core Architecture
1. The Multi-Provider Brain
Riley is primary-tuned for the Google ecosystem:
- Cloud Tier (Primary): Leverages Google Gemini for high-reasoning tasks, massive context windows, and native tool orchestration.
- Local Tier (Fallback): Seamlessly drops back to local providers like Ollama (defaults to
llama3.2:1b) for offline use or maximum privacy. - Agentic Loop: Uses a Self-Correction Loop—if a tool fails, Riley analyzes the error and automatically tries again for up to 5 iterations.
2. Privacy-Centric Web RAG
Riley breaks the knowledge cutoff by crawling the live web:
- SearXNG & DuckDuckGo: Attempts to route through a local SearXNG instance first, with a seamless fallback to tracker-free DuckDuckGo search.
- Privacy-First Discovery: Deploying a local SearXNG instance is highly encouraged for users seeking an air-gapped search feel and maximum reliability.
- Semantic Ranking: Uses the
BAAI/bge-small-en-v1.5transformer to chunk and rank scraped text, ensuring Riley only reads the most relevant data.
3. Symbolic Math via SymPy
While other AI models "hallucinate" math, Riley uses SymPy. Complex algebraic equations and calculus are offloaded to a deterministic engine for 100% accuracy.
🚀 Installation & Setup
For Users (via PyPI)
Install Riley globally on your system:
pip install riley-ai
For Developers (via Source)
This project is optimized for the uv package manager:
git clone https://codeberg.org/ChocolatePastry/riley-ai.git
cd riley-ai
uv pip install -e .
🛠 Usage & Examples
Starting Riley
Run the following command to start the orchestrator:
riley
(Note: The terminal command is riley, even though the package is named riley-ai.)
1. The "Agentic" Research Loop
Riley uses the WebRAGPipeline to find real-time data. The internal thought process is automatically surfaced via the Agent Scratchpad.
User: "What are the key features of the upcoming Python 3.14 release?"
Riley: 🧠 [Agent Scratchpad]: Searching for Python 3.14 PEPs and release schedules. "I dug through the latest dev docs so you didn't have to. Python 3.14 is bringing PEP 735 (dependency groups). It’s expected around October 2025."
2. Precise Symbolic Math
Riley offloads math to SymPy for guaranteed results.
User: "Solve 2(x + 5) = 24."
Riley: "I’ve crunched the numbers. x = 7. Honestly, I could do this in my sleep."
⚡ Power Commands
| Command | Action | Use Case |
|---|---|---|
riley |
Launch | Standard interaction mode. |
/calculate |
Trigger SymPy | Bypass the LLM to solve equations or word problems directly. |
/web_search |
Trigger Live RAG | Bypass the LLM to pull real-time, top-ranked web chunks. |
/multi |
Multi-line Mode | Paste large code blocks safely (type /send to submit). |
exit |
Quit | Saves session history to your local config folder and exits cleanly. |
📂 Project Structure
src/riley/
├── smart_chatbot.py # CLI entry point & Regex Router
├── chatsession.py # The Orchestrator (The "Loop" & LLM Bypass)
├── config/ # Pydantic Settings & Model Definitions
├── provider/ # Gemini & Ollama API implementations
└── tools/ # RAG Pipeline & SymPy Logic
📜 License & Philosophy
Licensed under GPLv3. Riley is designed to be a "lazy framework"—modify the code, add new tools, and help the orchestrator grow.
"I’m not saying I’m better than a standard chatbot... I’m just saying I actually check my facts." — Riley
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file riley_ai-0.3.0.tar.gz.
File metadata
- Download URL: riley_ai-0.3.0.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2599a4f7c2771d12f3202d5ba8ed82dc8a129bbe6b73d402bff1136096a2bd3c
|
|
| MD5 |
d303e9c4c913f4af5c1e7260a3ab6807
|
|
| BLAKE2b-256 |
7cc925d447050c6f24d7a3ae3e5deaecba511ad419d2ae170ec437b0f9ac2f58
|
File details
Details for the file riley_ai-0.3.0-py3-none-any.whl.
File metadata
- Download URL: riley_ai-0.3.0-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32e49bd07fc1366d3d0dbb0ee22c21dadca2000db41922196502b3f002a519fb
|
|
| MD5 |
d7d3cd42cdb4b6835012ca62f45f02f7
|
|
| BLAKE2b-256 |
1b0910daf7b68a2f6bd97a5258ee58d03793e7e624fd9728d8c81539e22942fc
|