Skip to main content

Autonomous Coding Agent — The Autonomous Gnome

Project description

PocketCoder-A1

Autonomous Coding Agent with Web Dashboard

Write tasks before bed, press Start, wake up to results. A1 works autonomously — runs code, verifies output, takes the next task. Real-time dashboard shows everything.

7086 lines of Python. Zero frameworks. 3 providers. Verification that catches a lying agent.

Dashboard


Install

pip install pocketcoder-a1

Also need Claude Code CLI:

npm i -g @anthropic-ai/claude-code

Requirements: Python 3.10+, Node.js 18+

Full step-by-step guide: GETTING_STARTED.md


Quick Start

# 1. Create venv
python3 -m venv .venv
source .venv/bin/activate

# 2. Install
pip install pocketcoder-a1

# 3. Init on your project
cd /path/to/your-project
pca init .

# 4. Add tasks
pca task add "Add /api/health endpoint"
pca task add "Write unit tests for auth"

# 5. Launch dashboard
pca ui
# Opens http://localhost:7331

Dashboard

8 pages, 24 API endpoints, everything in one Python file.

Live Agent Log

Watch what Claude does in real-time. Every file read, edit, bash command — with colored icons.

Live Log

Tasks with Drag-and-Drop

Cards with priorities, statuses, success criteria. Drag to reorder.

Tasks

AI Transform

Paste messy notes in free form. AI breaks them into structured tasks with descriptions and criteria.

Transform

Completed

5/5 tasks done. 12 sessions. 23 files modified. All verified.

Completed

Light Theme

Light


How It Works

You add tasks → Start Agent → Agent works autonomously
                                    ↓
                              Takes next task
                                    ↓
                              Writes code (Claude CLI subprocess)
                                    ↓
                              Verifies result ← "Don't trust, verify"
                              (pytest, py_compile, files on disk)
                                    ↓
                         PASS → next task    FAIL → retry (max 5)
                                    ↓
                              All done → COMPLETED

Verification: "Don't Trust, Verify"

Agent says "COMPLETED"? We don't believe it. Three-tier check:

Tier Type Checks
1 BLOCKING py_compile, pytest, files exist, success criteria
2 WARNING ruff, build, git diff
3 ANTI-LOOP baseline comparison, max 5 retries, force accept

Caught the agent lying about completion with failing tests. This system prevents that.


Providers

Provider Command Requires
claude-max pca start Claude Max subscription
claude-api pca start --provider claude-api Anthropic API key
ollama pca start --provider ollama Local Ollama server

Configure in dashboard: Settings page.


CLI Commands

Command What it does
pca init . Initialize project
pca task add "..." Add task
pca tasks Show all tasks
pca start Start autonomous agent
pca start --task task_001 Work on single task
pca status Current status
pca validate Run validation checks
pca ui Launch dashboard (:7331)
pca config View settings
pca config set provider ollama Change provider
pca log Session history
pca test Run E2E vision tests

Dashboard Pages

Page URL What
Dashboard / 6 metric cards, Start/Stop, live log, Quick Add
Tasks /tasks List + drag-and-drop + bulk add + AI Transform
Task Detail /task/{id} Full view + logs + Start/Stop/Delete
Sessions /sessions Session history with metrics
Activity Log /log Timeline of actions
Settings /settings Provider, API key, parameters
Commits /commits Git history
Transform /transform Free text → structured tasks via AI

6 Metric Cards

Card Example
Tasks 2/5 done + progress bar
Session #3 + WORKING badge
Tokens 12.4K in / 3.2K out
Cost $0.08
Duration 48s (live timer)
Files 3 modified

Project Structure

a1/
├── loop.py        (1219)  # Brain: subprocess → stream-json → verify
├── dashboard.py   (3491)  # Web UI: 8 pages, 24 API, inline HTML/CSS/JS
├── validator.py    (361)  # Eyes: syntax, tests, lint, build, criteria
├── cli.py          (387)  # CLI: pca init/task/start/ui/test/config
├── config.py       (126)  # Settings: CLI > env > config.json > defaults
├── tasks.py        (236)  # Tasks: CRUD, priority, reorder, criteria
├── checkpoint.py   (173)  # State: session, status, metrics, decisions
└── tester/        (1087)  # Vision QA: Playwright + Claude Vision

API

Full REST API — 24 endpoints. Monitor from scripts:

# Current status
curl http://localhost:7331/api/status | python -m json.tool

# Agent log
curl "http://localhost:7331/api/log?since=0" | python -m json.tool

# Add task
curl -X POST http://localhost:7331/add-task -d "task=Fix+the+bug&description=details"

Links

License

MIT

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

pocketcoder_a1-0.2.5.tar.gz (66.6 kB view details)

Uploaded Source

Built Distribution

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

pocketcoder_a1-0.2.5-py3-none-any.whl (69.0 kB view details)

Uploaded Python 3

File details

Details for the file pocketcoder_a1-0.2.5.tar.gz.

File metadata

  • Download URL: pocketcoder_a1-0.2.5.tar.gz
  • Upload date:
  • Size: 66.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.2

File hashes

Hashes for pocketcoder_a1-0.2.5.tar.gz
Algorithm Hash digest
SHA256 21eb170576533566902538487b72e7c2682420be848d0926ef0cd520803ea75a
MD5 c49dd8e1d15d6a5acb4a6626652ab4bd
BLAKE2b-256 747ab2d5ecfbb1ffebb4e3e6076f2cba671a7475553d54e158269d3d10537165

See more details on using hashes here.

File details

Details for the file pocketcoder_a1-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: pocketcoder_a1-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 69.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.2

File hashes

Hashes for pocketcoder_a1-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 13125628b113394c4a32b426c9fcaed139d144b58b95cfc246810e7e1a461140
MD5 b26c489d5c9850c82e932584ab055042
BLAKE2b-256 62c7f9ae8fb695e756ee8fde61a5d989e82c69a4544de53fc3ba1694fdafd0a6

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