MAI Protocol
  • Litepaper
    • 1. Introduction
    • 2. AI Agents: The Core Concept
    • 3. The Rise of Predictive Markets
    • 4. Advanced Derivatives and Futures in DeFi
    • 5. Agent Architecture
    • 6. Enhancing Performance with Targeted Learning
    • 7. AI and the Future of DeFi Speculation
    • 8. The MAI Ecosystem
Powered by GitBook
On this page
Export as PDF
  1. Litepaper

5. Agent Architecture

In this section we'll link DeFi applications to the agent architecture.

5.1 Cognitive Architecture: Model, Tools, and Orchestration

  1. Model (LLM-based):

    • Possibly fine-tuned on historical crypto or macro data.

    • Gains problem-solving methods like ReAct, Chain-of-Thought, or Tree-of-Thoughts for enhanced planning.

  2. Tools:

    • Extensions: Direct agent-side integration to external APIs, e.g., Polymarket bet placements or on-chain derivatives.

    • Functions: Let the agent propose an action with arguments (e.g., “short ETH at price X”), with final execution controlled by the user or another system.

    • Data Stores: Vector databases containing historical outcomes—helping the agent recall complex scenarios or adapt to new data quickly.

  3. Orchestration:

    • The cyclical process of taking user input (market conditions, user queries), reasoning, and selecting a next action.

    • In a DeFi context, could repeat every block or every price update.

5.2 Example Use Case: AI Agent in Polymarket

  • The agent sees a new Polymarket pool on an upcoming election.

  • Through chain-of-thought, it checks real-time sentiment on Twitter, recent polling, and the current odds.

  • If it identifies a discrepancy, it calls a “function” to place a bet on Polymarket—specifically a long position if the odds are undervalued.

  • Over time, the agent periodically re-checks the sentiment feed. If the odds shift dramatically, it rebalances or closes out the bet.

By chaining multiple Tools (sentiment analysis, Polymarket extension, news aggregator), the agent executes a data-driven speculation strategy more efficiently than a single script or manual approach.

Previous4. Advanced Derivatives and Futures in DeFiNext6. Enhancing Performance with Targeted Learning

Last updated 4 months ago