OpenLoom: a lightweight agent task harness — schedule, monitor, and verify AI coding tasks.
Project description
OpenLoom
Don't trust the agent's word — trust the file system.
OpenLoom is a lightweight harness and observer for OpenCode. It schedules tasks, watches sessions, and verifies completion with file-system checks instead of model self-reports.
OpenLoom does not replace OpenCode. It fills the gaps in OpenCode's HTTP API: session monitoring, task plans, periodic checks, a web dashboard, and token usage summaries.
Install
Requires Python 3.11+ and a running OpenCode server.
pip install openloom
# or
uv tool install openloom
Web dashboard (FastAPI + bundled Svelte UI):
pip install "openloom[ui]"
Optional extras (install only what you need):
| Extra | Purpose |
|---|---|
ui |
Web dashboard (openloom serve, openloom watch --ui) |
server |
Same as ui (team server mode alias) |
openspec |
OpenSpec checkbox completion checks |
github |
GitHub integration |
validate |
Pre-archive validation hooks (uses your project's pytest/mypy) |
There is intentionally no [all] extra — pick capabilities as you grow.
Quick start
1. Configure OpenCode connection
export OPENLOOM_OPENCODE_URL=http://127.0.0.1:14096
export OPENLOOM_OPENCODE_USERNAME=opencode
export OPENLOOM_OPENCODE_PASSWORD=your-password
Optional: restrict which workspace paths tasks may use:
export OPENLOOM_ALLOWED_ROOTS=/Users/you/Projects
See .env.example for all variables.
2. CLI — watch a task spec
openloom init # writes openloom.yaml in cwd
openloom watch # run harness from openloom.yaml
openloom watch --ui # same + local web UI (needs [ui])
openloom status
openloom log <task-id-prefix>
Example spec (openloom.yaml):
name: Fix SSE reconnect
workspace: /path/to/project
check_interval_minutes: 5 # 0 = send once, no periodic checks
goal: |
Fix SSE reconnect after network drop.
steps:
- Investigate current SSE implementation
- Implement reconnect with backoff
- Add regression coverage
3. Web dashboard — multi-task server
pip install "openloom[ui]"
openloom serve --host 127.0.0.1 --port 55413
Open http://127.0.0.1:55413 for:
- Dashboard — session token usage, by-model breakdown, period summaries
- Activity — tasks, archived tasks, sessions by workspace
- New Task — plan with goal/steps/acceptance, attach to workspace or existing session
The UI static assets are pre-built inside the wheel — no Node.js required at install time.
Architecture (short)
core/ Harness, store, event bus, Source / Checker / Sink ABCs (≤600 lines)
runtime/ OpenCode HTTP client, session status, prompts
levels/ Progressive capabilities (manual, config, openspec, ui, …)
server/ FastAPI app + routes + static UI ([ui] extra)
State changes flow: store write → event emit. API routes read the store; the event bus pushes notifications only.
Development
uv sync
uv run pytest
# Rebuild frontend into the package (before release)
cd frontend && npm install && npm run build
cd .. && uv build
License
MIT — see LICENSE.
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 openloom-0.7.0.tar.gz.
File metadata
- Download URL: openloom-0.7.0.tar.gz
- Upload date:
- Size: 98.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acd91eb4f0fb024c965b2a30488f60bb974a0e77880b12e9e43302750992f6bb
|
|
| MD5 |
0fee320a167731bc172733edd0cfe171
|
|
| BLAKE2b-256 |
3256f9d7b7a62eed2ce3933d2c9b642e51d99f59b1c9b6755f235b3fe38ae28f
|
File details
Details for the file openloom-0.7.0-py3-none-any.whl.
File metadata
- Download URL: openloom-0.7.0-py3-none-any.whl
- Upload date:
- Size: 88.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bc00f2722c5349dc5b0936ba389ccf4ccf508cbd7cf12d7d75c46b11e79320e
|
|
| MD5 |
f0824c5728e2597e0b49c54262062944
|
|
| BLAKE2b-256 |
e3af3f8e839830b4e1f18d1889fcc4783f39b794a87d40d3f317fb87ad5cbf45
|