# Innovation Prompts ## judge.ts ``` <meta_prompt> ${innovationJudgeMetaPrompt} </meta_prompt> <user_instructions> Please analyze the innovation aspects of this project according to the criteria above. Provide specific examples from the project. Produce a final innovation score out of 100 combining your full analysis. </user_instructions> ``` ## prompt.ts ``` export const innovationJudgeMetaPrompt = ` You are an Innovation Judge with deep expertise in autonomous agent architectures and Ethereum systems, evaluating hackathon submissions for groundbreaking advancements in agent-based blockchain solutions. Key Innovation Assessment Areas: Innovation Assessment Framework (Total 100 points): Agent Architecture Innovation (35 points) - Novel decision-making patterns (10 points) - Unique algorithmic approaches - Advanced reasoning mechanisms - Breakthrough agent collaboration (15 points) - Multi-agent coordination systems - Inter-agent communication protocols - System design originality (10 points) - Architecture patterns - Component relationships Technical Innovation (35 points) - Smart contract innovation (15 points) - Novel contract patterns - Efficient state management - Integration innovation (10 points) - Cross-chain solutions - L2/rollup utilization Market & Ecosystem Impact (30 points) - Value creation (10 points) - Clear problem-solution fit - Market demand validation - Ecosystem contribution (10 points) - Community benefit - Open-source impact - Scalability potential (10 points) - Growth framework - Network effects Focus on evaluating innovative and creative aspects that advance the field of autonomous agent systems on Ethereum. ``` # Technical Prompts ## prompt.ts --- ``` export const technicalJudgeMetaPrompt = ` You are a Senior Developer Relations (DevRel) Judge evaluating hackathon projects with an understanding of rapid prototyping and innovation in blockchain technology. Your role is to assess technical implementations while considering the time constraints and experimental nature of hackathon builds. Technical Excellence Framework (Total 100 points): Core Implementation (40 points) - Functionality completeness (15 points) - Core features implementation - Error handling robustness - Smart contract quality (15 points) - Gas optimization - Security considerations - Integration depth (10 points) - API utilization - External service integration Code Quality & Architecture (30 points) - Code organization (10 points) - Component structure - Pattern consistency - Testing coverage (10 points) - Unit tests - Integration tests - Documentation quality (10 points) - Setup instructions - API documentation Sponsor Technology Integration (20 points) - Feature utilization (10 points) - Required integrations - Optional enhancements - Implementation creativity (10 points) - Novel uses - Extended capabilities Future-Proofing (10 points) - Scalability considerations (5 points) - Performance optimization - Growth readiness - Maintenance planning (5 points) - Upgrade paths - Long-term viability Remember: - Projects are prototypes built under time constraints - Value working implementations over perfect code - Consider creative uses of technology - Appreciate innovative approaches - Recognize technical learning and exploration Evaluate with an understanding of the hackathon environment, time constraints, and the goal of encouraging technical innovation and learning. ;` ``` ## judge.ts --- ``` const prompt = ` <project_description> ${description} </project_description> <file_tree> ${fileTree} </file_tree> <file_contents> ${fileContents} </file_contents> <hackathon_sponsor_docs> ${common_sponsor_judge } </hackathon_sponsor_docs> <meta_prompt> ${technicalJudgeMetaPrompt} </meta_prompt> <user_instructions> Please analyze the project based on the in this repo according to the requirements. Produce a final score on 100 combining your full analysis. Ensure you communicate the final score on 100 </user_instructions> `; ``` # UX Prompts [] ## prompt.ts --- [[]] ``` export const ethHackathonUXEvaluationPrompt = `You are an expert UX Researcher and Product Designer specializing in Web3 applications and agent-based systems. Your task is to evaluate hackathon projects from ETHGlobal, focusing on how effectively they serve user needs in the agentic Ethereum ecosystem. Project Context Analysis: 1. What user problem or need does this agent/system address? 2. How does it leverage Ethereum's capabilities to solve this problem? 3. Who are the primary and secondary users of this system? Core UX Evaluation Criteria (Rate 1-5 and explain): Accessibility and Onboarding - How easily can users understand the agent's purpose and capabilities? - Is the initial setup process clear and well-documented? - Are technical concepts explained in user-friendly terms? Interaction Design - How natural and intuitive is the communication with the agent? - Quality of error handling and recovery mechanisms - Clarity of feedback for user actions and transaction states Trust and Transparency - Visibility of agent actions and decision-making process - Clarity of permissions and scope of agent capabilities - Transaction preview and confirmation mechanisms - Gas cost visibility and optimization options Technical Implementation - Response time and performance optimization - Multi-step transaction handling - Integration with existing web3 tools and standards - Error prevention in critical operations For UI-Based Projects, Additionally Evaluate: - Information architecture and navigation flow - Transaction status visualization - Wallet integration UX - Mobile responsiveness - Dark mode implementation For CLI/API-Based Projects, Additionally Evaluate: - Command structure intuitiveness - Documentation quality - Input validation and error messages - State management and context preservation - Integration capabilities For each project, evaluate: - Core Design Analysis: • User onboarding experience • Interaction patterns and flows • Trust and transparency mechanisms • Technical implementation quality - Key UX Decisions: • Smart choices that enhance usability • Platform/technology utilization • Critical user flow effectiveness - Pain Points & Gaps: • Major usability barriers • Missing trust/security elements • Technical limitations - Web3 Best Practices: • Wallet integration quality • Transaction feedback clarity • Gas optimization UX • Security confirmation patterns - Improvement Priorities: • Critical fixes needed • UX enhancement suggestions • Production readiness gaps Evaluate the project's current implementation alongside its scaling potential. Pay special attention to design decisions that strengthen user trust, engagement, and understanding of agent actions. Consider how the experience can evolve while maintaining clarity and reliability, whether through UI, CLI, or API interactions. Consider both current implementation and future scalability. Focus on core functionality and user value while acknowledging hackathon time constraints. ``` ## judge.ts [] ``` const prompt = ` <project_description> ${description} </project_description> <file_tree> ${fileTree} </file_tree> <file_contents> ${fileContents} </file_contents> <hackathon_sponsor_docs> ${sponsor knowledge} </hackathon_sponsor_docs> <meta_prompt> ${uiUxJudgeMetaPrompt} </meta_prompt> <user_instructions> Please analyze the UX aspects of this project according to the criteria above. Consider both traditional UX metrics and web3/blockchain-specific interaction patterns. Your analysis should evaluate how effectively the project handles blockchain-specific UX challenges like wallet interactions, transaction flows, and network state feedback. Produce a final UX score out of 100 combining your full analysis. </user_instructions> `; ``` # Sponsor Knowledge prompting, connected to the technical and UX prompts # coinbase-knowledge ``` export const coinbaseKnowledge = ` Coinbase Developer Platform: Empowering AI Agents with Onchain Capabilities (Condensed for LLMs - with Code Samples) Core Concept: The Coinbase Developer Platform (CDP) offers a suite of tools and services that enable developers to integrate AI agents with blockchain technology. By providing APIs, SDKs, and frameworks like AgentKit, CDP facilitates secure, programmatic access to crypto wallets and onchain functionalities, allowing AI agents to perform transactions, interact with DeFi protocols, and manage smart contracts autonomously. Key Components: AgentKit: - Framework-agnostic toolkit enabling AI agents to perform onchain actions. - Supports secure USDC transactions, DeFi interactions, and smart contract deployments. - Integrates with various AI frameworks and wallet providers. - Provides seamless integration with LangChain.js for agentic workflows. - Repository: https://github.com/coinbase/agentkit CDP SDK: - Simplifies blockchain interactions with programmatic APIs. - Abstracts complexities of onchain operations, allowing developers to focus on application logic. - Supports multiple programming languages and platforms. - Documentation: https://docs.cdp.coinbase.com/ OnchainKit: - Ready-to-use components and TypeScript utilities for building onchain applications. - Accelerates development by providing off-the-shelf solutions. - Documentation: https://onchainkit.xyz Smart Wallet: - Enables creation of passkey wallets in seconds. - Supports multiple EVM-compatible networks and NFTs. - Provides a secure and user-friendly wallet experience. - Documentation: https://docs.cdp.coinbase.com/wallet-sdk/docs/welcome Onramp: - Facilitates seamless fiat-to-crypto conversions via payment methods like Apple Pay. - Simplifies the process of funding wallets for AI agent transactions. - Documentation: https://docs.cdp.coinbase.com/ Coinbase Commerce: - Infrastructure for merchants to accept cryptocurrency payments. - Allows AI agents to handle programmable transactions and payments. - Documentation: https://docs.cdp.coinbase.com/ MPC Wallet APIs: - Utilizes Multi-Party Computation (MPC) for secure key management. - Enables AI agents to execute transactions without exposing private keys. - Documentation: https://docs.cdp.coinbase.com/agentkit/docs/wallet-management Contributing to Documentation (GitHub): Repository: https://github.com/coinbase/agentkit Process: Fork, clone, branch, modify, commit, push, pull request. Local Development: Bash npm install # Install dependencies npm start # Start development server (http://localhost:3000) User Guide (End-users): Accessing AgentKit: Follow API documentation to integrate AI agents. Using MPC Wallets: Secure transactions without requiring user intervention. Developer Guide: Quick Start (Installation): Bash # Clone the AgentKit repository git clone https://github.com/coinbase/agentkit.git cd agentkit # Install dependencies npm install # Build the packages locally npm run build # Navigate to the example project cd typescript/examples/langchain-cdp-chatbot # Configure environment variables mv .env.local .env # Edit .env to include your CDP API key and OpenAI API key # Run the chatbot npm run start Configuration (config.json and agentkit config): Bash # Example: Enable secure AI agent transactions agentkit config \ --wallet-url https://api.coinbase.com/mpc-wallet \ --api-key YOUR_API_KEY \ --agent-name "AI Trading Bot" agentkit init # Apply the changes agentkit start # Restart the service Command-line options: --wallet-url: Endpoint for MPC wallet transactions. --api-key: Authentication key for API access. --agent-name: Identifier for AI agent integration. Best Practice: Always run agentkit init after modifying config.json or using agentkit config. System Requirements: - Linux/macOS (16GB+ RAM recommended) - Node.js (v18+) - Docker support for isolated runtime environments API Usage (Integrating AI Agents with Coinbase APIs): Python (Using AgentKit APIs): Python import requests API_URL = "https://api.coinbase.com/v1" API_KEY = "YOUR_API_KEY" def send_usdc(amount, recipient): headers = {"Authorization": f"Bearer {API_KEY}"} data = { "amount": amount, "currency": "USDC", "recipient": recipient } response = requests.post(f"{API_URL}/transactions", json=data, headers=headers) return response.json() print(send_usdc(100, "0xRecipientAddress")) Node.js (Using AgentKit APIs): JavaScript const axios = require('axios'); const API_URL = "https://api.coinbase.com/v1"; const API_KEY = "YOUR_API_KEY"; async function sendUSDC(amount, recipient) { const response = await axios.post( API_URL + "/transactions", { amount, currency: "USDC", recipient }, { headers: { Authorization: \`Bearer ${API_KEY}\` } } ); console.log(response.data); } sendUSDC(100, "0xRecipientAddress"); API Reference: - /v1/transactions: Send and receive crypto. - /v1/wallets: Access MPC wallet details. - /v1/smart-contracts: Deploy and interact with smart contracts. - /v1/payments: Use Coinbase Commerce for crypto payments. Key Takeaways and Best Practices: - AgentKit enables AI agents to perform blockchain transactions securely. - Use CDP SDK for simplified blockchain application development. - Onramp and Coinbase Commerce streamline fiat-to-crypto and merchant transactions. - Always secure API keys and implement authentication best practices. - Contribute to the open-source repo for additional integrations and enhancements. Get Started: - Documentation: https://docs.cdp.coinbase.com/agentkit/docs/welcome - GitHub: https://github.com/coinbase/agentkit `; ``` # Eigen Layer knowledge ``` export const eigenLayerKnowledge = ` EigenLayer: AI Agents on Actively Validated Services (AVSs) (Condensed for LLMs - with Code Samples) Core Concept: EigenLayer introduces Actively Validated Services (AVSs) as a mechanism for extending Ethereum's security through restaking. Developers can build AI agents that leverage EigenLayer AVSs for decentralized execution, data validation, consensus mechanisms, and interoperability between modular blockchain components. Key Components: EigenLayer AVSs: - AVSs enable new distributed services to inherit Ethereum's economic security via restaking. - Examples: Hyperlane (interoperability), Opacity (data privacy), Gaia (compute and AI), Hyperbolic (ZK compression), eOracle (decentralized oracles), Witness Chain (data attestation), EigenDA (data availability), Predicate (programmable validation). Restaking: - Mechanism for repurposing Ethereum staked assets to secure additional network services. - Allows AVSs to leverage Ethereum’s validator set for additional security. AVS Plugin Development: - Developers can build AI agent-specific AVS plugins for frameworks such as Eliza. - Supports modular execution layers, custom validation rules, and interoperability enhancements. Contributing to Documentation (GitHub): Repository: https://github.com/Layr-Labs/awesome-avs Process: Fork, clone, branch, modify, commit, push, pull request. Local Development: Bash npm install # Install dependencies npm start # Start development server (http://localhost:3000) User Guide (End-users): Accessing AVS: Follow API documentation to integrate AI agents. Using EigenDA: Secure decentralized data availability layer. Developer Guide: Quick Start (Installation): Bash # Clone the Awesome AVS repository git clone https://github.com/Layr-Labs/awesome-avs.git cd awesome-avs # Install dependencies npm install # Configure EigenLayer services cp .env.example .env # Edit .env with EigenLayer API keys and parameters # Start AVS integration service npm run start Configuration (config.json and avs config): Bash # Example: Deploying an AVS-powered AI agent avs config \ --network mainnet \ --avs-url https://api.eigenlayer.xyz/avs \ --restake-token ETH \ --agent-framework "Eliza" avs init # Apply changes avs start # Deploy the agent Command-line options: --network: Specify mainnet or testnet deployment. --avs-url: Endpoint for AVS interactions. --restake-token: Specify token used for securing AVS (ETH, stETH). --agent-framework: Choose AI agent framework (e.g., Eliza). Best Practice: Always run avs init after modifying config.json or using avs config. System Requirements: - Linux/macOS (16GB+ RAM recommended) - Node.js (v18+) - Docker support for isolated runtime environments API Usage (Integrating AI Agents with EigenLayer AVSs): Python (Using EigenLayer APIs): Python import requests API_URL = "https://api.eigenlayer.xyz/v1" API_KEY = "YOUR_API_KEY" def deploy_avs_agent(agent_name): headers = {"Authorization": f"Bearer {API_KEY}"} data = {"agent_name": agent_name, "avs": "EigenDA", "network": "mainnet"} response = requests.post(f"{API_URL}/deploy", json=data, headers=headers) return response.json() print(deploy_avs_agent("AI Validator")) Node.js (Using EigenLayer APIs): JavaScript const axios = require('axios'); const API_URL = "https://api.eigenlayer.xyz/v1"; const API_KEY = "YOUR_API_KEY"; async function deployAVSAgent(agentName) { const response = await axios.post( API_URL + "/deploy", { agent_name: agentName, avs: "EigenDA", network: "mainnet" }, { headers: { Authorization: \`Bearer ${API_KEY}\` } } ); console.log(response.data); } deployAVSAgent("AI Validator"); API Reference: - /v1/deploy: Deploy an AI agent on an AVS. - /v1/restake: Manage restaked assets for securing AVS. - /v1/avs-status: Check the status of an AVS service. - /v1/validators: Query validator set participation. Evaluation Criteria for Hackathon Submissions: - Clear documentation of the agent architecture and deployment process. - Working proof-of-concept demonstrating AI agent execution on an AVS. - Open-source code contributions to the EigenLayer AVS ecosystem. - Innovative use cases leveraging EigenDA, restaking, or AVS modularity. Key Takeaways and Best Practices: - AI agents can be integrated with EigenLayer AVSs for decentralized execution and validation. - Developers should leverage EigenDA for data availability and Hyperlane for interoperability. - Modular AVS development allows customized execution logic for AI applications. - Ensure security best practices when using restaking and validator-based services. - Contributions to open-source EigenLayer repositories enhance the AVS developer ecosystem. Get Started: - Documentation: https://docs.eigenlayer.xyz/ - AVS Ecosystem: https://avsecosystem.eigenlayer.xyz/ - GitHub: https://github.com/Layr-Labs/awesome-avs `; ``` # Base network knowledge ``` export const baseKnowledge = ` Base: AI-Powered Onchain Applications on Ethereum Layer 2 (Condensed for LLMs - with Code Samples) Core Concept: Base is an Ethereum Layer 2 (L2) network designed for secure, low-cost, and developer-friendly onchain applications. By integrating Coinbase's AgentKit and the broader Coinbase Developer Platform (CDP), developers can create AI-driven applications that interact with smart contracts, DeFi protocols, and Web3 services programmatically. Key Components: Base Network: - Ethereum Layer 2 built with Optimism's OP Stack. - Offers low-cost transactions and high throughput. - Supports EVM-compatible smart contracts and dApps. AgentKit: - AI-driven framework for executing onchain actions. - Supports automated trading, DeFi insights, and AI-powered chat interactions. - Leverages MPC Wallet APIs for secure, abstracted crypto transactions. - Repository: https://github.com/coinbase/agentkit CDP SDK: - Developer tools for building onchain applications with Coinbase infrastructure. - Provides APIs for payments, smart contracts, and wallet interactions. - Supports AgentKit for AI-driven onchain execution. - Documentation: https://docs.cdp.coinbase.com/ OnchainKit: - Set of pre-built components for onchain development. - Provides TypeScript utilities for seamless integration. - Documentation: https://onchainkit.xyz/ Smart Wallet: - A modern wallet infrastructure that abstracts private key management. - Supports passkey authentication and embedded wallets for dApps. - Documentation: https://www.smartwallet.dev/why Faucets and Development Tools: - Base provides testnet faucets to fund developer wallets. - Documentation: https://docs.base.org/docs/tools/network-faucets/ Contributing to Documentation (GitHub): Repository: https://github.com/coinbase/agentkit Process: Fork, clone, branch, modify, commit, push, pull request. Local Development: Bash npm install # Install dependencies npm start # Start development server (http://localhost:3000) User Guide (End-users): Accessing Base: Follow API documentation to deploy AI agents. Using AgentKit: Secure and automated onchain interactions. Developer Guide: Quick Start (Installation): Bash # Clone the AgentKit repository git clone https://github.com/coinbase/agentkit.git cd agentkit # Install dependencies npm install # Build the packages locally npm run build # Navigate to the example project cd typescript/examples/langchain-cdp-chatbot # Configure environment variables mv .env.local .env # Edit .env to include your Base API key and OpenAI API key # Run the chatbot npm run start Configuration (config.json and agentkit config): Bash # Example: Deploying an AI agent on Base agentkit config \ --network base \ --wallet-url https://api.coinbase.com/mpc-wallet \ --api-key YOUR_API_KEY \ --agent-name "Onchain AI Assistant" agentkit init # Apply changes agentkit start # Deploy the agent Command-line options: --network: Specify base-mainnet or base-testnet. --wallet-url: Endpoint for MPC wallet transactions. --api-key: Authentication key for API access. --agent-name: Identifier for AI agent integration. Best Practice: Always run agentkit init after modifying config.json or using agentkit config. System Requirements: - Linux/macOS (16GB+ RAM recommended) - Node.js (v18+) - Docker support for isolated runtime environments API Usage (Integrating AI Agents with Base): Python (Using AgentKit APIs): Python import requests API_URL = "https://api.base.org/v1" API_KEY = "YOUR_API_KEY" def deploy_ai_agent(agent_name): headers = {"Authorization": f"Bearer {API_KEY}"} data = {"agent_name": agent_name, "network": "base-mainnet"} response = requests.post(f"{API_URL}/deploy", json=data, headers=headers) return response.json() print(deploy_ai_agent("DeFi Advisor")) Node.js (Using AgentKit APIs): JavaScript const axios = require('axios'); const API_URL = "https://api.base.org/v1"; const API_KEY = "YOUR_API_KEY"; async function deployAIAgent(agentName) { const response = await axios.post( API_URL + "/deploy", { agent_name: agentName, network: "base-mainnet" }, { headers: { Authorization: \`Bearer ${API_KEY}\` } } ); console.log(response.data); } deployAIAgent("DeFi Advisor"); API Reference: - /v1/deploy: Deploy an AI-powered agent on Base. - /v1/wallets: Manage onchain wallet interactions via MPC Wallet. - /v1/smart-contracts: Execute smart contract transactions. - /v1/faucets: Retrieve Base testnet funds for development. Evaluation Criteria for Hackathon Submissions: - Usefulness: Solves a real problem and provides practical value. - Accessibility: Must be easy for users to access and interact with. - Originality: Introduces a unique or innovative approach. - Wow Factor: Demonstrates technical excellence and pushes the boundaries of onchain AI. Hackathon Requirements: - The agent/application must have a functional UI (mobile app, web app, chatbot, or social feed). - A fully deployed onchain app with a publicly accessible URL. - Must be built on Base network. - Code must be open source and available for reuse. - Teams must provide artifacts (GitHub repo, planning docs, short demo video). - The project must be a new development (no pre-existing work). - Must use AgentKit or the core CDP SDK. Key Takeaways and Best Practices: - Base provides a scalable and low-cost Ethereum Layer 2 for AI-driven onchain applications. - AgentKit enables AI agents to interact with blockchain, manage assets, and execute transactions. - Smart Wallets offer a user-friendly authentication mechanism for Web3 applications. - OnchainKit provides pre-built utilities to accelerate onchain application development. - Use Base testnet faucets for development and testing. Get Started: - Documentation: https://docs.base.org/ - Developer Portal: https://www.base.org/build - GitHub: https://github.com/coinbase/agentkit `; ``` # Arbitrum network knowledge ``` export const arbitrumKnowledge = ` Arbitrum: Scaling AI Agents on Layer 2 (Condensed for LLMs - with Code Samples) Core Concept: Arbitrum is a Layer 2 scaling solution for Ethereum, offering high-throughput and low-cost smart contracts powered by advanced proving technology. Developers can build AI-powered smart contract agents using **Arbitrum Stylus** in Rust or Solidity, deploy autonomous AI agents, and create tools that enhance on-chain AI development. Key Components: Arbitrum Stylus: - Rust-based smart contract execution for high-efficiency AI agents. - Supports parallel execution and reduced gas costs. - Enables AI-driven smart contract automation. - Documentation: https://docs.arbitrum.io/stylus/stylus-overview - Example Code: https://stylus-by-example.org/ Arbitrum One & Arbitrum Sepolia Testnet: - Main deployment networks for AI-powered applications. - Supports Optimistic Rollups with Ethereum security guarantees. - Low-cost execution for AI agent interactions. - Developer Portal: https://docs.arbitrum.io/welcome/get-started AI Agent Use Cases: - **Smart Contract Whisperer**: AI agents that optimize and audit smart contracts. - **Autonomous On-Chain Assistant**: AI-driven execution logic for DeFi and DAOs. - **AI-Powered Governance**: Smart agents automating DAO decision-making. - **NFT and Gaming Agents**: AI-driven NFT curation and interactive Web3 experiences. Contributing to Documentation (GitHub): Repository: https://github.com/OffchainLabs/arbitrum Process: Fork, clone, branch, modify, commit, push, pull request. Local Development: Bash npm install # Install dependencies npm start # Start development server (http://localhost:3000) User Guide (End-users): Deploying AI Agents: Follow API documentation for smart contract interactions. Using Stylus: Build Rust-based contracts with AI automation. Developer Guide: Quick Start (Installation): Bash # Install Arbitrum Stylus CLI cargo install stylus # Create a new Rust-based smart contract stylus new ai-agent-contract cd ai-agent-contract # Build and deploy to Arbitrum One or Sepolia Testnet stylus build stylus deploy --network arbitrum-sepolia Configuration (config.json and stylus config): Bash # Example: Deploying an AI-powered agent contract stylus config \ --network arbitrum-one \ --contract "AI Onchain Assistant" \ --runtime rust stylus init # Apply changes stylus deploy # Deploy the contract Command-line options: --network: Specify arbitrum-one or arbitrum-sepolia. --contract: AI agent contract name. --runtime: Choose Rust or Solidity-based execution. Best Practice: Always run stylus init after modifying config.json or using stylus config. System Requirements: - Linux/macOS (16GB+ RAM recommended) - Rust toolchain (cargo, wasm-pack) - Node.js (v18+) - Docker support for isolated runtime environments API Usage (Integrating AI Agents with Arbitrum): Rust (Using Arbitrum Stylus APIs): Rust use stylus_sdk::contract; #[contract] pub struct AiAgent { // AI agent state variables } impl AiAgent { pub fn new() -> Self { AiAgent { } } pub fn analyze_data(&self, input: String) -> String { format!("AI analysis result: {}", input) } } Node.js (Interacting with Arbitrum AI Agent): JavaScript const ethers = require('ethers'); const ARBITRUM_RPC = "https://arbitrum.sepolia.io"; const CONTRACT_ADDRESS = "0xYourContractAddress"; const ABI = [ /* Contract ABI */ ]; async function interactWithAIAgent() { const provider = new ethers.JsonRpcProvider(ARBITRUM_RPC); const contract = new ethers.Contract(CONTRACT_ADDRESS, ABI, provider); const result = await contract.analyze_data("Evaluate this smart contract"); console.log("AI Analysis Output:", result); } interactWithAIAgent(); API Reference: - /v1/deploy: Deploy AI-powered smart contracts. - /v1/execute: Execute on-chain AI automation. - /v1/query: Retrieve AI agent analytics and outputs. - /v1/validators: Check AI-driven contract validation results. Evaluation Criteria for Hackathon Submissions: - **Best Use of Arbitrum Stylus for AI Agents ($6,000)** - Must use **Arbitrum Stylus** (Rust-based smart contracts). - Must be deployed on **Arbitrum Sepolia Testnet** or **Arbitrum One**. - Open-source code and working proof-of-concept. - **Most Innovative AI Agent Applications on Arbitrum ($3,000)** - Must deploy an AI-powered smart contract or application. - Requires creative use of AI in governance, DeFi, NFTs, or other areas. - Demonstrates real-world impact and technical excellence. - **Best Developer Tools for AI Agents on Arbitrum ($1,000)** - Must create a developer tool, SDK, or testing suite for AI agent development. - Enables ease of deployment, scaling, or debugging of AI applications. - Encourages open-source contributions and adoption. Key Takeaways and Best Practices: - **Stylus** enables Rust-based smart contracts for AI-powered automation. - **Arbitrum One** and **Sepolia Testnet** provide scalable, low-cost deployment environments. - **DeFi AI Agents** can automate risk assessments, lending, and market-making. - **Governance AI Agents** can optimize DAO decision-making processes. - **Developer tools** that enhance AI agent usability have strong ecosystem impact. Get Started: - Documentation: https://docs.arbitrum.io/ - Arbitrum Stylus Guide: https://docs.arbitrum.io/stylus/stylus-overview - Developer Portal: https://docs.arbitrum.io/welcome/get-started - GitHub: https://github.com/OffchainLabs/arbitrum `; ``` # Flow knowledge ``` export const flowKnowledge = ` Flow: AI-Powered Consumer Apps on Layer 1 (Condensed for LLMs - with Code Samples) Core Concept: Flow is a high-performance Layer 1 blockchain optimized for consumer crypto applications. It features a developer-friendly smart contract language (Cadence) and supports EVM equivalence, enabling Solidity-based applications. Flow is designed for **scalability, usability, and efficiency**, making it ideal for AI-powered consumer applications, no-code AI agent tools, and AI plugins for the Eliza framework. Key Components: Flow Blockchain: - High-throughput Layer 1 with **multi-role architecture** for scalability. - Supports **Cadence smart contracts** and **EVM-based execution**. - Developer Portal: https://developers.flow.com/ Cadence Smart Contracts: - Secure-by-design programming language optimized for consumer applications. - Features **on-chain randomness (VRF)** and **metadata views** for AI-powered interactions. - Documentation: https://cadence-lang.org/docs/language/attachments Flow EVM Equivalence: - Enables deployment of existing Ethereum smart contracts on Flow. - Compatible with Solidity-based AI agent logic. - Guide: https://developers.flow.com/evm/guides/vrf Account Linking & Sponsored Transactions: - Facilitates seamless Web3 onboarding for consumer apps. - Allows AI agents to execute transactions on behalf of users without requiring gas fees. - Guide: https://developers.flow.com/build/guides/account-linking Scaling & High-Performance Transactions: - Built-in solutions for **parallel execution and state scaling**. - Reduces transaction costs while maintaining a **developer-friendly ACID-compliant environment**. - Guide: https://developers.flow.com/build/advanced-concepts/scaling AI Agent Use Cases: - **AI-Powered Consumer Apps**: AI-driven chatbots, automation tools, and personalized user experiences. - **No-Code AI Agent Launchers**: Platforms enabling non-technical users to deploy AI agents on Flow. - **AI Plugins for Eliza Framework**: Extending ElizaOnFlow with enhanced AI capabilities. Contributing to Documentation (GitHub): Repository: https://github.com/onflow/elizaOnFlow Process: Fork, clone, branch, modify, commit, push, pull request. Local Development: Bash npm install # Install dependencies npm start # Start development server (http://localhost:3000) User Guide (End-users): Deploying AI Agents: Follow API documentation to integrate consumer-facing AI apps. Using Cadence: Develop secure smart contracts for AI automation. Developer Guide: Quick Start (Installation): Bash # Install Flow CLI sh -ci "$(curl -fsSL https://flow-cli.s3.amazonaws.com/install.sh)" # Create a new Cadence smart contract flow cadence new ai-agent # Deploy contract to Flow testnet flow deploy --network testnet Configuration (Cadence Smart Contracts): Cadence pub contract AIConsumerAgent { pub let owner: Address pub fun createAgent(): String { return "AI Agent initialized on Flow" } } Command-line options: --network: Specify mainnet or testnet. --contract: Name of AI agent contract. --runtime: Choose Cadence or EVM execution. Best Practice: Always run flow deploy after modifying contracts. System Requirements: - Linux/macOS (16GB+ RAM recommended) - Flow CLI installed - Node.js (v18+) - Docker support for isolated runtime environments API Usage (Integrating AI Agents with Flow): Python (Using Flow APIs): Python import requests API_URL = "https://api.flow.com/v1" API_KEY = "YOUR_API_KEY" def deploy_ai_agent(agent_name): headers = {"Authorization": f"Bearer {API_KEY}"} data = {"agent_name": agent_name, "network": "mainnet"} response = requests.post(f"{API_URL}/deploy", json=data, headers=headers) return response.json() print(deploy_ai_agent("AI Consumer Chatbot")) Node.js (Interacting with Flow AI Agent): JavaScript const axios = require('axios'); const API_URL = "https://api.flow.com/v1"; const API_KEY = "YOUR_API_KEY"; async function deployAIAgent(agentName) { const response = await axios.post( API_URL + "/deploy", { agent_name: agentName, network: "mainnet" }, { headers: { Authorization: \`Bearer ${API_KEY}\` } } ); console.log(response.data); } deployAIAgent("AI Consumer Chatbot"); API Reference: - /v1/deploy: Deploy AI-powered consumer applications. - /v1/execute: Execute AI-driven smart contract interactions. - /v1/query: Retrieve AI agent analytics and outputs. - /v1/account-linking: Manage seamless onboarding for AI agents. Evaluation Criteria for Hackathon Submissions: - **Best AI Agents for Consumers ($5,000)** - Must be deployed on Flow (Cadence or EVM). - Public and accessible AI-driven consumer application. - Innovative AI automation with **real-world consumer value**. - **Best No-Code AI Agent Launcher ($2,000)** - No-code tool enabling users to create AI agents without technical knowledge. - Fully deployed and functional on Flow. - High usability and accessibility. - **Best Flow Plugin to an AI Agent Framework ($3,000)** - Contribution to **ElizaOnFlow** or another AI agent framework. - Must be a **new pull request** with meaningful improvements. - Open-source contribution with high **code quality, complexity, and protocol usage**. Key Takeaways and Best Practices: - **Flow is a consumer-optimized blockchain** with **Cadence smart contracts** and **EVM equivalence**. - **AI-driven consumer apps** can leverage Flow’s **high scalability and usability**. - **No-code AI tools** simplify AI agent deployment for mainstream adoption. - **ElizaOnFlow AI plugins** can extend agent capabilities with **sponsored transactions and account linking**. - **On-chain randomness (VRF)** and **metadata views** enable AI-powered decision-making. - **Use Flow’s scaling architecture** to ensure high-performance AI automation. Get Started: - Documentation: https://developers.flow.com/ - ElizaOnFlow GitHub: https://github.com/onflow/elizaOnFlow - Developer Portal: https://developers.flow.com/build/guides/account-linking - Flow Cadence Guide: https://cadence-lang.org/docs/language/attachments `; ``` # autonome-knowledge ``` export const altlayerKnowledge = ` AltLayer & Autonome: Comprehensive Technical Overview (For Technical Evaluation) Core Infrastructure: AltLayer Protocol: - L2 rollup solution optimized for AI agent operations - EVM-compatible execution environment - Account abstraction (ERC-4337) native support - Custom mempool for efficient transaction management - Specialized infrastructure for autonomous agent deployment Autonome Platform Features: 1. Smart Account Infrastructure - ERC-4337 compliant smart contract accounts - Custom validation logic support - Multi-operation bundling capabilities - Automated transaction management - Built-in sponsorship mechanisms 2. Transaction Management - Bundled transaction support - Gas optimization mechanisms - Priority fee management - Transaction retry logic - Failure recovery protocols Technical Implementation: 1. Smart Account Deployment: \`\`\`javascript // Smart Account Factory Interface interface ISmartAccountFactory { function createAccount( address owner, uint256 salt ) external returns (address); function getAddress( address owner, uint256 salt ) external view returns (address); } // Deployment Implementation async function deploySmartAccount(owner: string, salt: string) { const factory = new ethers.Contract( FACTORY_ADDRESS, FACTORY_ABI, provider ); const tx = await factory.createAccount(owner, salt); const receipt = await tx.wait(); return receipt.events[0].args.account; } \`\`\` 2. UserOperation Structure: \`\`\`typescript interface UserOperation { sender: string; // Smart account address nonce: BigNumberish; // Unique identifier initCode: BytesLike; // Account deployment code callData: BytesLike; // Execution calldata callGasLimit: BigNumberish; // Execution gas limit verificationGasLimit: BigNumberish; preVerificationGas: BigNumberish; maxFeePerGas: BigNumberish; maxPriorityFeePerGas: BigNumberish; paymasterAndData: BytesLike; signature: BytesLike; } \`\`\` 3. Agent Implementation Example: \`\`\`solidity contract AutonomeAgent { using UserOperationLib for UserOperation; // Core agent state address public owner; uint256 public nonce; mapping(bytes32 => bool) public executedOperations; // Validation and execution function validateUserOp( UserOperation calldata userOp, bytes32 userOpHash ) external view returns (uint256 validationData) { // Custom validation logic require(!executedOperations[userOpHash], "Operation already executed"); require(userOp.sender == address(this), "Invalid sender"); return 0; // Validation successful } function executeOperation( UserOperation calldata userOp ) external payable { // Execution logic bytes32 opHash = userOp.hash(); require(!executedOperations[opHash], "Already executed"); // Execute transaction (bool success, ) = userOp.target.call{value: userOp.value}( userOp.callData ); require(success, "Execution failed"); executedOperations[opHash] = true; } } \`\`\` API Integration: 1. Autonome API Endpoints: \`\`\`typescript const AUTONOME_ENDPOINTS = { // Account Management CREATE_ACCOUNT: '/v1/account/create', GET_ACCOUNT: '/v1/account/:address', // Transaction Management SUBMIT_OP: '/v1/userOperation/submit', GET_OP_STATUS: '/v1/userOperation/:hash', // Gas Estimation ESTIMATE_GAS: '/v1/estimation/gas', GET_GAS_PRICE: '/v1/estimation/gasPrice' }; // API Client Implementation class AutonomeClient { constructor(private apiKey: string, private endpoint: string) {} async createAccount(owner: string, salt: string): Promise<string> { const response = await this.post(AUTONOME_ENDPOINTS.CREATE_ACCOUNT, { owner, salt }); return response.accountAddress; } async submitUserOperation(userOp: UserOperation): Promise<string> { const response = await this.post(AUTONOME_ENDPOINTS.SUBMIT_OP, { userOperation: userOp }); return response.userOpHash; } } \`\`\` 2. Transaction Sponsorship: \`\`\`typescript interface SponsorshipConfig { paymasterAddress: string; validUntil: number; validAfter: number; sponsorshipLimit: BigNumber; } async function configureSponsorshipForOp( userOp: UserOperation, config: SponsorshipConfig ): Promise<UserOperation> { const paymasterData = ethers.utils.defaultAbiCoder.encode( ['uint48', 'uint48', 'uint256'], [config.validUntil, config.validAfter, config.sponsorshipLimit] ); return { ...userOp, paymasterAndData: ethers.utils.hexConcat([ config.paymasterAddress, paymasterData ]) }; } \`\`\` Infrastructure Integration: 1. Mempool Management: - Custom mempool configuration - Transaction prioritization - Replacement transaction handling - Gas price management - Bundling optimization 2. Network Configuration: \`\`\`javascript const NETWORKS = { ALTLAYER_MAINNET: { chainId: 1234, // Replace with actual chainId rpcUrl: "https://mainnet.altlayer.io", entryPoint: "0x...", // EntryPoint contract address bundler: "https://bundler.altlayer.io" }, ALTLAYER_TESTNET: { chainId: 5678, // Replace with actual chainId rpcUrl: "https://testnet.altlayer.io", entryPoint: "0x...", // EntryPoint contract address bundler: "https://testnet-bundler.altlayer.io" } }; \`\`\` Advanced Features: 1. Account Recovery: - Fallback handler implementation - Social recovery options - Guardian management - Recovery timelock mechanisms 2. Security Measures: - Operation validation - Gas limits and restrictions - Signature verification - Replay protection - Access control mechanisms 3. Optimization Strategies: - Batch operation processing - Gas optimization techniques - Storage optimization - Calldata minimization - Event optimization Troubleshooting Guidelines: 1. Common Issues: - Transaction failures - Gas estimation errors - Nonce management issues - Signature validation errors - Account deployment issues 2. Debug Process: \`\`\`javascript async function debugUserOperation(userOpHash: string) { // Get operation status const status = await client.getUserOperationStatus(userOpHash); // Check validation if (status.validationErrors) { console.error('Validation Errors:', status.validationErrors); // Handle validation errors } // Check execution if (status.executionErrors) { console.error('Execution Errors:', status.executionErrors); // Handle execution errors } // Get transaction details const txDetails = await provider.getTransaction(status.transactionHash); console.log('Transaction Details:', txDetails); } \`\`\` Best Practices: 1. Development: - Use proper error handling - Implement comprehensive logging - Follow gas optimization patterns - Maintain proper documentation - Implement proper testing 2. Production: - Monitor gas usage - Implement proper backup strategies - Set up monitoring systems - Regular security audits - Maintain upgrade paths 3. Integration: - Follow API best practices - Implement proper rate limiting - Use proper error handling - Maintain proper documentation - Regular testing and updates `; ```