Terminal-based AI assistant powered by local Ollama with Exa search and Robinhood tools
Project description
Ollama Robinhood Chat 🤖📈
An interactive, terminal-based AI assistant powered by local Ollama (gemma4:e4b) with built-in tools for Exa Web Search and complete Robinhood Trading & Portfolio Automation via the robin_stocks SDK.
Key Features
- Local AI Chat: Chat natively with
gemma4:e4brunning on your local Ollama instance. - Web Search Tool: Powered by Exa Search API to retrieve real-time news, information, and answers.
- Robinhood Portfolio Analytics: Fetch accounts profile details, portfolio values, cash balances, buying power, and open stock/options positions.
- Equities & Options Trading: Query real-time quotes, chains, historical charts, list watchlists, place market/limit orders, and cancel open orders.
- Pre-Trade Simulation Reviews: Safe order review tools calculate estimated costs, check buying power, and inspect asset tradability flags before committing any trades.
- Smart Decimal Formatting: Automatically sanitizes raw Robinhood API outputs (e.g., converting
$2.7100to$2.71) for clean AI communication. - Interactive Multi-Factor Authentication (MFA): Prompts dynamically in the terminal to securely type in SMS or authenticator codes upon boot.
Project Structure
ollama-robin/
├── .env.example # Template env file for credentials
├── .gitignore # Prevents committing API keys / secrets
├── README.md # Guide & setup documentation
├── requirements.txt # Pinned python dependency packages
├── chat.py # Main interactive CLI chat loop
└── tools/
├── __init__.py
├── formatter.py # Recursive clean-up helper (2.7100 -> 2.71)
├── schemas.py # Declarative JSON schemas for Ollama tools
└── handlers.py # Python logic calling Exa and Robinhood APIs
Installation & Setup
1. Prerequisites
- Python 3.10+
- Ollama running locally with
gemma4:e4bpulled:ollama pull gemma4:e4b
2. Install Python Dependencies
pip install ollama exa-py robin_stocks python-dotenv
3. Configure Environment Variables
Create a file named .env.local in the project root:
# Exa API Key
EXA_API_KEY="your-exa-api-key-here"
# Robinhood Credentials
ROBINHOOD_USERNAME="your-login-email@example.com"
ROBINHOOD_PASSWORD="your-robinhood-password"
Running the Application
To start the interactive chat client:
python chat.py
- MFA Warning: If your Robinhood account has MFA active, the script will pause and prompt you to input the code directly into the terminal window during startup.
- Fallback Mode: If you run without Robinhood credentials, the chat will automatically disable Robinhood tools and fall back to standard chat + Exa web search.
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 ollama_robin-0.1.0.tar.gz.
File metadata
- Download URL: ollama_robin-0.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0422db9810a564f32c631bdc8329aca22c12a6c3763c8fe87e0414b2990bbe7
|
|
| MD5 |
121da33c00c156e3b008d437e8e9150d
|
|
| BLAKE2b-256 |
218d5a788e7d8ee3b7f2bcf8d0803c5d96804c8de564a03f5601a3898cd4a72f
|
File details
Details for the file ollama_robin-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ollama_robin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6f3d2ad7fa7e0971b205ca474fe43d3017f93939ccda8142575a572c280dd0d
|
|
| MD5 |
6487bc262f33695a219b85dabd52c3d9
|
|
| BLAKE2b-256 |
fbbfbcb7102a578de7790a9131d7d6b0fc355b4904eadae2fe0f23a9cbf764da
|