Skip to main content

Local LLM agent powered by ollama — memory, plan mode, subagents

Project description

ollaAgent

A local LLM agent powered by ollama — with persistent memory, plan mode, and parallel subagents.

Python License: MIT

Features

Feature Description
Agent Loop Iterative tool-calling loop with run_python, run_bash, read_file, write_file, list_files
Persistent Memory JSON-backed memory with /memory add/list/search/clear commands
Session Saving Conversation history auto-saved to .agents/sessions/ on exit
Plan Mode /plan <task> — generates a structured step-by-step plan without executing tools
Subagents /subagent — runs multiple ollama instances in parallel via multiprocessing.Pool
Permission Control Configurable allow/deny patterns for bash commands
Cloudflare Access Supports CF-Access headers for tunneled ollama endpoints

Requirements

  • Python 3.11+
  • ollama running locally (or via Cloudflare Access)
  • uv

Installation

git clone https://github.com/github010000/ollaAgent
cd ollaAgent
uv sync

Usage

# Start the agent (default model: qwen3-coder-next:latest)
ollaagent

# With a specific model
ollaagent --model qwen2.5-coder:7b

# With a remote ollama host
ollaagent --host https://your-ollama.example.com

Built-in Commands

Command Description
/plan <task> Generate a step-by-step plan (no execution)
/subagent Run tasks in parallel across multiple ollama instances
/memory add <text> Add an entry to persistent memory
/memory list List all memory entries
/memory search <query> Search memory by keyword
/memory clear Clear all memory entries
/exit Exit the agent

Subagent Usage

Single model across all tasks:

/subagent
> --model llama3:8b task one | task two | task three

Per-task model assignment:

> @qwen2.5-coder:7b write a sorting algorithm | @llama3:8b explain it

Configuration

Create a .env file in the project root:

OLLAMA_HOST=http://localhost:11434
CF_ACCESS_CLIENT_ID=
CF_ACCESS_CLIENT_SECRET=

Project Structure

ollaAgent/
├── agent.py          # Main agent loop & CLI entry point
├── memory.py         # Persistent memory (JSON)
├── plan_mode.py      # Plan-only mode (tools=[])
├── subagent.py       # Parallel subagents via multiprocessing
├── tool_bash.py      # Bash tool with permission control
├── permissions.py    # Allow/deny pattern matching
├── config_loader.py  # YAML config & system prompt builder
└── ollama_client.py  # Ollama client factory

Running Tests

uv run pytest

License

MIT — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ollaagent-0.1.8.tar.gz (62.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ollaagent-0.1.8-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file ollaagent-0.1.8.tar.gz.

File metadata

  • Download URL: ollaagent-0.1.8.tar.gz
  • Upload date:
  • Size: 62.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ollaagent-0.1.8.tar.gz
Algorithm Hash digest
SHA256 ba0b863b69178f50bf36192873e5a598514aaefe555a3b374a084d7a1542cbf4
MD5 46185abe09a00784474db4da5c2e8922
BLAKE2b-256 9263e7d62e30e0298b763691eef83316d737b3764afb8c9eda78d1385e38be01

See more details on using hashes here.

File details

Details for the file ollaagent-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: ollaagent-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ollaagent-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b4a9d5a41aa387091a8cd5158ed587f59de935e0216d1904dac53e7beadb9140
MD5 0d56b05ef40bb374bf28451983a0fc28
BLAKE2b-256 060364986bf2de35a51e61b8e899b0f128b22a5521a5ac8e131464977942c083

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page