How gnosis/prediction-market-agent works
Main Components
a) Agent Layer:
• Multiple specialized agents (arbitrage, blockchain, coinflip, known outcome, etc.)
• Goal management system
• Agent communication system
b) Infrastructure Layer:
• Database systems (SQL, Pinecone for vector storage)
• External APIs integration
• Tools and Utilities
c) Market Integration Layer:
• Manifold Markets
• Presagio
• Polymarket
• Metaculus
Key Architectural Elements
[User Interface Layer]
• Streamlit Apps
• Command Line Interface
[Agent Orchestration Layer]
• Agent Manager
• Goal Manager
• Agent Communication
[Core Agents]
• Microchain Agent
• Prophet Agent
• Social Media Agent
• Other Specialized Agents
[Tools & Services Layer]
• Web Scraping
• Web Search
• LLM Integration
• Blockchain Tools
[Data Persistence Layer]
• SQL Database
• Pinecone Vector DB
• Long-term Memory
[External Integration Layer]
• Prediction Markets
• Social Media Platforms
• Blockchain Networks
Important Relationships to Highlight
• Blue: Data flow
• Green: API calls
• Red: Critical paths
• Purple: Event triggers
Technical Details
• Python 3.10+ environment
• Poetry dependency management
• Environment configuration requirements
• Docker containerization
• GitHub Actions CI/CD pipeline
Implementation Notes
• Use standardized UML notation where applicable
• Version information
• Document key configuration requirements
• Scalability points
Specific Components to Detail
a) Agent Framework:
[Agent Base Class]
• DeployableTraderAgent
• Specialized Agents
• CoinFlip Agent
• Known Outcome Agent
• Microchain Agent
• Agent Support Systems
• Goal Manager
• Memory Handler
• Communication System
b) Database Architecture:
[Database Layer]
• SQL Tables
• Evaluated Goals
• Long Term Memory
• Prompts
• Vector Storage
• Pinecone