A Local-First AI Assistant That Acts, Not Just Chats
Jarvis-2.0 is an open-source, local-first AI agent that can automate tasks, manage files, execute code, and interact with your development environment. Unlike traditional chatbots, Jarvis is designed to take action on your behalf.
- π Local-First: Runs on your own hardware. Your data stays local.
- π§ Agent, Not Chatbot: Uses tools to actually do things, not just talk about them
- π Pluggable AI Backend: Works with Gemini (more coming soon)
- π‘οΈ Safe by Design: Sandboxed file operations, blocked dangerous commands
- π¦ Extensible Tool System: Easy to add new capabilities
git clone https://github.com/FayezBast/Jarvis-2.0.git
cd Jarvis-2.0python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activatepip install google-genai python-dotenvcp .env.example .env
# Edit .env and add your GEMINI_API_KEYGet your API key from: https://aistudio.google.com/app/apikey
# Interactive mode
python main.py --interactive
# Single command
python main.py "List all Python files in this directory"Jarvis operates in an agent loop:
THINK β DECIDE β ACT β OBSERVE β RESPOND
- THINK: Jarvis analyzes your request
- DECIDE: Chooses to respond directly or use a tool
- ACT: Executes the chosen tool
- OBSERVE: Processes the result
- RESPOND: Provides the final answer
| Tool | Description |
|---|---|
get_files_info |
List directory contents |
get_file_content |
Read file contents |
write_file |
Create or modify files |
delete_file |
Remove files |
search_files |
Search for patterns (like grep) |
| Tool | Description |
|---|---|
shell_command |
Execute shell commands (safely) |
run_python_file |
Run Python scripts |
| Tool | Description |
|---|---|
git_status |
Show repository status |
git_diff |
Show file changes |
git_log |
View commit history |
git_commit |
Create commits |
git_branch |
Manage branches |
| Tool | Description |
|---|---|
fetch_url |
Fetch content from URLs |
| Tool | Description |
|---|---|
save_memory |
Store persistent key-value data |
get_memory |
Retrieve stored data |
delete_memory |
Remove stored data |
Jarvis-2.0/
βββ main.py # Entry point
βββ config.py # Configuration management
βββ prompts.py # System prompts
βββ core/
β βββ agent.py # Agent loop implementation
βββ tools/
β βββ base.py # Base tool class
β βββ registry.py # Tool auto-discovery
β βββ dispatcher.py # Safe tool execution
β βββ builtin/ # Built-in tools
β βββ file_tools.py
β βββ shell_tools.py
β βββ git_tools.py
β βββ memory_tools.py
β βββ web_tools.py
βββ functions/ # Legacy tools (deprecated)
- Create a new file in
tools/builtin/:
from tools.base import BaseTool, ToolArg, ToolResult
class MyNewTool(BaseTool):
TOOL_NAME = "my_tool"
TOOL_DESCRIPTION = "What my tool does"
TOOL_ARGS = [
ToolArg(
name="param1",
type="string",
description="Description of param1",
required=True,
),
]
def run(self, param1: str, **kwargs) -> ToolResult:
# Your logic here
return ToolResult(ok=True, tool=self.TOOL_NAME, result={"data": "..."})- The tool is automatically discovered on next run!
You: What files are in this project?
Jarvis: β get_files_info
I found 12 files including main.py, config.py, and a tools/ directory...
You: Show me the main entry point
Jarvis: β get_file_content
Here's main.py: [contents]
You: Create a hello.py that prints "Hello World" and run it
Jarvis: β write_file
β run_python_file
Done! I created hello.py and ran it. Output: "Hello World"
You: What changes have I made?
Jarvis: β git_status
β git_diff
You have modified 3 files: config.py, main.py, and README.md...
You: Commit these with message "Update configuration"
Jarvis: β git_commit
Committed: "Update configuration" (abc1234)
All settings are in .env:
# Required
GEMINI_API_KEY=your_key_here
# Optional
MODEL_NAME=gemini-2.5-flash
TEMPERATURE=0.0
MAX_ITERATIONS=20
VERBOSE=false
DRY_RUN=falseJarvis is designed with safety in mind:
- β All file operations are sandboxed to the working directory
- β Dangerous commands (rm, sudo, etc.) are blocked
- β No eval/exec of arbitrary code
- β Dry-run mode for testing destructive operations
- β All data stays local (no cloud storage)
- Voice Interface (STT/TTS)
- GUI (Web or Desktop)
- Scheduler (Background tasks)
- Long-term Memory (Vector DB)
- More AI Backends (Ollama, OpenAI, Anthropic)
- Plugin System (Third-party tools)
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details.
Built with β€οΈ for the local-first AI community.