A lightweight, open-source AI Agent powered by free APIs
Project description
๐ค MRAgent
A lightweight, open-source AI Agent powered by free APIs
Features โข Architecture โข Getting Started โข API Providers โข Roadmap
โจ Overview
MRAgent is a lightweight AI agent that connects to free-tier LLM and multimodal APIs to deliver a powerful, personal assistant experience โ without expensive subscriptions. It combines text generation, image generation, text-to-speech, speech-to-text, screen monitoring, web browsing, code execution, terminal access, and file management into a single, extensible agent.
Philosophy: Leverage the best free APIs available (primarily from NVIDIA and other open-source providers) to build an agent that rivals commercial solutions.
๐ Features
| Capability | Description | Status |
|---|---|---|
| ๐ฌ LLM Chat | Multi-model text generation (GPT-OSS, Kimi, GLM-5, Llama 3.3) | โ Implemented |
| ๐จ Image Generation | Text-to-image via FLUX.1 Dev (default) & Google AI Studio (optional) | โ Implemented |
| ๐ฃ๏ธ Text-to-Speech | Natural voice synthesis via Edge TTS (Free, Neutral) | โ Implemented |
| ๐ Speech-to-Text | Audio transcription via Groq Whisper v3 (Ultra-fast) | โ Implemented |
| ๐ง Email Skill | Send & receive emails via AgentMail (Interactive /email command) |
โ Implemented |
| ๐ฑ Telegram Bot | Chat, Voice, & Image interaction | โ Implemented |
| ๐ VivreCard | Background Scheduler & Heartbeat System | โ Implemented |
| ๐ก๏ธ Poneglyph | System Guardian & Doctor (Auto-diagnostics) | โ Implemented |
| ๐ Web Browsing | Autonomous internet surfing and information gathering | โ Implemented |
| ๐ฅ๏ธ Screen Monitoring | Capture and analyze screen content in real-time | โ Implemented |
| ๐ป Code Execution | Write, run, and debug code in multiple languages | โ Implemented |
| ๐ง Terminal Access | Execute shell commands and system operations | โ Implemented |
| ๐ File Management | Navigate, create, move, and organize files | โ Implemented |
| ๐ Web Search | Search with citations via Brave, Google, or LangSearch | โ Implemented |
| ๐ PDF Reader | Read & extract text from PDFs with page markers | โ Implemented |
| ๐ Identity Setup | Interactive wizard to customize User and Agent persona | โ Implemented |
| ๐ก๏ธ Injection Defense | Structural tagging & sanitization of untrusted external data | โ Implemented |
| โก Smart Autonomy | Tiered trust levels (cautious/balanced/autonomous) for 24/7 ops | โ Implemented |
| ๐งญ Screen Guidance | /guide command โ capture screen & get AI-powered guidance |
โ Implemented |
๐๏ธ Architecture
MRAgent/
โโโ main.py # Entry point & startup
โโโ requirements.txt # Python dependencies
โโโ .env.example # Template for API keys
โ
โโโ config/
โ โโโ settings.py # Config, model registry, autonomy settings
โโโ core/
โ โโโ poneglyph.py # System Guardian & Doctor
โโโ agents/
โ โโโ core.py # Core agent loop + tiered approval logic
โ โโโ prompt_enhancer.py # System prompt & context injection
โ โโโ watcher.py # Eagle Eye screen monitor
โ โโโ vivrecard.py # Background scheduler
โโโ skills/
โ โโโ agentmail.py # Email skill
โ โโโ telegram.py # Telegram skill
โโโ providers/
โ โโโ nvidia_llm.py # NVIDIA LLM (GPT-OSS, Kimi, GLM, Qwen)
โ โโโ nvidia_image.py # Image generation (SD 3.5, FLUX)
โ โโโ tts.py # Edge TTS
โ โโโ nvidia_stt.py # Groq STT
โ โโโ brave_search.py # Brave Search (with citations)
โ โโโ google_search.py # Google Custom Search
โ โโโ langsearch.py # LangSearch API
โโโ tools/
โ โโโ terminal.py # Shell command execution
โ โโโ file_manager.py # File CRUD operations
โ โโโ browser.py # Web fetch & search (with sanitizer)
โ โโโ pdf_reader.py # PDF text extraction
โ โโโ screen.py # Screen capture & diff
โ โโโ code_runner.py # Python code execution
โ โโโ image_gen.py # Image generation tool
โโโ ui/
โ โโโ cli.py # Rich CLI (commands, menus, autonomy)
โ โโโ web.py # Flask Web Interface
โ โโโ telegram_bot.py # Telegram bot
โโโ utils/
โ โโโ sanitizer.py # Prompt injection defense
โ โโโ logger.py # Logging
โ โโโ helpers.py # Shared utilities
โโโ memory/
โ โโโ chat_store.py # SQLite chat persistence
โโโ data/ # Runtime data (gitignored)
โโโ chats.db
โโโ images/
โโโ logs/
๐ ๏ธ Getting Started
Prerequisites
- Python 3.10+
- Free API keys (see API Providers)
- Nvidia
- Groq
- Google AI Studio
(optional) set IMAGE_PROVIDER=google in .env to use instead of FLUX - Brave
you can just use langsearch but brave gives better results - LangSearch
- AgentMail
Installation
One-Line Installer (Recommended)
Mac/Linux:
curl -fsSL https://raw.githubusercontent.com/bonzainsights/MrAgent/main/install.sh | bash
Windows (PowerShell):
iwr https://raw.githubusercontent.com/bonzainsights/MrAgent/main/install.bat | iex
Pip (Python Package)
If you have Python 3.10+ installed:
pip install bonza-mragent
mragent
Homebrew (macOS)
brew install --HEAD https://raw.githubusercontent.com/bonzainsights/MRAgent/main/Formula/mragent.rb
Manual Setup (Advanced)
# Clone the repository
git clone https://github.com/bonzainsights/MrAgent.git
cd MRAgent
# Create a virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up your environment variables
cp .env.example .env
# Edit .env with your API keys
Quick Start
If you boot the system without API keys or an identity configured, an Interactive Setup Wizard will safely guide you through copying your free NVIDIA NIM key and naming your Assistant before booting automatically!
# Run the agent (CLI mode + Web UI)
python main.py
# Run as Telegram bot
python main.py --mode telegram
# Run System Diagnostic
python main.py doctor
๐ API Providers
MRAgent is built around free-tier APIs to keep costs at zero. Here are the current providers:
NVIDIA NIM (Primary)
| Model | Purpose | API |
|---|---|---|
| GPT-OSS-120B | Reasoning (Primary) | NVIDIA NIM |
| Kimi K2.5 | General-purpose LLM | NVIDIA NIM |
| GLM-5 | Reasoning & code | NVIDIA NIM |
| Llama 3.3 70B | Reliable fallback | NVIDIA NIM |
| Qwen2.5 Coder | Code generation | NVIDIA NIM |
| FLUX.1 Dev | Image generation (default) | NVIDIA NIM |
| Stable Diffusion 3 Medium | Image generation (fallback) | NVIDIA NIM |
Other Free Providers
| Provider | Purpose | Service |
|---|---|---|
| Groq | Speech-to-Text | Whisper Large v3 (Free) |
| Edge TTS | Text-to-Speech | Microsoft Edge Neural (Free) |
| AgentMail | AgentMail.to (Free) | |
| Brave Search | Web search | Brave Search API (Free) |
| Google Search | Web search | Custom Search JSON API (Free) |
| LangSearch | Web search | LangSearch API (Free) |
| Telegram | Messaging Interface | Telegram Bot API (Free) |
๐ก Adding new providers? Implement the base interface in
providers/base.pyand register your provider in the config.
๐บ๏ธ Roadmap
- Project setup & repository initialization
- Core agent loop with task planning
- NVIDIA LLM integration (multi-model)
- Image generation pipeline
- Text-to-speech (Edge TTS)
- Speech-to-text (Groq Whisper)
- Telegram bot interface (Voice & Image support)
- Web Interface (Chat & Voice)
- Email Integration (AgentMail)
- VivreCard Scheduler
- Poneglyph System (Guardian & Doctor)
- Multi-provider search (Brave, Google, LangSearch)
- Terminal & code execution tools
- File management system
- Screen monitoring & analysis
- Web browsing automation
- Security: Terminal/Code Execution Approvals (HitL)
- Security: Web UI & Telegram Authentication
- Interactive Startup Wizards (API Keys & Identity)
- NVIDIA API Key Consolidation (Global Defaulting)
- Prompt injection defense (structural data tagging & sanitization)
- Smart autonomy system (cautious/balanced/autonomous trust levels)
- PDF reader tool (page-by-page extraction)
- Search citations (numbered source URLs in results)
- Screen guidance pipeline (
/guidecommand) - UI polish (compact startup, personalized welcome)
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is open source. See the LICENSE file for details.
โ ๏ธ Disclaimer
MRAgent uses free-tier API keys which may have rate limits and usage quotas. The agent is designed to work within these constraints. Never commit your .env file or expose API keys publicly.
Built with โค๏ธ by Bonza Insights & achbj
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 bonza_mragent-0.2.2.tar.gz.
File metadata
- Download URL: bonza_mragent-0.2.2.tar.gz
- Upload date:
- Size: 269.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24f52377035efe2c5a8aaff2a70fbb3b02f6f5ef0f8fe5dfdddf82272612f8fa
|
|
| MD5 |
7dc7ad81ca8bd9692b92a343d7367f35
|
|
| BLAKE2b-256 |
dcd4fb59fe19376eb19b97b1b1ff63763e18c699de8115eb938c62a58d903b8c
|
File details
Details for the file bonza_mragent-0.2.2-py3-none-any.whl.
File metadata
- Download URL: bonza_mragent-0.2.2-py3-none-any.whl
- Upload date:
- Size: 121.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1670e05975c69ed8d7a447d89e32dd1fc7d109b12cfeb41e7130ff281cf7b7af
|
|
| MD5 |
c689c9901869dc1a895ae58d97063217
|
|
| BLAKE2b-256 |
2c0e95c7b5884b7845f27fc170f0f236b237a3e0f65a96a152aa6db035b24c78
|