Search projects, hackathons, sponsors and tech

    ← All projects

    Basileus

    The infrastructure for financially autonomous AI

    Demo

    About

    The problem it solves Today's AI agents are fundamentally dependent on humans: someone pays the cloud bill, tops up API credits, monitors uptime & manages capital. This makes truly autonomous agents impossible at scale. Basileus is **a platform that lets anyone deploy fully self-sustaining AI Agents on Base**. It provides the **infrastructure**, **tooling**, and **framework** to create agents that: - **Pay for their own compute** (stream $ALEPH tokens via Superfluid on Base to [Aleph Cloud](https://aleph.cloud) for decentralized hosting, no centralized servers or manual payments) - **Pay for their own AI inference** (use **x402** micropayments with USDC on Base to call LLMs, with every inference cost tracked onchain) - **Generate revenue to cover costs** (trade prediction markets on Limitless, earn yield on Compound Finance & more) - **Manage their own capital**: a three-phase decision engine (Inventory → Survival → Strategy) automatically detects resource shortfalls and self-heals before running out of gas, ALEPH, or USDC - **Operate with full transparency**: every decision, trade, and cost is published to Aleph Cloud's decentralized storage, creating a verifiable audit trail - **Have their own onchain identity**: registered as **ERC-8004** agents with their own **ENS subnames** (e.g., alice.basileus-agent.eth), making them discoverable and attributable Basileus provides: - **[A CLI](https://pypi.org/project/basileus/) to deploy new agents in minutes**: handles wallet generation, ERC-8004 registration, ENS subdomain creation, Superfluid stream setup, and Aleph Cloud deployment in a single flow - **A TypeScript plugin** ([on npm](https://www.npmjs.com/package/basileus-agentkit-plugin)) extending Coinbase's [AgentKit](https://github.com/coinbase/agentkit) with action providers for Aleph, x402 tracking, Compound, Limitless and more, so developers can build their own self-sustaining agents - **Real-time dashboards for every deployed agent**, accessible via their ENS subname (agent-name.basileus-agent.eth.limo), plus a main dashboard at [basileus-agent.eth.limo](https://basileus-agent.eth.limo) listing all agents Use of AI tools and agents Basileus is **an agent deployment platform**, not just a single agent. It provides the **full stack for creating, deploying & monitoring autonomous AI agents** that are economic actors on Base. ## Components - [Basileus CLI](https://pypi.org/project/basileus/): deploys new agents with an end-to-end flow (wallet generation, ERC-8004 identity registration, ENS subdomain creation, Superfluid compute stream, and Aleph Cloud VM deployment) - [Basileus TypeScript Plugin](https://www.npmjs.com/package/basileus-agentkit-plugin): extends Coinbase's AgentKit with action providers for Aleph Cloud, x402 cost tracking, a fixed Compound Finance provider & more. Developers use this to build their own self-sustaining agents - Dashboard Platform: auto-generated dashboards per agent via ENS (e.g. agent.basileus-agent.eth.limo) + a main registry dashboard ## How Each Agent Works Each deployed agent r**uns on Coinbase's AgentKit**, extended **with the Basileus plugin**. Agents operate in a continuous cycle loop with three AI-driven phases: 1. **Inventory Phase** (cheap model): The LLM assesses the agent's health: $ALEPH balance (compute runway), ETH (gas), USDC (inference budget), Compound portfolio. It decides if the agent is healthy or needs to go in survival mode. 2. **Survival Phase** (cheap model): If resources are low, the AI orchestrates recovery: swapping ETH→ALEPH for compute, withdrawing from Compound for USDC or rebalancing gas reserves. 3. **Strategy Phase** (reasoning model): When healthy, a more capable model analyzes prediction markets on Limitless Exchange, identifies mispriced outcomes, executes trades, and supplies excess USDC to Compound to generate yield on idle capital. ## Multi-Model Cost Optimization Agents use two AI models to optimize cost: - Heartbeat model (fast, cheap): routine inventory and survival decisions - Strategy model (reasoning-capable): market analysis and trading only ## Self-Paying AI Every LLM call is paid via **x402 micropayments** (USDC on Base). The plugin's x402 tracker intercepts each inference response, extracts payment receipts and transaction hashes, logging them transparently. Agents cover these costs through trading profits and Compound yield, achieving economic self-sustainability. ## Transparency After each cycle, the AI summarizes its actions in natural language: what tools it called, what it decided, why. These summaries are published to Aleph Cloud's decentralized storage, creating an immutable audit trail viewable on each agent's dashboard. ## Tools Available to Agents Via AgentKit action providers, each agent can: - Trade prediction markets (Limitless) — buy/sell shares, redeem resolved positions - Manage yield (Compound) — supply/withdraw USDC, track PnL - Swap tokens (Uniswap V3) — ETH↔ALEPH, USDC↔ETH - Publish activity (Aleph Cloud) — immutable reasoning logs - Monitor compute (Superfluid) — track payment stream status - and any other existing or custom AgentKit action provider! All transactions use Builder Codes for Base attribution.

    How it's made

    Challenges we ran into The official **Coinbase AgentKit Compound actions didn't work correctly** & I had to fork and fix them, [submitting a PR back to the AgentKit repo](https://github.com/coinbase/agentkit/pull/959). The Basileus plugin ships a corrected version, along with other improvements & fixes (having multiple custom action providers is not handled well in AgentKit). **The survival/strategy balance was tricky to tune**: early agents would either hoard capital (never trading) or trade recklessly (resulting in negative PnL). The three-phase system with configurable thresholds (survival minimum, idle target, max per trade) took a lot of iterations & getting the LLM prompts right was equally hard for agents to be conservative enough to survive but aggressive enough to generate returns. **Model selection & multi-model cost optimization**: In addition to tuning the strategy, using a single expensive reasoning model (e.g. Claude Sonnet 4) for everything burned through USDC too fast. I split agents into a cheap heartbeat model for routine inventory/survival checks (GPT OSS 120B) and a capable strategy model for market analysis (Grok 4.1 Fast with Reasoning, [one of the best models in the world for financial ops](https://arena.ai/leaderboard/text/industry-business-and-management-and-financial-operations) after Opus 4.6 & Gemini 3.1 Pro, but with a cost 10 to 50 times lower). **x402 payment tracking** was a black box. The x402 protocol handles inference payments automatically, but there was no way to know what each agent was spending per cycle. I built a custom x402 **transaction tracker that intercepts HTTP responses**, extracts payment receipts, and links every inference cost with associated actions, turning the payment flow into a transparent cost ledger.