Skip to main content

OpenLoom: a lightweight agent task harness — schedule, monitor, and verify AI coding tasks.

Project description

OpenLoom

CI

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 (cold-detected; no extra deps yet)
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

0. Start OpenCode

OpenLoom talks to OpenCode over HTTP. In a separate terminal:

opencode serve
# or launch the OpenCode app/TUI (it also exposes the API on port 4096)

If OpenCode is not running, openloom watch exits with setup hints; openloom serve starts the dashboard but session features stay offline until OpenCode is up.

1. Configure OpenCode connection (optional)

Most local setups need no env vars — OpenLoom defaults to http://127.0.0.1:4096 with no HTTP auth (same as opencode serve without OPENCODE_SERVER_PASSWORD).

If your OpenCode server uses HTTP basic auth:

export OPENLOOM_OPENCODE_URL=http://127.0.0.1:4096
export OPENLOOM_OPENCODE_USERNAME=opencode
export OPENLOOM_OPENCODE_PASSWORD=your-password

Windows (PowerShell):

$env:OPENLOOM_OPENCODE_URL = "http://127.0.0.1:4096"
$env:OPENLOOM_OPENCODE_USERNAME = "opencode"
$env:OPENLOOM_OPENCODE_PASSWORD = "your-password"

Other optional variables:

Variable Default Purpose
OPENLOOM_OPENCODE_URL http://127.0.0.1:4096 OpenCode HTTP base URL
OPENLOOM_OPENCODE_USERNAME opencode Basic auth user (only if OpenCode has a server password)
OPENLOOM_OPENCODE_PASSWORD (empty) Basic auth password
OPENLOOM_DATABASE .openloom/openloom.sqlite3 Task store path
OPENLOOM_UI_HOST 127.0.0.1 Web UI bind address
OPENLOOM_UI_PORT 55413 Web UI port
OPENLOOM_MAX_TASK_TOKENS (unset) Optional global token cap per task (OpenCode session stats)
OPENLOOM_MAX_TASK_RUNTIME_MINUTES (unset) Optional global runtime cap per task (minutes since created)

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   # minimum 5; all tasks are harness-watched
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 (Today / week / month / total)
  • Activity — tasks, archived tasks, sessions by workspace
  • New Task — plan with goal/steps/acceptance, attach to workspace or existing session
  • Permissions — pending tool approvals with Once / Always / Deny (optional auto-accept, OpenCode Desktop–compatible)
  • Session drawer — messages, usage, diff, metadata per 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 (keep lean)
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


Download files

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

Source Distribution

openloom-0.8.3.tar.gz (117.3 kB view details)

Uploaded Source

Built Distribution

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

openloom-0.8.3-py3-none-any.whl (101.9 kB view details)

Uploaded Python 3

File details

Details for the file openloom-0.8.3.tar.gz.

File metadata

  • Download URL: openloom-0.8.3.tar.gz
  • Upload date:
  • Size: 117.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openloom-0.8.3.tar.gz
Algorithm Hash digest
SHA256 24eecf574284b2358aba24882e55d072b957353d8c430cc2bc49a77e6f74594c
MD5 d2fd5db68bfe9b09cefb0d960704f8ff
BLAKE2b-256 e9db0b10eb44461e04faf7cc2520dffad291c5e67346f5a4d6c0e09a792bf1de

See more details on using hashes here.

Provenance

The following attestation bundles were made for openloom-0.8.3.tar.gz:

Publisher: release.yml on atbeta/openloom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openloom-0.8.3-py3-none-any.whl.

File metadata

  • Download URL: openloom-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 101.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openloom-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a8eaf74219459dc04e3019261e07d377d8bea3d3342e66ba76fbc25283feb221
MD5 415c62b0f1f00dc79674dd23ce7005f6
BLAKE2b-256 815e95eb1cc392395ca7d88d126ef9847a5ec9879ec828412780ef461571a2b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openloom-0.8.3-py3-none-any.whl:

Publisher: release.yml on atbeta/openloom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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