Skip to main content

Licensed under the MIT License. See LICENSE for details.

OwA — Ollama Workspace Agent

An open-source local coding assistant powered by Ollama. Runs entirely on your own hardware — no cloud, no telemetry, no API keys required beyond your own Ollama server.

Install

pip install ollama-workspace-agent

Or with pipx for an isolated install:

pipx install ollama-workspace-agent

Requirements

  • Python 3.11+
  • Ollama running on a reachable machine
  • A chat model installed on Ollama, such as llama3.1:8b
  • An embedding model installed on Ollama, such as nomic-embed-text

Quick Start

cd your-project
owa

On first run, type /setup to configure your Ollama connection. OwA will walk you through it interactively and save the config to ~/.config/owa/.env.

Then just start chatting — OwA will auto-index your project on startup.

Configuration

Run /setup inside OwA, or manually create ~/.config/owa/.env:

LLM_BASE_URL=http://YOUR_OLLAMA_HOST:11434/v1
LLM_MODEL=llama3.1:8b
EMBEDDING_BASE_URL=http://YOUR_OLLAMA_HOST:11434
EMBEDDING_MODEL=nomic-embed-text
API_KEY=choose-a-private-api-key

You can also place a .env in your project root to override the global config for that project.

LLM_BASE_URL uses Ollama's OpenAI-compatible /v1 API. EMBEDDING_BASE_URL uses Ollama's native /api/embed API. If Ollama runs on the same machine, replace YOUR_OLLAMA_HOST with 127.0.0.1.

Verify Ollama

curl http://YOUR_OLLAMA_HOST:11434/api/tags

A successful response contains a models list. Make sure the models in your config are installed:

ollama pull llama3.1:8b
ollama pull nomic-embed-text

CLI Commands

Command Description
/setup Configure Ollama connection
/model Switch the active chat model
/index Rebuild the project index
/status Show index status
/clear Clear conversation history
/help Show available commands
/quit Exit

Indexing

OwA auto-indexes your project on first run. Common directories are excluded automatically (node_modules, dist, build, .github, .git, .venv, etc.).

To exclude additional files or directories, create a .owaignore in your project root:

# .owaignore
secrets.json
fixtures/
*.min.js

The local index is stored in .owa/ and is automatically added to your .gitignore on first index.

API Mode

Run the HTTP API:

uvicorn app.api:app --host 127.0.0.1 --port 8000

Use the CLI as an API client:

owa --api-url http://127.0.0.1:8000

Available endpoints: GET /health, GET /status, POST /chat, POST /chat/stream, POST /clear, POST /index.

When API_KEY is configured, include it in the X-API-Key header for every endpoint except /health.

Tools

The agent can call these workspace tools:

Tool Description
list_dir List files and directories
read_file Read UTF-8 text files
patch_file Targeted search-and-replace edit on an existing file
write_file Create or fully replace a file
search_code Semantic search over the indexed codebase
code_review Review Python files for common security risks
run_command Run a shell command after user confirmation
git_status Show Git branch and working tree status
git_diff Show current Git diff
git_log Show recent Git commits

Project Layout

.
├── app/
│   ├── agent/       Agent orchestration and system prompt
│   ├── api.py       FastAPI endpoints and request models
│   ├── cli.py       CLI entry point
│   ├── config.py    Global config path resolution
│   ├── service.py   Shared chat, indexing, and status service
│   ├── indexer/     Code indexing and semantic search
│   ├── llm/         OpenAI-compatible Ollama client
│   └── tools/       Workspace tool implementations and registry
├── demo/            Small demo code
├── main.py          Thin shim for `python main.py`
├── CHANGELOG.md     Project change history
└── README.md        Project documentation

Development

Clone and install in editable mode:

git clone https://github.com/ZakaCoding/ollama-workspace-agent
cd ollama-workspace-agent
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Run tests:

pytest tests/ -v

Compile check:

python -m py_compile main.py app/agent/*.py app/indexer/*.py app/llm/*.py app/tools/*.py

Download files

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

Source Distribution

ollama_workspace_agent-0.4.2.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

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

ollama_workspace_agent-0.4.2-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

Details for the file ollama_workspace_agent-0.4.2.tar.gz.

File metadata

  • Download URL: ollama_workspace_agent-0.4.2.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.16

File hashes

Hashes for ollama_workspace_agent-0.4.2.tar.gz
Algorithm Hash digest
SHA256 78e9f981cc959e90ff5d26ef336881cf6d5406f2157eefbaf98c0e59bcc4f7fe
MD5 a816723479e8aface34a6d83e1207b64
BLAKE2b-256 57e07f82812c0b35688da79de17e1d61927d3747120847b567a513341eb16c1c

See more details on using hashes here.

File details

Details for the file ollama_workspace_agent-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ollama_workspace_agent-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cd0a28f8b7f48aedee2ddef814ed8e8973413ebfc50b4a8448632441b4addd3a
MD5 72e38fa66adef911062a712b493c7c31
BLAKE2b-256 e6c14461e2a9650740c6e98e4ae774eec056d785be21fdc696a4f1348c3d33dc

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 files

0.4.1

2 files

0.4.0

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page