Owner jobs and guests' own scheduled jobs are the cron-jobs live plugin's (forms move-ai-agent-cron-jobs-into-a-plugin_u0wa6b, cron-scheduled-in-the-cli-and-mcp_x4nk83). Gone: backend/cron/, schemas/cron.py, /api/cron*, /api/me/cron*, the cron scheduler thread, Settings → Cron and the guests' Tâches planifiées pages, `ai-agent cron` (now a pointer), MCP run_cron_job / set_cron_job / browse cron, the scheduled-jobs core skill, guestDefaults.cronLimits. The core keeps thin contracts: - runs.guest bridge (runs/guestjob.py): a guest's job run as that guest, confined by the core from their record; the plugin only names it. - runs.start's cron stamp → meta.cron. - delivery of a guest job's result (push, mail, mailHtml) off the stamp. - « Discuter »: POST /api/cron-runs/discuss. - runs.cron provider readers (plugins/cron_bridge.py): budget, auto-archive, agents catalog, the agents page's Schedule. - core/cronexpr.py, agents/runconfig.py; context.write create for a new agent definition; ui.pages[].unless; setRoute keeps a Settings page under /settings/p/. - carryover.cron_jobs: /data/cron-jobs.json → the plugin's jobs.json, cronLimits → limits.json, guests' qwen jobs → sonnet (PR #23's decision, superseded). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7.6 KiB
GOAL — where ai-agent is going
North star
Be the open-source, intuitive, private and secure agent layer of any computer — to build and host websites and interact with your data.
Think Lovable, but open source and self-hosted: instead of a cloud service that builds apps for you on someone else's infrastructure, this is an agent layer you run on your own machine. It drives a coding agent to build things, hosts what it builds, and gives you a first-class UI over everything the agent touches — conversations, files, projects, costs, deploys.
Product pillars
- Open source — the whole layer (backend, PWA, runner, deploy tooling) is inspectable and forkable. No black-box cloud builder.
- Intuitive — a non-terminal user can spawn a session, watch it work in a live thread, and end up with a deployed site. The PWA is the product, not a debug view.
- Private — your prompts, transcripts, code and data stay on your hardware. Nothing is shipped to a third party beyond the model API calls you configure.
- Secure — authenticated at the edge, a trusted-caller gate on the API, and uploaded/user bytes never execute on the app origin. Agent writes are scoped to explicit mounts.
Architecture direction
- Zipgo under the hood. Site building and hosting go through zipgo: the agent builds a project, zipgo deploys it under a subdomain with TLS. The agent layer orchestrates; zipgo serves.
- Single Docker container. The target packaging is one container that any
computer can run — agent runner, backend, UI and deploy path included.
Today's split (host-side sidecar for the
claudeCLI, host-installed zipgo, homelab-specific mounts) is the gap to close: fold the runner into the container and make the host mounts optional, generic configuration. - Self-update, inside the container. The layer keeps itself current
without host intervention: it can rebuild/upgrade its own image and roll
over via the existing health-gated blue-green mechanism (
deploy.sh), with the update logic living inside the container rather than in host scripts.
What exists today vs. the goal
Today ai-agent is the homelab's Claude context viewer + session spawner
(see CLAUDE.md): transcripts, file/token analytics, projects and
services catalogs, spawn/resume/interrupt, blue-green deploys. That is the
foundation — the conversation UX, the security model and the deploy machinery
already exist.
The distance to the north star, roughly in order:
- Fold the host sidecar into the container. The Claude Code CLI is a
self-contained native binary, so the image carries it and runs the same
sidecar/sidecar.pyon the container's loopback:RUNNER_IN_CONTAINER=1(the standalone default) ⇒ the entrypoint starts the runner, points the backend'sSIDECAR_URLat it, and watches the transcripts the CLI writes under its own$HOME. A standalone container spawns sessions with no host process at all — verified end to end (spawn → run → the turn renders in the viewer). The CLI authenticates fromANTHROPIC_API_KEYor a logged-in Claude home mounted atRUNNER_HOME. The homelab is unchanged: it leaves the flag off and keeps its host sidecar, which is what lets a run use the host's own hooks/skills/credentials. - Bundle zipgo so "build me a site" ends in a hosted URL with no host-side tooling.
- Run with no homelab mounts. Every catalog now degrades to an empty
list instead of erroring when its mount is absent, so the image boots
against nothing but a workspace + a data dir.
docker-compose.standalone.ymlis that generic shape, andscripts/standalone-smoke.shasserts it on a throwaway workspace (it catches a catalog that 500s on a missing mount — which is how the templates endpoint got fixed). A missing catalog is a valid state, not an error — keep it that way when adding one. - Replace the remaining homelab-specific config with a first-run setup
(the homelab
docker-compose.ymlstill hardcodes ~8 host paths; the standalone file is the target shape, but there's no first-run wizard). - Unblock the standalone build: publish
@gabvdl/uito public npm.frontend/.npmrcpulls the scope from the homelab's verdaccio onlocalhost:4873, so today the image only builds on the homelab (it runs anywhere). This gates the one-liner install below. Needs the pendingNPM_TOKEN— a human/credential step. - In-container self-update (image rebuild/upgrade + blue-green rollover triggered from inside).
- Workers: pair any machine's runner. The same
sidecar/sidecar.pyruns on another machine (a Mac, as a launchd agent —worker/install-macos.sh) and the hub pairs with it once from a one-line string (host:port/code/login). Runs there have that machine's own login and tools; the hub pulls everything — runs, liveness, transcripts (/feed, mirrored into one more source dir) — and the worker never calls back. Next: the four lab skills on a worker (notify-done, ask-form, conv-meta, complete) — skipped for now because they would need the worker to call the hub. - Spawn inside a pre-created worktree. Every spawned session starts
in the canonical checkout and is told to make a worktree, so its shell
cwd snaps back to the canonical repo after every command (the harness
resets cwd per Bash call — 700+ past conversations, and edits that
landed in
mainby accident). Instead: when the composer's tags name one repo and the "isolated worktree" guideline is on, the sidecar runsnew-worktree.sh(super or-p <project>) beforeclaude -pand launches the session with that worktree as its cwd (transcript dir = the worktree's encoded path —find-transcript.shalready searches every project dir). The prompt drops the "spin up a worktree" line and says where it is; the conversation card gets the worktree tag from the sidecar, not from the skill hook. Decided 2026-09-22 (form answer in the dev-pipeline-friction conversation); see the homelab logdata/log/2026-09-22-dev-pipeline-friction.md. - Publish as a standalone open-source repo with a one-liner install
(
docker run …). The repo split is done — this is now its own repo (extracted from the homelab monorepo with full history, public at git.gabvdl.xyz/gabrielvidal/ai-agent; the homelab keeps only a deployment shim inservices/ai-agent/). The runner ships in-image, so what's left for the one-liner is the public@gabvdl/uiabove (a build off-homelab). - Guests' own cron jobs, on the local models. Gabriel's ask
(2026-11-01 cron evaluation form): a guest automates part of their work
with a scheduled job that costs nothing — a lean pi run on the EVOX2
(
lean:+allow:, CLAUDE.md → "Lean runs…"), under their guest scope, with no Claude fallback unless their own login is connected. Today the cron store and Settings → Cron are owner-only. (Since 2026-11-04 guests have scheduled jobs of their own; since 2026-11-28 every cron job is thecron-jobslive plugin's.)
Decisions in this service should move toward this target: prefer container-internal solutions over host scripts, generic config over homelab-hardcoded paths, and zipgo over bespoke hosting paths.