Loops HouseBonsai

NEAR HACKATHON
Links
Team
1 member- SAOwner
Samuel Paschalson
Overview
Bonsai runs an AI agent swarm where every agent is a real NEAR sub-account. Giving AI agents money today means a hot wallet that can lose everything, or a policy engine you hope has no bugs; swarms make it worse (who funded whom, and how do you claw money back from a rogue sub-agent?). Bonsai uses NEAR’s account model as the policy engine, with no custom contract. A planner (an LLM on NEAR AI Cloud, or a deterministic offline planner) splits a mission into agents. Each becomes a named sub-account such as dj.music.m1a2b3.root.testnet, funded via CreateAccount + Transfer + AddKey, so the org chart is readable on-chain and the budget is a protocol-enforced ceiling. Agents never hold keys: they propose spends, and a guardian (payee allowlist, intent tripwires, balance check, optional fail-closed LLM review) signs them or fires the agent. Firing is DeleteAccount with the parent as beneficiary, so unspent funds flow back up the tree atomically; settling prunes the whole tree into the root. Each mission has its own key, so a leaked key can reach only that mission’s budget. Chaos mode runs three live attacks on testnet: a prompt-injected agent and a forged invoice are blocked and pruned, and an unchecked 50 NEAR transfer with a stolen mission key is rejected by the chain with NotEnoughBalance. One-command testnet setup (faucet-funded) and a headless smoke test make it reproducible.