Your Local AI Assistant

A powerful command-line interface and REPL for interacting with local Ollama models.
Built on DeepAgents and LangChain, featuring integrated shell execution, screen vision, memory management, RAG, and skills.

Key Features

Interactive REPL

A modern terminal-based chat interface with rich Markdown support.

Slash Commands

/newStart a fresh session context
/historyView list of past sessions
/model-set <name>Switch active Ollama model
/clearClear the current screen
/exitClose the application

Non-Interactive Mode

Execute single-shot tasks directly from your shell.

CLI Args

-p "..."Prompt to execute immediately
--rag <db>Use specific RAG database
--skills-dir <dir>Add extra skills directory
# Example ollama-agent -p "Summarize README.md" --rag docs_db

Deep RAG

Contextual Retrieval Augmented Generation using local vector stores.

Management Commands

/rag-create <name>Initialize a new knowledge base
/rag-add <path>Ingest file or directory
/rag-load <name>Activate a specific DB

Mem0 Memory

Long-term persistence powered by Mem0 and Qdrant.

The agent automatically stores and retrieves user preferences and context across sessions.

Actions

mem0_add_memoryTool to explicitly save facts
mem0_searchTool to recall information

Screen Vision

Give your agent eyes. Capture and analyze your screen contents.

Supported on Linux (X11/Wayland).

Syntax

@dp0Capture primary display
@dp1Capture second monitor
# Example prompt "Look at @dp0 and help me fix this error message"

Task Automation

Define reusable workflows in YAML to automate complex queries.

Task Commands

/tasksList available tasks
/task-run <id>Execute a specific task
/task-createInteractive task builder
# ~/.ollama-agent/tasks/analyze.yaml title: Code Analysis model: codellama prompt: | Analyze the current file for security vulnerabilities and suggest improvements.

MCP Support

Extend capabilities with Model Context Protocol servers.

Each configured MCP server is exposed as a delegation tool (use_<name>) backed by its own DeepAgents sub-agent using langchain-mcp-adapters. Edit ~/.ollama-agent/mcp_servers.json to add servers.

{ "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"] } } }

Skills

Reusable, on-demand agent capabilities following the Agent Skills specification.

Skills provide task-specific instructions via progressive disclosure — the agent only reads full instructions when a skill’s description matches the prompt, keeping the system prompt lean.

Skill Commands

/skillsList all available skills
/skill-show <id>View full skill details
/skill-create <id>Interactive skill builder
/skill-delete <id>Remove a skill
# ~/.ollama-agent/skills/langgraph-docs/SKILL.md --- name: langgraph-docs description: Fetch relevant LangGraph documentation. --- # langgraph-docs ## Instructions 1. Fetch the documentation index. 2. Select relevant pages. 3. Provide accurate guidance.

Integrated Shell Execution

The agent interacts with your system through a built-in shell middleware.

Shell commands are handled transparently via ShellToolMiddleware, removing the need for an explicit execute_command tool. The middleware integrates directly with the DeepAgents graph for seamless tool execution.

Built-in Tools

Shell MiddlewareTransparent command execution with configurable timeout
rag_searchSearch loaded RAG knowledge bases
mem0_add_memoryPersist facts for the active user
mem0_search_memoryRecall stored information
# Example prompt "Find all Python files in src/ modified in the last 24h"

Getting Started

Requirements

Ensure you have Ollama running with a tool-capable model (like llama3.1) and an embedding model.

ollama pull gpt-oss:20b
ollama pull nomic-embed-text

Installation

pipx install git+https://github.com/arrase/ollama-agent.git

Interactive Mode

Start the chat interface to begin a session.

ollama-agent

One-off Commands

Execute a single prompt directly from your shell.

ollama-agent -p "Find large files in /var/log and summarize them"