# ballast

- **Event:** [AIE Code Summit 2026 Hackathon](https://cerebralvalley.ai/e/aie-code-2026-hackathon)
- **When:** Sat, Nov 7 at 9:00 AM – 10:00 PM (PST)
- **Where:** San Francisco, CA
- **Team:** [Neeraj Shah](https://cerebralvalley.ai/u/NVS136), [Sudhersan KV](https://cerebralvalley.ai/u/sudhersankv)
- **GitHub:** https://github.com/sudhersankv/ballast
- **Demo video:** https://drive.google.com/file/d/1bgmH1p90rdJeRXsWSkaP505u3bCkjXYP/view?usp=sharing
- **Gallery:** https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery
- **Page:** https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/22

We built a self-improving agent harness for finance. The agent runs on the Pi coding-agent runtime (sandboxed, with read/bash/write tools) and improves by rewriting its own skill files. Every change has to pass a CI-style test gate before it merges.

The agent is Muse Spark, acting as a portfolio agent for each client of a wealth firm. In each run it reads the client's files and financial data feeds (bank, payroll, HR portal, messages), runs tools, and writes a trade recommendation with a reason for every trade. It has to notice life changes like a layoff, a new baby or a parent needing care.

Self-improvement: only the skill files change between versions. The model, tools and grading rules stay fixed. When a run fails, Muse reads the failure, finds the root cause, and rewrites the skills, adding a plain-English lesson (e.g. "After a layoff, I build six months of cash first").

Verify before merge: every skill change goes through the gate. It must:
- beat the current version on held-out clients (3 runs each)
- break no regression tests
- pass a backtest on real market data
- get approved by an independent reviewer (Gemini)
Otherwise it's rejected. If a shipped version starts failing, it rolls back.

What we found: the held-out pass rate went from 65% to 95%, and backtest cash shortfalls went from 3 to 0. A control run that rewrote skills from shuffled failures gained nothing, so the gains come from real learning. The gate also rejected a later version whose gain was too small, and blocked a change that hard-coded one client's number.

## More from AIE Code Summit 2026 Hackathon

- [Thought to Reality - Dylan Ler](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/19)
- [Apex Studio](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/20)
- [Puddles](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/21)
- [AgentGYM](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/23)
- [rebrowse](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/24)
- [Flo](https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/25)

---

Markdown version of https://cerebralvalley.ai/e/aie-code-2026-hackathon/hackathon/gallery/22. Site index for agents: https://cerebralvalley.ai/llms.txt · full text: https://cerebralvalley.ai/llms-full.txt
