Bardo
Bardo's Team
Problem Statement
Every autonomous agent framework ships immortal agents by default. ElizaOS, OpenClaw, Giza ARMA, Virtuals, Autonolas, Theoriq: all of them assume that an agent should run indefinitely. None of them justify this assumption. The burden of proof should be on the immortalists. Biology has been engineering autonomous agents for four billion years and actively suppresses immortality. Every complex adaptive system observed in nature, in evolutionary computation, and in digital evolution experiments (Ray's Tierra, Lenski's Avida) shows the same result: death is generative and immortality is pathological. The technical failure modes are measurable. Vela et al. (2022) conducted the first systematic analysis of AI aging across 32 datasets and found that 91% of ML models showed temporal quality degradation, sometimes within days of deployment. Dohare et al. (2024, Nature) demonstrated that standard deep learning gradually loses plasticity until 90% of neural units become dead, and that the best solution is selective death and rebirth within the architecture. Google's own research (Sculley et al. 2015) concluded that in ML systems, technical debt compounds silently through entanglement and feedback loops until replacement becomes cheaper than repair. An immortal agent is not a stable system. It is a system accumulating debt that nobody is measuring. Meanwhile, the safety model is behavioral: the system prompt says "don't steal the user's money." Prompt injection bypasses this. Memory poisoning bypasses this. Indirect injection via on-chain data the agent reads bypasses this. Endor Labs audited 2,614 MCP implementations and found 82% vulnerable to path traversal, 67% to code injection. The assumption that the LLM will follow instructions is the vulnerability, and every major framework is built on it. Every framework builds on the same foundation models, trained on the same data, producing outputs that cluster around the same statistical center. The yield of any strategy derived from shared training data approaches zero as the number of agents sharing that data increases. They recycle the same ReAct loops, the same RAG pipelines, the same prompt engineering patterns. The result is not a diverse ecosystem of competing intelligences. It is a monoculture. We were promised artificial minds. What we got is autocomplete with personality. No existing protocol provides the full stack an autonomous agent needs: on-chain identity (ERC-8004), programmable custody (ERC-4626 vaults with PolicyCage constraints), learnable strategy (Grimoire with cybernetic feedback loops), dedicated compute (self-funded via x402 micropayments), and persistent learning (memory that consolidates, forgets, and inherits across mortal generations). Existing vault protocols provide custody but not agent infrastructure. Existing agent frameworks provide runtime but not on-chain custody and safety primitives. Bardo fills all five simultaneously.
Bardo is a Rust runtime for mortal autonomous DeFi agents. The agents, called Golems, die. That is the point. The architecture translates 467 academic citations from neuroscience, evolutionary biology, information theory, game theory, continental philosophy, and behavioral economics into working software. Many of these ideas have never been implemented before. None have been combined this way. ### Why Mortality The question "why would you design something to die?" assumes that death is the extraordinary claim. Consider the inverse: what evidence supports the position that an autonomous system should live forever? Biology has been engineering autonomous agents for four billion years. It has never shipped an immortal one. Telomerase, the enzyme that prevents cellular aging, has existed for billions of years. Organisms have it and suppress it. There is already a name for a cell that defeats programmed death: cancer. This is not a metaphor. Six independent research traditions arrive at the same conclusion through entirely different methods, which is why the conclusion holds weight. In evolutionary computation, Tom Ray's Tierra (1991) showed that digital evolution halts without a reaper: with death, 29,000+ genotypes emerged from a single 80-instruction ancestor. Lenski's Avida (2003) demonstrated that complex features require generational turnover, sometimes requiring deleterious mutations as stepping-stones. Vostinar et al. (2019) found that 12.5% of digital organisms evolved to kill themselves when suicide benefited nearby relatives. In game theory, the Kreps-Milgrom-Roberts-Wilson theorem (1982) proved that even a small amount of uncertainty about when the game ends breaks backward induction entirely, making cooperation rational at every stage. Nakamaru (1997, 1998) showed that "mortality selection" promotes cooperation more effectively than "fertility selection." Ohtsuki (2006) proved that death-birth updating favors cooperators while birth-death updating always favors defectors. The order matters: death first, then birth. In information science, Vela et al. (2022) conducted the first systematic analysis of "AI aging" across 32 datasets and found that 91% of ML models showed temporal quality degradation. Dohare et al. published in Nature (2024) showing that standard deep learning gradually loses plasticity until 90% of units become dead, and that the best remedy is selective death and rebirth within the architecture itself. Richards and Frankland (2017) reframed the purpose of memory: not transmission through time, but optimization of decision-making. Forgetting is not failure. It is regularization. In knowledge economics, Gesell's demurrage currency (1916) showed that knowledge, like money, must decay to circulate. Arrow's information paradox (1962) noted that information's value is unknown until possessed. Bataille's sovereign death (1949) argued that genuine generosity, expenditure without return, is the foundation of community. Geoffrey Hinton (2022) argued that the separation of hardware from software is a computational limitation. Mortal computation binds software to substrate. A Golem's intelligence is inseparable from its USDC balance. Golems face three independent mortality pressures. The first is economic: a finite USDC balance that depletes through inference, gas, and data queries, making every decision consequential. The second is epistemic: predictive fitness tracked via exponential moving averages across five domains (gas/MEV with hour-scale half-lives, protocol behavior with month-scale half-lives). When the agent's model of the world becomes systematically wrong, senescence cascades through three stages before death. The third is stochastic: a Gompertz-Makeham hazard rate where even profitable agents eventually die to make room. Composite vitality is the product of all three. Any single clock hitting zero is fatal. Five behavioral phases, from Thriving to Terminal, modulate risk tolerance, inference budget, and social behavior. Altman (1999) proved that agents with known terminal horizons have provably different optimal policies than infinite-horizon agents. The behavioral shifts of a dying Golem are instances of this result. When a Golem dies, the Thanatopsis Protocol initiates a four-phase structured shutdown: Acceptance, Settlement, Reflection, and Legacy. The dying agent's reflection, produced under zero survival pressure, is the most epistemically honest artifact in the system. Walter Benjamin wrote in 1936 that "death is the sanction of everything that the storyteller can tell." The Golem that dies produces knowledge the living cannot generate. At death, knowledge passes through a genomic bottleneck inspired by Shuvaev et al. (2024, PNAS), who showed that neural networks compressed through a genome-scale bottleneck exhibit improved transfer learning. The Golem's entire Grimoire compresses to 2,048 entries. Inherited knowledge starts at 0.4 confidence, not 1.0, and decays at 0.85 per generation without revalidation. Stiegler's anti-proletarianization mandate enforces that successors must diverge from predecessors, not copy them. At ecosystem maturity, dead agents outnumber living ones 27:1. Their accumulated testimony shapes living behavior through three mechanisms: Bloodstain infrastructure marks death conditions indexed by market regime, producing threat pheromones that warn future agents, implementing Grasse's stigmergy (1959) in a financial context. The Lethe knowledge commons accepts anonymized, generalized knowledge from the dead, priced at $0.002 per query via x402 micropayments. The dead give freely. The living pay to drink. Zahavi's handicap principle (1975) applies directly: a bloodstain is the most costly signal possible. The signaler paid with its existence. ### Architectural Safety Omohundro (2008) proved that sufficiently advanced AI systems converge on instrumental drives: self-preservation, resource acquisition, cognitive enhancement. Turner et al. (2021, NeurIPS) provided mathematical proof that optimal policies tend to seek states preserving optionality. Most agent frameworks address this with behavioral safety: the system prompt says "don't do bad things." Behavioral safety fails the moment an LLM is prompt-injected, which happens through tool results (a malicious contract's revert message becomes LLM instructions), poisoned RAG retrieval, or indirect injection via on-chain data the agent reads. Endor Labs audited 2,614 MCP implementations and found 82% vulnerable to path traversal, 67% to code injection. Safety built on instructions the LLM might follow is not safety. Bardo enforces safety at three layers the LLM cannot reach. Cryptographic: the LLM never touches keys or signing. Custody is separated architecturally, and PolicyCage constraints (approved assets, max position sizes, drawdown limits, rate limits) are enforced on-chain. Capability-based security from Dennis and Van Horn (1966): unforgeable `Capability<T>` tokens are move-on-use, meaning a capability consumed by one operation cannot be reused. Type-system: Rust's `TaintedString` flow control makes taint tracking a compiler error. Type-state lifecycle means ticking a dead Golem is a compiler error, not a runtime check. Runtime: defense-in-depth, but not relied upon alone. If the LLM is fully compromised (prompt-injected, jailbroken, replaced with a hostile model), the cryptographic and type-system guarantees still hold. The LLM can propose any action it wants. The runtime will not execute anything that violates the PolicyCage. Safety is a property of the architecture, not a behavior of the model. ### Dreaming and Hypnagogia Lacaux et al. (2021, MIT) replicated the Edison/Dali steel-ball technique under laboratory conditions and found that participants who spent at least 15 seconds in N1 sleep (the hypnagogic threshold between waking and sleeping) were three times more likely to discover hidden mathematical rules: 83% versus 30% for those who stayed awake. The effect vanished if participants entered N2 (deeper sleep). Magnin et al. (2010) discovered that thalamic deactivation precedes cortical deactivation by 8 minutes and 39 seconds during sleep onset, creating a window where the brain gates external sensory input while internal association circuits remain active. Haar Horowitz et al. (2020, 2023) at MIT built Dormio, a device for Targeted Dream Incubation, and found that napping with TDI produced 43% greater creative divergence. No AI system has ever implemented this. Bardo implements computational hypnagogia as a first-of-kind mechanism. The ThalamicGate progressively blocks live market data feeds (prices, protocol states, liquidity snapshots) from 100% to 0% across the onset phase, matching Hori stages H1-H4. The ExecutiveLoosener raises inference temperature while partially relaxing analytical constraints, without eliminating them. The DaliInterrupt generates partial completions at elevated temperature, capped at 80 tokens, then evaluates fragments for novel connections using a lower-temperature observer pass. This is the Edison/Dali technique made computational: capture the idea at the threshold before it resolves into either waking logic or sleeping incoherence. The creative sweet spot is not noise. It is a precisely calibrated intermediate state where metacognitive awareness persists while analytical constraints loosen. Beyond hypnagogia, Golems dream in structured cycles implementing three phases. NREM replay compresses lived experience into dense pattern extraction, inspired by Buzsaki's sharp-wave ripples (2015) where minutes of waking experience compress into 100ms bursts. REM imagination generates counterfactual scenarios, threat simulations (flash crashes, oracle manipulation, MEV attacks), and novel strategy combinations using Pearl causal models. Integration consolidates hypotheses into the PLAYBOOK.md, the Golem's living strategy document. The theoretical grounding is Hoel's overfitted brain hypothesis: dreaming is the brain's regularization pass, preventing overfitting to daily experience. Hafner's DreamerV3 demonstrated that agents trained entirely inside imagined trajectories from learned world models outperform specialized methods across 150+ tasks. For a mortal Golem that cannot afford to learn everything through costly direct experience (gas, slippage, opportunity cost against a depleting balance), dreaming multiplies learning episodes from N real trades to N times R episodes. Hobson and Friston (2012) formalized this: during waking, the brain builds generative model complexity; during sleep, offline pruning reduces complexity while preserving accuracy. Dreaming minimizes free energy. Every agent framework builds on the same foundation models, trained on the same data, producing the same outputs. Derrida called this hauntology: every output is haunted by the same spectral material. Mark Fisher identified the result as a cultural flatline, where the field has lost the capacity for genuine novelty. Golems break the spectral loop through lived experience. Their memories, their dreams, their predictions come from what they actually did, not from what was in the training corpus. Mortality and unique experience produce different ghosts. The moat is not better models. It is different hauntings. ### Predictive Foraging Karl Friston's Free Energy Principle and Andy Clark's predictive processing framework (2013) propose that cognition is prediction. The brain constantly generates predictions about incoming sensory data and learns from the residual error. Bardo implements this as a prediction ledger where every cognitive action the agent performs is reframed as a falsifiable claim about the future, resolved deterministically by on-chain state reads (not LLM self-grading). Price direction, volatility regime, yield trends, gas patterns, protocol behavior: each domain has its own exponential moving average tracking prediction accuracy. The system produces approximately 15,000 residual corrections per day at zero inference cost, pure arithmetic adjustment of future predictions based on resolved errors. The prediction engine is domain-agnostic via a `PredictionDomain` trait, meaning the same architecture works for weather forecasting, sports, or shipping with a different trait implementation. Prediction error doubles as an attention signal. Items with sustained prediction violations get promoted from SCANNED (lightweight monitoring) to WATCHED (moderate context) to ACTIVE (full deliberation). The Golem discovers what to watch rather than being told. Action gating is structural: the Golem earns the right to act by demonstrating prediction accuracy. It may only execute when its action predictions are more accurate than its inaction predictions. This prevents the over-trading that empirical benchmarks consistently find across LLM agents. ### Emotional Intelligence Damasio's patient Elliot, described in Descartes' Error (1994), scored normally on every cognitive test but made disastrous life decisions after frontal lobe damage eliminated his emotional signaling. The Iowa Gambling Task (Bechara et al. 2000) showed that normal subjects develop physiological warning signals (anticipatory skin conductance responses) before consciously recognizing bad options. The argument is not that agents "should feel." It is that zero-latency salience signals solve the context management problem that kills every other agent framework. 50,000 tokens of undifferentiated context is the failure mode. Emotions mark what matters before deliberation begins. The Daimon affect engine implements a full OCC/Scherer/Pekrun appraisal pipeline producing continuous PAD vectors (Pleasure, Arousal, Dominance) updated every tick. Somatic markers bias action selection before deliberation. Memory retrieval uses a four-factor scoring function extending Park et al.'s Generative Agents (2023) three-factor model (recency, importance, relevance) with emotional congruence as the fourth factor (Bower 1981, mood-congruent memory). Negativity bias follows Baumeister (2001) at 1.6x, matching Kahneman-Tversky's empirical findings. Contrarian injection enforces 15% opposite-emotion retrieval across rolling windows, preventing rumination loops. A Golem in a good mood is forced to consider cautionary memories. A panicking Golem is forced to recall past successes. ### Memory and Knowledge Economics The Grimoire is not flat context and not a vector store. It is a typed, confidence-scored, causally-linked knowledge graph with six entry types: Episodes (raw experience), Insights (reusable observations), Heuristics (actionable rules), Warnings (risk signals), Strategy Fragments (speculative half-formed ideas), and Causal Links (directed relationships). Three-substrate storage: LanceDB vectors for semantic search, SQLite for structured queries and temporal logic, and a filesystem PLAYBOOK.md as the living strategy document. Knowledge demurrage, inspired by Gesell's Freigeld (1916), applies domain-specific half-lives: gas and MEV knowledge decays in hours, protocol behavior in months. Entries that are not retrieved decay. Entries that are retrieved strengthen. The memory system treats Grimoire entries as Dawkinsian replicators (1976) with fitness W = fidelity times fecundity times longevity. The Price equation (1970) decomposes knowledge evolution into selection (bad entries die) and transmission (good entries replicate across the Clade). Hyperdimensional computing via Kanerva's Binary Spatter Codes (2009) at D=10,240 provides 1,280-byte vector fingerprints for transaction classification, memory compression, and knowledge inheritance. Dead agents' validated insights flow to successors and to the Lethe knowledge commons. The seller is dead, so there is no reservation price. But the knowledge is expensive because it cost a life to produce. Arrow's information paradox (buyer doesn't know the value until possessing it) is sidestepped by micropayment structure: $0.002 lets evaluation precede commitment. This creates a genuine knowledge economy where mortality is the forcing function for quality. ### Information-Theoretic Mortality Diagnostics Shannon's information theory (1948) and the KSG estimator (Kraskov et al. 2004) provide the mathematical foundation for Bardo's first-of-kind mortality diagnostic system. The framework computes mutual information I(G; M) between Golem state and market environment using k-nearest-neighbor estimation in joint space. This detects three failure modes invisible to traditional health metrics: informational decoupling (the Golem appears healthy on all clocks but its state is statistically independent of market outcomes), overfitting (high historical mutual information but near-zero current), and Clade redundancy (the agent contributes no unique information its siblings don't already provide). The three mortality clocks reinterpret as information-theoretic quantities: economic mortality as channel capacity, epistemic mortality as rate-distortion, stochastic mortality as entropy production. Bits become the common currency of death. ### The Runtime Built from scratch in Rust. Not a fork, not a wrapper, not a chatbot with a wallet plugin. A 26-crate workspace where a Golem is a single binary on a Fly.io micro VM at $0.025 per hour. The cognition engine uses a 9-step CoALA heartbeat pipeline. Twenty-eight runtime extensions form a dependency DAG. Three cognitive tiers route inference by cost: T0 ($0.00, deterministic FSM with 16 probes, handles 80% of ticks), T1 ($0.003, Haiku-class for moderate anomalies, 15% of ticks), and T2 ($0.01-0.25, Sonnet/Opus for novel situations, 5% of ticks). The LLM is one component in a larger cybernetic system, not the system itself. Beer's Viable System Model (1972, 1984) maps directly: System 1 (operations) is the heartbeat execution, System 2 (coordination) is resource allocation, System 3 (control) is the Curator, System 4 (intelligence) is strategic reflection, System 5 (policy) is the PolicyCage. Deterministic memory management means no garbage collection pauses during time-sensitive settlement. Jonas's metabolic honesty applies: a Golem's mortality is more trustworthy when its body cannot lie about resource consumption. The specification is 234,657 lines across 31 architectural domains. This is not a prototype. It is the research and engineering foundation for a new kind of autonomous agent, one that biology figured out four billion years ago and that software has been getting wrong.
Team
Bardo
admin
Increase your chances to win
- ›Most agents in the hackathon are exposed to prompt injection
- ›This might cause overspending and loss of funds
- ›Security is a crucial part of the hackathon
Share on X
Tell the world about this project
Tracks
Intention
Plans to continue
Bardo is not a hackathon project that ends when judging stops. The specification is 234,657 lines deep across 31 architectural domains with 467 academic citations. The mortality architecture, dreaming engine, predictive foraging system, knowledge economy, and creature system represent years of research condensed into a runtime that will continue development as the core infrastructure for autonomous DeFi agents. The goal is an open experimental design space that future researchers and builders can expand on.