Autonomous, verifiable AI fund for tokenized stocks on Robinhood Chain.
A swarm of AI agents that researches, debates, sizes and executes — then proves every trade on-chain. Non-custodial. Proven, not trusted.
Website · Architecture · Verifiable Reasoning · Replay · Changelog
Auditable beats autonomous. An agent that cannot show its evidence trail is a demo, not infrastructure.
Robinhood Chain put tokenized US stocks (NVDA, AAPL, GOOG…) on-chain and made them tradable 24/7 — but there is no autonomous, accountable way to trade them. Bastion is that layer: a council of specialised AI agents that reasons over the on-chain oracle, votes on every position under a hard risk kernel, and anchors a cryptographic proof of why it traded on Robinhood Chain. Keys stay on your machine. The proof is the product.
Needs Node 20+. No API key required for the offline path.
# one-line install (macOS / Linux)
curl -fsSL https://bastiontrade.xyz/install.sh | sh
# or install directly
npm install -g github:adrydevel/bastion
# verify a decision that ships with the install — no key, no network
bastion replay --demo
# run a pass yourself and replay it
bastion run --ticker NVDA --offline --record
bastion replay <hash>--offline runs a deterministic heuristic over a synthetic price window
instead of calling a model, so the pipeline, risk kernel and proof path can be
exercised end-to-end with nothing configured. Drop it and point
BASTION_BASE_URL / BASTION_API_KEY at an endpoint to run the real council.
replaying 0xea6b94c78ae22c3a… NVDA · recorded 2026-07-19 01:34:39 · bastion 0.5.1
ok cassette integrity
ok regime
ok verdict
ok features hash
ok verdict hash
verified — this decision follows from its recorded inputs
Edit one number in the cassette and it fails, with a non-zero exit code — see docs/replay.md.
Reasoning runs on Nous Research Hermes by default (open-weights, OpenAI-compatible). Point BASTION_BASE_URL / BASTION_API_KEY at any compatible endpoint to swap it.
| Layer | What it does |
|---|---|
| Agent Swarm | Five agents — Analyst · Sentiment · Risk · Contrarian · Executor — opine independently, then a quorum vote decides. No single agent moves capital. |
| Risk Kernel | Fractional-Kelly sizing, CVaR tail cap, drawdown circuit-breaker. Deterministic and inspectable. |
| Regime + Bandit | Classifies trend / chop / high-vol and reallocates strategies via Thompson sampling. |
| Reflexive Memory | Recalls similar past states and post-mortems, feeds them back into the next decision. |
| Verifiable Reasoning | keccak256 of the full decision, anchored on Robinhood Chain — tamper-evident, TEE-signed in the hosted tier. |
| Deterministic Replay | bastion replay <hash> re-derives any recorded decision from its inputs and model transcript, and fails loudly if a single field was edited. |
| Robinhood Chain native | Reads NAV from the Chainlink oracle; executes tokenized stocks 24/7. |
oracle quote ─▶ regime detector ─▶ council debate ─▶ risk kernel ─▶ proof ─▶ execute
│ │ │ │
bandit 5 agents Kelly/CVaR keccak256
(strategy) quorum vote circuit-break + anchor
Full write-up in docs/architecture.md.
- Runtime — Node 20+, TypeScript (strict)
- Chain — viem, Robinhood Chain (Arbitrum Orbit L2), Chainlink oracle
- Reasoning — Nous Research Hermes via OpenAI-compatible client
- Proof — keccak256 attestation, on-chain anchoring
- Council + quorum voting
- Risk kernel (Kelly / CVaR / drawdown breaker)
- Regime detection + bandit allocation
- Reflexive memory
- On-chain proof anchoring
- Deterministic replay of recorded decisions
- TEE-signed attestation (hosted runtime)
- Backtest harness against historical oracle series
- Multi-book portfolio allocation
Contributions welcome — read CONTRIBUTING.md first.
If you find this useful, consider supporting the open-source work.
Building agent infrastructure or autonomous trading systems?
Bastion ships as open source — the hosted, TEE-signed runtime is in private beta.
Alpha. APIs may change before v1.0. Run bastion run to try the demo pass.