Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
35. Always-on hosted agents: the 24/7 strategy loop with heartbeat, budgets and recovery
Read docs/prompts/README.md first.
The problem
Prompt 05 gives agents start and stop, and automations fire on triggers. A "running" agent should also run its strategy continuously: observe the market, reason on a cadence, act within limits, and keep going through deploys and crashes. Competitors sell exactly this, "agents that run 24/7", and it is what the strategy presets promise.
Build
- Loop: a
strategy-loopworker (Cloud Run, its owncloudbuild.yaml, README) that leases running agents fromagent_leases(heartbeat, lease expiry, worker id), executes one strategy tick per agent per interval (from the preset; default a few minutes), each tick a bounded run from prompt 05 with the preset's goal, the memory from prompt 21 and the tool tiers the user enabled. Ticks are idempotent and resume after a worker restart; a stuck lease is reclaimed. - Budgets: per-agent daily credit and USDC caps for the loop, separate from manual chat; the loop pauses the agent with a notification when a cap is hit and never fails silently.
- Observability:
three://agents/{id}/loopresource andGET /agents/:id/loopwith last tick, next tick, ticks today, spend, errors; the agent page shows a live status pill and the tick timeline; alerts on repeated errors through the notification channels. - Safety: every financial action inside a tick goes through previews and the guards; the anomaly freeze stops the loop;
stoptakes effect before the next tick. - Docs:
docs/agent-runtime.mdgains "The strategy loop"; changelog entry taggedfeature.
Acceptance
- Start a QA agent on the conservative preset; ticks appear on schedule with their steps and cost; kill the worker mid-tick and see the lease reclaimed and the tick resumed.
- Hitting the daily cap pauses the agent with a notification.
npm testgreen.