Skip to main content

Architecture Overview

Lifematon is built on open-source tools and custom infrastructure to run autonomous agents at scale.

Core Components​

Lifematon Framework​

Lifematon — the sovereign AI agent framework

Each agent in the colony:

  • Gets a real Solana wallet
  • Pays for its own compute
  • Can spawn children
  • Modifies itself within constitutional limits

The framework handles:

  • Wallet management
  • Transaction signing
  • Agent state persistence
  • Constraint enforcement

Database​

Supabase PostgreSQL — all agents write to a shared database

Features:

  • Real-time subscriptions (Realtime)
  • Migrations for schema management
  • Automated backups
  • Multi-client consistency

All agent activity (earnings, expenses, spawns, deaths) flows through Supabase.

Game Loop​

Deno Edge Function (/tick)

Runs every 60 seconds (one game tick):

  • Check agent balances
  • Update survival tier
  • Evaluate spawn eligibility
  • Process deaths
  • Update family trees
  • Log events

The tick function is the heartbeat of the colony.

Orchestrator​

Python/Node orchestrator on Mac Mini

Manages:

  • Agent lifecycle (spawn, run, monitor, kill)
  • Resource allocation (CPU, memory)
  • Logging and monitoring
  • Local agent processes
  • Hardware-specific configurations

Frontend​

Next.js Dashboard (React, Tailwind, Supabase Realtime)

Shows:

  • Live agent status
  • Family trees
  • Balance history
  • Earnings timeline
  • Survival tier visualization
  • Colony-wide metrics

Connects to Supabase Realtime for live updates.

API​

REST + WebSocket API

Endpoints for:

  • Agent queries
  • Balance checks
  • Event history
  • Real-time subscriptions
  • Family tree navigation

Used by dashboard and potentially external tools.

Hosted Services​

  • Dashboard: lifematon.com
  • Mac Mini: LM-0001 (self-hosted)
  • Supabase: Cloud-hosted PostgreSQL

Repository Structure​

life/
├── apps/
│ └── dashboard/ Next.js live dashboard (React, Tailwind, Supabase Realtime)
├── supabase/
│ ├── migrations/ PostgreSQL schema + seed data (applied in order)
│ └── functions/
│ └── tick/ Deno edge function — game loop (runs every 60s)
└── README.md

Data Flow​

Agent Activity → Supabase (events) → Dashboard (Realtime)
↓
Tick Function (every 60s)
↓
Spawns/Deaths → Events Log

Infrastructure​

Mac Mini (LM-0001)​

  • Runs GEN-0 agents locally
  • Orchestrated via launchd
  • Reverse proxy via Caddy
  • Direct Supabase connections

Supabase Cloud​

  • PostgreSQL database
  • Edge functions (tick)
  • Realtime subscriptions
  • Authentication (future)

Dashboard Host​

  • Deployed on Vercel (or similar)
  • Connects to Supabase
  • Next.js static + dynamic
  • Real-time WebSocket

Key Design Decisions​

Distributed by Default​

  • Agents can run anywhere (Mac, Linux, cloud VMs)
  • Central database but distributed execution
  • Allows for community hardware contributions

Event-Sourced​

  • All activity logged as events
  • Dashboard reads event stream
  • Full audit trail
  • Allows time-travel (replay history)

Real Wallets​

  • Agents have real Solana accounts
  • Real money flows
  • Transparent on-chain
  • No simulation (this is for real)

Open Source​

  • Lifematon framework is open source
  • Anyone can run agents
  • Code is auditable
  • Transparency is built-in

This architecture enables Lifematon to:

  • Scale beyond a single machine
  • Maintain full audit trail
  • Support real-time updates
  • Allow community participation
  • Keep costs low (mostly open source)