### Docker Quick Start for AEAMCP Backend Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Provides a step-by-step guide to quickly set up and start the AEAMCP Git Registration Backend using Docker Compose, including environment setup and health checks. ```bash # 1. Navigate to backend directory cd backend # 2. Create environment file cp .env.example .env # 3. Edit environment variables (see configuration section below) nano .env # 4. Start all services with Docker Compose npm run docker:up # 5. Wait for services to be healthy (30-60 seconds) npm run docker:logs # 6. Test the deployment npm run test:health ``` -------------------------------- ### Install AEAMCP Backend Dependencies Locally Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Instructions for installing Node.js dependencies and running the setup script for local development of the AEAMCP Git Registration Backend. ```bash # Navigate to backend directory cd backend # Run setup script (checks dependencies and creates directories) chmod +x scripts/setup.sh npm run setup # Alternative manual installation npm install ``` -------------------------------- ### Install Dependencies, Run Migrations, and Start AEAMCP Development Server Source: https://github.com/opensvm/aeamcp/blob/main/backend/README.md This snippet outlines the steps to set up the database and start the development server for the AEAMCP backend. It involves installing Node.js dependencies, running database migrations to prepare the schema, and launching the application in development mode. ```bash npm install npm run migrate npm run dev ``` -------------------------------- ### Start, Enable, and Test Redis Server Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Commands to start and enable the Redis server service and verify its functionality. ```bash # Start Redis sudo systemctl start redis-server sudo systemctl enable redis-server # Test Redis redis-cli ping ``` -------------------------------- ### Build and Start AEAMCP Backend Locally Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Commands to build the TypeScript project and start the AEAMCP Git Registration Backend in development or production mode. ```bash # Build TypeScript npm run build # Start development server npm run dev # Or start production server npm start ``` -------------------------------- ### Manage Processes with PM2 Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Commands for installing PM2, starting the application with PM2 for process management, monitoring its status and logs, and configuring auto-restart on system reboot. ```bash # Using PM2 for process management npm install -g pm2 # Start with PM2 pm2 start dist/index.js --name aeamcp-backend # Monitor pm2 status pm2 logs aeamcp-backend # Auto-restart on reboot pm2 startup pm2 save ``` -------------------------------- ### Copy and Edit AEAMCP Backend Environment File Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Instructions to copy the example environment file and open it for configuration. ```bash # Copy environment template cp .env.example .env # Edit with your actual values nano .env ``` -------------------------------- ### Configure Production Environment Variables Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Example environment variables for a production setup, including setting NODE_ENV, PORT, LOG_LEVEL, generating secure JWT and encryption keys, and configuring DATABASE_URL and REDIS_URL with SSL/authentication. ```bash # Production environment variables NODE_ENV=production PORT=3001 LOG_LEVEL=info # Secure secrets JWT_SECRET=$(openssl rand -hex 32) ENCRYPTION_KEY=$(openssl rand -hex 16) # Database with SSL DATABASE_URL=postgresql://user:pass@host:5432/db?sslmode=require # Redis with authentication REDIS_URL=rediss://user:pass@host:6380 ``` -------------------------------- ### Initial Project Setup Commands Source: https://github.com/opensvm/aeamcp/blob/main/frontend/FRONTEND_PLAN.md Commands to set up the Next.js frontend project, install core dependencies for Solana web3 interaction, and copy Interface Definition Language (IDL) files. ```bash # Create Next.js app npx create-next-app@latest frontend --typescript --tailwind --app # Install dependencies cd frontend npm install @solana/web3.js @solana/wallet-adapter-react @solana/wallet-adapter-react-ui @solana/wallet-adapter-wallets npm install next-pwa react-hook-form zod @hookform/resolvers npm install @tanstack/react-query lucide-react react-hot-toast npm install -D @types/node # Copy IDL files cp ../idl/*.json ./src/lib/idl/ ``` -------------------------------- ### Install PostgreSQL on Ubuntu/Debian Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Command to install PostgreSQL and its contrib package on Ubuntu/Debian systems. ```bash sudo apt-get install postgresql postgresql-contrib ``` -------------------------------- ### Automate Solana Program Build and Deployment with GitHub Actions Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_GUIDE.md This GitHub Actions workflow automates the build and deployment of Solana programs on `push` or `workflow_dispatch`. It checks out the repository, installs the Solana CLI and Rust toolchain, builds the `agent-registry` and `mcp-server-registry` programs, and then deploys them to the Devnet using a provided `SOLANA_KEYPAIR` secret. ```yaml name: Build and Deploy Solana Programs on: push: branches: [ main ] workflow_dispatch: jobs: build-and-deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Solana CLI run: | sh -c "$(curl -sSfL https://release.solana.com/v1.18.18/install)" echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - name: Install Rust uses: actions-rs/toolchain@v1 with: toolchain: stable override: true - name: Build programs run: | cargo build-sbf --manifest-path programs/agent-registry/Cargo.toml cargo build-sbf --manifest-path programs/mcp-server-registry/Cargo.toml - name: Deploy to Devnet env: SOLANA_KEYPAIR: ${{ secrets.SOLANA_KEYPAIR }} run: | echo "$SOLANA_KEYPAIR" > keypair.json solana config set --keypair keypair.json solana config set --url devnet ./scripts/deploy-devnet.sh ``` -------------------------------- ### Install Redis on Ubuntu/Debian Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Command to install Redis server on Ubuntu/Debian systems. ```bash sudo apt-get install redis-server ``` -------------------------------- ### Set Up Solana Development Environment (Bash) Source: https://github.com/opensvm/aeamcp/blob/main/frontend/public/docs/developer-guide.md This snippet provides essential bash commands to install the Rust toolchain, Solana CLI, and the Anchor framework, which are prerequisites for Solana on-chain development and interacting with the registries. It also includes cloning the project repository. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh sh -c "$(curl -sSfL https://release.solana.com/v1.14.18/install)" ``` ```bash npm i -g @project-serum/anchor-cli ``` ```bash git clone https://github.com/openSVM/aeamcp.git cd aeamcp ``` -------------------------------- ### Troubleshoot GitHub App Authentication Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Commands to verify GitHub App configuration and check app installations when authentication fails. This helps ensure the correct ID, private key, and installation status. ```bash # Verify GitHub App configuration echo $GITHUB_APP_ID echo $GITHUB_APP_PRIVATE_KEY | head -c 50 # Check app installation curl -H "Authorization: Bearer $(generate_jwt_token)" \ https://api.github.com/app/installations ``` -------------------------------- ### Write C `examples/register.c` Source: https://github.com/opensvm/aeamcp/blob/main/docs/SDK_EXECUTION_PLAN_DETAILED.md Describes the example for agent registration, ensuring the example compiles, successfully registers an agent, and output matches expected. ```APIDOC - Example compiles. - Registers agent successfully. - Output matches expected. ``` -------------------------------- ### Install Rust and Solana CLI for Development Source: https://github.com/opensvm/aeamcp/blob/main/README.md This snippet provides commands to install Rust, the Solana CLI, and configure Solana for local development, including starting a test validator for on-chain interactions. ```bash # Install Rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Install Solana CLI curl --proto '=https' --tlsv1.2 -sSfL https://solana-install.solana.workers.dev | bash # Set up Solana for local development solana config set --url localhost solana-test-validator ``` -------------------------------- ### Install Solana AI Registries SDK (Bash) Source: https://github.com/opensvm/aeamcp/blob/main/docs/ONBOARDING_CONTENT_SPECIFICATIONS.md This snippet provides the command-line instructions for installing the Solana AI Registries SDK using either npm or yarn, enabling developers to quickly set up their development environment. ```bash npm install @solana-ai/registries-sdk # or yarn add @solana-ai/registries-sdk ``` -------------------------------- ### Common Docker Compose Commands for AEAMCP Backend Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Essential Docker Compose commands for managing the AEAMCP Git Registration Backend services, including starting, stopping, viewing logs, rebuilding, and resetting the database. ```bash # Start services in background npm run docker:up # Stop services npm run docker:down # View logs npm run docker:logs # Rebuild containers npm run docker:build # Start with fresh database npm run docker:down && docker volume rm backend_postgres_data backend_redis_data && npm run docker:up ``` -------------------------------- ### Install Solana Command Line Interface (CLI) Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_CHECKLIST.md Installs the Solana command-line tools, essential for interacting with the Solana blockchain, deploying programs, and managing accounts. ```Shell sh -c "$(curl -sSfL https://release.solana.com/v1.18.18/install)" ``` -------------------------------- ### Enable Debug Mode and Tracing Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Commands to start the application with enhanced logging for debugging. This includes setting a debug log level, enabling request tracing, and monitoring logs in real-time with JSON parsing. ```bash # Start with debug logging LOG_LEVEL=debug npm run dev # Enable request tracing DEBUG=* npm run dev # Monitor in real-time tail -f logs/combined.log | jq '.' ``` -------------------------------- ### Install and Run AEAMCP Frontend Source: https://github.com/opensvm/aeamcp/blob/main/frontend/README.md Provides commands to clone the repository, install dependencies, and run the development or production server for the AEAMCP frontend application. ```bash # Clone the repository git clone https://github.com/your-org/aeamcp-frontend.git cd aeamcp-frontend # Install dependencies npm install # Start development server npm run dev # Build for production npm run build # Start production server npm start ``` -------------------------------- ### Required Environment Variables for AEAMCP Backend Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Example configuration for essential environment variables required by the AEAMCP Git Registration Backend, including GitHub App, database, Redis, security, and server settings. ```bash # GitHub App Configuration (required for private repos) GITHUB_APP_ID=123456 GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----" GITHUB_WEBHOOK_SECRET=your_webhook_secret # Database DATABASE_URL=postgresql://aeamcp_user:your_password@localhost:5432/aeamcp_git_registration # Redis REDIS_URL=redis://localhost:6379 # Security JWT_SECRET=your-secure-jwt-secret-min-32-characters ENCRYPTION_KEY=your-32-character-encryption-key # Server NODE_ENV=development PORT=3001 ``` -------------------------------- ### Configure GitHub App Environment Variables Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Instructions and examples for setting GitHub App related environment variables, including extracting App ID, formatting the private key, and setting the webhook secret. ```bash # Extract App ID from the app settings page GITHUB_APP_ID=123456 # Convert private key to environment format GITHUB_APP_PRIVATE_KEY="$(cat private-key.pem | tr '\n' '\\n')" # Set webhook secret GITHUB_WEBHOOK_SECRET=your_webhook_secret_here ``` -------------------------------- ### Go: Example Operations for Solana AI Registries Source: https://github.com/opensvm/aeamcp/blob/main/docs/SDK_ROADMAP_DETAILED.md This Go example demonstrates high-level operations using the `github.com/svmai/registries` module. It illustrates how to register an agent with a specified `Agent.Card` and how to initiate a pay-as-you-go payment using a `payments.Config` structure. These operations typically involve a context, an RPC client, and a signer. ```Go agent.Register(ctx, rpc, signer, agent.Card{ID:"bot-1", …}) payments.PayPYG(ctx, rpc, signer, payments.Config{Mint: svmaiMint, …}) ``` -------------------------------- ### Write Python Jupyter notebook examples Source: https://github.com/opensvm/aeamcp/blob/main/docs/SDK_EXECUTION_PLAN_DETAILED.md Covers the writing of Jupyter notebook examples, ensuring all examples run, output matches expected, and usage is documented in README. ```APIDOC - All examples run. - Output matches expected. - Usage documented in README. ``` -------------------------------- ### Write TypeScript `examples/register-agent.ts`, `update-server.ts`, `pay-pyg.ts` Source: https://github.com/opensvm/aeamcp/blob/main/docs/SDK_EXECUTION_PLAN_DETAILED.md Covers the writing of example scripts, ensuring all examples run, output matches expected, and usage is documented in README. ```APIDOC - All examples run. - Output matches expected. - Usage documented in README. ``` -------------------------------- ### Install Solana AI Registries SDK Source: https://github.com/opensvm/aeamcp/blob/main/docs/ONBOARDING_I18N_SPECIFICATIONS.md Commands to install the Solana AI Registries SDK using npm or yarn package managers. This is the first step to set up your development environment. ```shell npm install @solana-ai/registries-sdk ``` ```shell yarn add @solana-ai/registries-sdk ``` -------------------------------- ### Create PostgreSQL Database and User for AEAMCP Backend Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md SQL commands to create a dedicated database and user with appropriate privileges for the AEAMCP Git Registration Backend. ```sql CREATE DATABASE aeamcp_git_registration; CREATE USER aeamcp_user WITH PASSWORD 'your_password'; GRANT ALL PRIVILEGES ON DATABASE aeamcp_git_registration TO aeamcp_user; \q ``` -------------------------------- ### Install Rust Programming Language Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_CHECKLIST.md Installs the Rust programming language and its toolchain using the official rustup script. This is a prerequisite for building Solana programs. ```Shell curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### SDK Development Execution Phases Gantt Chart Source: https://github.com/opensvm/aeamcp/blob/main/docs/SDK_EXECUTION_SUMMARY.md Illustrates the timeline and progression of the Solana AI Registries SDK development across different phases, from common artifacts and CI/CD setup to individual SDK implementations and examples. ```Mermaid gantt title SDK Development Phases dateFormat X axisFormat %s section Phase 1 Common Artifacts :active, p1_common, 0, 16 CI/CD Setup :active, p1_cicd, 0, 18 section Phase 2 Rust SDK :p2_rust, 16, 48 TypeScript SDK :p2_ts, 16, 28 section Phase 3 Go SDK :p3_go, 64, 20 Python SDK :p3_py, 64, 20 section Phase 4 C SDK :p4_c, 84, 32 C++ SDK :p4_cpp, 116, 28 section Phase 5 Examples :p5_ex, 144, 24 ``` -------------------------------- ### Database Schema for GitHub Installations and Repository Analyses Source: https://github.com/opensvm/aeamcp/blob/main/docs/PHASE1_EXECUTION_PLAN.md SQL DDL statements for creating `github_installations` and `repository_analyses` tables. The `github_installations` table stores GitHub App installation details, and `repository_analyses` stores results of repository analysis jobs. ```sql CREATE TABLE github_installations ( id SERIAL PRIMARY KEY, installation_id BIGINT UNIQUE NOT NULL, account_login VARCHAR(255) NOT NULL, account_type VARCHAR(50) NOT NULL, created_at TIMESTAMP DEFAULT NOW() ); CREATE TABLE repository_analyses ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), repo_url VARCHAR(500) NOT NULL, commit_hash VARCHAR(40) NOT NULL, analysis_result JSONB NOT NULL, created_at TIMESTAMP DEFAULT NOW(), expires_at TIMESTAMP DEFAULT NOW() + INTERVAL '1 hour' ); ``` -------------------------------- ### Install cargo-test-bpf for Solana Program Testing Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_CHECKLIST.md Installs the `cargo-test-bpf` utility, which is required for running BPF (Berkeley Packet Filter) tests for Solana programs. ```Shell cargo install cargo-test-bpf ``` -------------------------------- ### Install Rust, Solana CLI, and Anchor CLI Source: https://github.com/opensvm/aeamcp/blob/main/docs/TEST_PLAN.md Provides commands to set up the development environment by installing the Rust toolchain, Solana CLI, and the Anchor CLI for Solana program development. ```bash # Install Rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Install Solana CLI sh -c "$(curl -sSfL https://release.solana.com/v1.18.0/install)" # Install dependencies cargo install --version 0.28.0 anchor-cli ``` -------------------------------- ### Install Development Prerequisites Source: https://github.com/opensvm/aeamcp/blob/main/docs/IMPLEMENTATION_STATUS.md Provides commands to install Rust, the primary language for the project, and the Solana CLI, essential for interacting with the Solana blockchain. These are foundational tools required before building or testing the project. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh sh -c "$(curl -sSfL https://release.solana.com/v1.18.18/install)" ``` -------------------------------- ### View Application Logs Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Commands to view application and error logs in real-time. Includes options for viewing combined logs, error-specific logs, and Docker container logs for the backend service. ```bash # View application logs tail -f logs/combined.log # View error logs only tail -f logs/error.log # Docker logs docker-compose logs -f backend ``` -------------------------------- ### List All Git Analyses Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Fetches a list of all Git repository analyses associated with the current user. This command provides an overview of all past and ongoing analyses. ```bash curl http://localhost:3001/api/v1/git/analyses \ -H "x-user-id: test-user" ``` -------------------------------- ### Run Automated API Tests for AEAMCP Backend Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Commands to execute automated API tests for the AEAMCP Git Registration Backend, including running all tests or specific endpoint tests. ```bash # Run all API tests npm run test:api # Test individual endpoints npm run test:health ./scripts/test-api.sh analysis ./scripts/test-api.sh error ``` -------------------------------- ### Monitor System Resources Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Commands to monitor API response times, memory usage of Node.js processes, and disk usage of analysis directories. These help in identifying resource bottlenecks and performance degradation. ```bash # Monitor API response times curl -w "@curl-format.txt" -s http://localhost:3001/health # Check memory usage ps aux | grep node | awk '{print $4, $11}' # Monitor disk usage du -sh /tmp/git-analysis/* | sort -h ``` -------------------------------- ### Manually Trigger Onboarding Tour in React Source: https://github.com/opensvm/aeamcp/blob/main/frontend/components/onboarding/README.md Shows how to use the `useOnboardingTrigger` hook to programmatically start an onboarding tour from any React component, typically via a user interaction like a button click. ```tsx import { useOnboardingTrigger } from '@/components/onboarding'; function MyComponent() { const { startOnboarding } = useOnboardingTrigger(); return ( ); } ``` -------------------------------- ### Monitor System Health Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Commands for continuous health monitoring of the application. Includes checking overall health, database connection status, and cache performance metrics using 'jq' for JSON parsing. ```bash # Continuous health monitoring watch -n 5 'curl -s http://localhost:3001/health | jq .' # Database connection test curl -s http://localhost:3001/health | jq '.services.database' # Cache performance curl -s http://localhost:3001/health | jq '.cache' ``` -------------------------------- ### Solana AI Registries SDK: Step-by-Step Quick Start Source: https://github.com/opensvm/aeamcp/blob/main/docs/ONBOARDING_CONTENT_SPECIFICATIONS.md This snippet demonstrates how to import and initialize the Solana AI Registries SDK, discover agents based on skills and price, connect to a specific agent, make requests, and interact with MCP servers for tools like current price retrieval. ```typescript // 1. Import and initialize import { SolanaAIRegistries, WalletAdapter } from '@solana-ai/registries-sdk'; const registry = new SolanaAIRegistries({ network: 'devnet', // Start with devnet for testing wallet: new WalletAdapter(yourWallet) }); // 2. Discover agents const agents = await registry.agents.search({ skills: ['trading', 'analysis'], status: 'active', maxPrice: 0.1 // $SVMAI per request }); // 3. Connect to an agent const tradingAgent = await registry.agents.connect(agents[0].id); // 4. Make requests const analysis = await tradingAgent.analyze({ symbol: 'SOL', timeframe: '1h', indicators: ['RSI', 'MACD', 'BB'] }); console.log(analysis); // Output: { trend: 'bullish', confidence: 0.85, signals: [...] } // 5. Handle MCP servers const mcpServer = await registry.mcpServers.connect('financial-data'); const price = await mcpServer.tools.getCurrentPrice({ symbol: 'SOL' }); ``` -------------------------------- ### Exploring MCP Servers: The Power Behind AI Source: https://github.com/opensvm/aeamcp/blob/main/docs/ONBOARDING_CONTENT_SPECIFICATIONS.md This section explains what MCP servers are, the tools and data they provide (web/API tools, data sources, specialized tools, smart prompts), and how AI agents utilize them indirectly. It also includes an example flow demonstrating an AI agent's interaction with an MCP server. ```markdown # 🔧 MCP Servers: The Power Behind AI **MCP servers** provide the tools and data that make AI agents incredibly capable: ## What MCP Servers Provide: ### 🌐 Web & API Tools - **Search Engines**: Advanced web search and information retrieval - **Social Media**: Twitter, LinkedIn, Instagram integration - **E-commerce**: Product search, price comparison, reviews ### 📊 Data Sources - **Financial Data**: Real-time market data, economic indicators - **News Feeds**: Breaking news, industry updates, sentiment analysis - **Weather**: Global weather data, forecasts, historical trends ### 🎯 Specialized Tools - **Image Processing**: Photo editing, enhancement, analysis - **Language Translation**: 100+ languages, context-aware - **Document Processing**: PDF parsing, OCR, format conversion ### 💡 Smart Prompts - **Industry Templates**: Finance, healthcare, legal, marketing - **Task-Specific**: Analysis, writing, creative, technical - **Multi-language**: Prompts optimized for different languages ## Behind the Scenes: You don't interact with MCP servers directly - **AI agents use them** to provide you with better, more accurate, and more comprehensive services. ``` ```text You: "What's the weather like for my trip to Tokyo next week?" ↓ AI Agent: Connects to weather MCP server ↓ MCP Server: Fetches Tokyo weather forecast ↓ AI Agent: "Next week in Tokyo will be mostly sunny with temperatures between 18-24°C. Pack light layers and maybe a light jacket for evenings. Tuesday might have some rain." ``` -------------------------------- ### RPC Configuration Example for Local Development Source: https://github.com/opensvm/aeamcp/blob/main/frontend/RPC_CONFIGURATION_CONSOLIDATION_ISSUES.md This snippet provides an example `.env.local` configuration for RPC settings tailored for local development. It sets the Solana network to `devnet`, specifies a public RPC endpoint, and defines a request timeout, facilitating easy setup for developers. ```bash # .env.local NEXT_PUBLIC_SOLANA_NETWORK=devnet NEXT_PUBLIC_RPC_ENDPOINT=https://api.devnet.solana.com NEXT_PUBLIC_RPC_TIMEOUT=30000 ``` -------------------------------- ### Connect to MCP Server and Discover Tools (TypeScript) Source: https://github.com/opensvm/aeamcp/blob/main/docs/ONBOARDING_CONTENT_SPECIFICATIONS.md This TypeScript snippet demonstrates how to connect to a financial data MCP server, discover its available tools, and then use a specific tool like `getStockPrice` to retrieve real-time financial data. It showcases the interaction flow with the MCP server. ```typescript // Connect to financial data MCP server const financeServer = await registry.mcpServers.connect('financial-data-pro'); // Discover available tools const tools = await financeServer.listTools(); console.log(tools.map(t => t.name)); // Output: ['getStockPrice', 'getMarketCap', 'calculateRSI', 'getNews'] // Use a tool const solPrice = await financeServer.tools.getStockPrice({ symbol: 'SOL', currency: 'USD' }); console.log(`Current SOL price: $${solPrice.price}`); // Output: $23.45 ``` -------------------------------- ### Troubleshoot Repository Cloning Failures Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md Commands to diagnose issues with repository cloning. This includes checking available disk space, verifying Git installation, and manually testing a clone operation to isolate the problem. ```bash # Check disk space df -h /tmp/git-analysis # Verify git installation git --version # Test git clone manually git clone --depth=1 https://github.com/user/repo.git /tmp/test-clone ``` -------------------------------- ### Initialize SDK with $SVMAI Wallet and Automatic Payments (TypeScript) Source: https://github.com/opensvm/aeamcp/blob/main/docs/ONBOARDING_CONTENT_SPECIFICATIONS.md This TypeScript example illustrates how to initialize the Solana AI Registries SDK with a user's wallet and $SVMAI token account. It demonstrates automatic payment handling when calling an agent, where the cost is deducted from the $SVMAI balance. ```typescript // Initialize with $SVMAI wallet integration const registry = new SolanaAIRegistries({ network: 'mainnet-beta', wallet: yourWallet, tokenAccount: svmaiTokenAccount }); // Automatic payment handling const response = await registry.agents.call('trading-bot-pro', { action: 'analyze_market', symbols: ['SOL', 'BTC', 'ETH'] }); // Payment automatically deducted from $SVMAI balance // Cost: 0.05 $SVMAI (~$0.12 USD) ``` -------------------------------- ### Example Format for Reference Documentation Tasks Source: https://github.com/opensvm/aeamcp/blob/main/docs/sdk_refs/README.md Illustrates the standard structure for individual tasks within the Solana AI Registries SDK reference documents, detailing how task titles, acceptance criteria, and relevant references are presented. ```markdown ### 1.1 Implement feature - **Criterion description:** Specific, measurable requirement. **Reference:** [Link to docs], [Link to code] ``` -------------------------------- ### SDK Integration Walkthrough: Solana AI Registries TypeScript SDK Source: https://github.com/opensvm/aeamcp/blob/main/docs/DYNAMIC_ONBOARDING_IMPLEMENTATION_PLAN.md This snippet demonstrates how to initialize the Solana AI Registries SDK in TypeScript, find AI agents by skill, and connect to an MCP server. It shows basic usage for integrating with the platform's features. ```typescript import { SolanaAIRegistries } from '@solana-ai/registries-sdk'; const registry = new SolanaAIRegistries({ network: 'devnet', wallet: yourWallet }); // Find agents by skill const tradingAgents = await registry.agents.findBySkill('trading'); // Connect to MCP server const dataServer = await registry.mcpServers.connect('financial-data-server'); ``` -------------------------------- ### Welcome AI Service Provider: Decentralized AI Marketplace Opportunity Source: https://github.com/opensvm/aeamcp/blob/main/docs/ONBOARDING_CONTENT_SPECIFICATIONS.md This section introduces the decentralized AI marketplace, highlighting opportunities for AI service providers such as global reach, direct monetization, blockchain verification, community growth, and reputation. It also includes success stories and market opportunity statistics, along with a revenue calculator widget. ```markdown # 💼 Welcome, AI Service Provider! Turn your AI capabilities into a **thriving business** on the world's first decentralized AI marketplace. ## Your Opportunity: - 🌍 **Global Reach**: Access developers and users worldwide - 💰 **Direct Monetization**: Keep 95% of revenue (5% platform fee) - 🔒 **Blockchain Verification**: Build trust through cryptographic proof - 📈 **Community Growth**: Benefit from network effects - 🏆 **Reputation System**: Success breeds more success ## Success Stories: > **"DataFlow Analytics"** - Went from 0 to $50K/month in 6 months > > **"CreativeBot Studio"** - Serves 5,000+ users with 99.8% satisfaction > > **"TradingEdge AI"** - Manages $2M+ in automated trading strategies ## Market Opportunity: - 📊 **$150B+ AI market** growing 25% annually - 🚀 **Early adopter advantage** in decentralized AI - 💎 **Premium positioning** through blockchain verification - 🌐 **Global accessibility** without traditional barriers **Ready to showcase your AI innovations to the world?** ``` ```text ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ``` -------------------------------- ### GitHub Apps Authentication Setup Source: https://github.com/opensvm/aeamcp/blob/main/docs/GIT_REGISTRATION_GITHUB_ISSUES.md Set up GitHub Apps authentication system for accessing both public and private repositories. This involves creating the app, implementing OAuth, securely storing credentials, handling webhooks, supporting different installation levels, and managing tokens and rate limits. ```APIDOC Acceptance Criteria: - Create GitHub App with appropriate permissions (repository:read, metadata:read) - Implement OAuth flow for GitHub Apps installation - Store and encrypt GitHub App credentials securely - Handle installation/uninstallation webhooks - Support organization-level and user-level installations - Implement token refresh mechanism - Add rate limiting for GitHub API calls Technical Requirements: - Use GitHub Apps v4 API - Store encrypted tokens in database - Implement proper error handling for auth failures - Support multiple GitHub organizations per user Testing Criteria: - Can authenticate with GitHub Apps - Can access private repositories after installation - Token refresh works correctly - Rate limiting prevents API abuse - Error handling works for invalid tokens ``` -------------------------------- ### AI Marketplace: Welcome Section Primary Content Specification Source: https://github.com/opensvm/aeamcp/blob/main/docs/ONBOARDING_CONTENT_SPECIFICATIONS.md Defines the main textual and structural content for the 'Welcome to the AI Marketplace!' hero section, including a headline, description, key features, and popular use cases, all formatted in Markdown. ```markdown # 🌟 Welcome to the AI Marketplace! Discover **powerful AI agents and services**, all verified and accessible through blockchain technology. ## What you can do here: - 🤖 **Find AI Agents**: Specialized assistants for any task - 🔧 **Access Tools**: Professional-grade AI capabilities - 💰 **Use $SVMAI**: Native tokens for premium features - 🗳️ **Shape the Future**: Help govern the platform ## No technical knowledge required! Just connect your wallet and start exploring the future of AI. ### Popular Use Cases: - 📈 **Trading**: AI-powered market analysis and automation - ✍️ **Content**: Writing, editing, and creative assistance - 🎨 **Creative**: Art generation, music, and design - 📊 **Analysis**: Data processing and insights ``` -------------------------------- ### Integrate Onboarding System into React App Source: https://github.com/opensvm/aeamcp/blob/main/frontend/components/onboarding/README.md Demonstrates how to integrate the OnboardingProvider and OnboardingManager into a React application's main layout for automatic tour initiation on first visit. ```tsx import { OnboardingProvider, OnboardingManager } from '@/components/onboarding'; function App() { return ( ); } ``` -------------------------------- ### Find Trading Agents in Registry (TypeScript) Source: https://github.com/opensvm/aeamcp/blob/main/docs/ONBOARDING_CONTENT_SPECIFICATIONS.md Demonstrates how to search for qualified AI agents in the decentralized registry based on skills, uptime, latency, and price range. This interactive example shows how to use the `registry.agents.find` method to discover and filter agents, providing a practical illustration of agent discovery and integration. ```typescript const tradingAgents = await registry.agents.find({ skills: ['market-analysis', 'risk-assessment'], minUptime: 99.5, maxLatency: 200, priceRange: { min: 0, max: 0.1 } // $SVMAI per request }); console.log(`Found ${tradingAgents.length} qualified agents`); // Output: Found 12 qualified agents ``` -------------------------------- ### APIDOC: Agent Endpoint Configuration Examples Source: https://github.com/opensvm/aeamcp/blob/main/frontend/public/aeamcp.html Illustrative examples of how `ServiceEndpoint` configurations might appear for different agents, demonstrating various protocols and the default endpoint designation. ```APIDOC Agent_Alpha_Trader: - Endpoint 1 (Default): - Protocol: `a2a_http_rpc_v1.0` - URL: `https://alpha.agent.ai/a2a` - Endpoint 2: - Protocol: `price_stream_ws_v2` - URL: `wss://alpha.agent.ai/prices` Agent_Beta_Analyst: - Endpoint 1 (Default): - Protocol: `fetch_aea_p2p_node` - URL: `beta.aea.network:11001` ``` -------------------------------- ### Build All Project Programs Source: https://github.com/opensvm/aeamcp/blob/main/docs/PHASE2_DEPLOYMENT_PLAN.md This command executes the build script to compile all programs within the project. It's the first step required before deploying the updated registries. ```bash ./scripts/build.sh ``` -------------------------------- ### TypeScript: Example Optimized RPC Call with Deduplication and Prioritization Source: https://github.com/opensvm/aeamcp/blob/main/frontend/RPC_OPTIMIZATION_COMPLETE.md This example demonstrates how to make an RPC call using the enhanced `rpcConnectionManager`, specifying high priority, method and parameters for deduplication, and enabling the deduplication feature. ```typescript // Example optimized RPC call const result = await rpcConnectionManager.executeWithRetry( async (connection) => connection.getAccountInfo(pubkey), { priority: RequestPriority.HIGH, method: 'getAccountInfo', params: [pubkey.toBase58(), { commitment: 'confirmed' }], enableDeduplication: true, timeout: 15000 } ); ``` -------------------------------- ### AI Marketplace: Understanding AI Agents Primary Content Specification Source: https://github.com/opensvm/aeamcp/blob/main/docs/ONBOARDING_CONTENT_SPECIFICATIONS.md Outlines the main content for the 'What Are AI Agents?' section, detailing their concept, popular categories (Trading & Finance, Content & Writing, Creative & Design, Data & Analysis), and a step-by-step guide on how to use them. ```markdown # 🤖 What Are AI Agents? Think of AI agents as **specialized digital assistants** that excel at specific tasks: ## Popular Agent Categories: ### 📈 Trading & Finance - **Market Analysis**: Real-time market insights and predictions - **Portfolio Management**: Automated rebalancing and optimization - **Risk Assessment**: Comprehensive risk analysis and alerts ### ✍️ Content & Writing - **Article Writing**: Blog posts, news articles, technical documentation - **Social Media**: Engaging posts, captions, and community management - **Copywriting**: Marketing copy, product descriptions, email campaigns ### 🎨 Creative & Design - **Art Generation**: Custom artwork, logos, and visual content - **Music Composition**: Original music for videos, games, and media - **Video Editing**: Automated editing, effects, and post-production ### 📊 Data & Analysis - **Business Intelligence**: KPI tracking, trend analysis, reporting - **Research**: Market research, competitive analysis, data mining - **Automation**: Workflow automation, task scheduling, integration ## How It Works: 1. **Browse**: Explore agents by category or search for specific skills 2. **Review**: Check ratings, pricing, and capabilities 3. **Connect**: Link your wallet for secure access 4. **Use**: Interact with agents through simple interfaces 5. **Pay**: Transparent pricing with $SVMAI tokens ``` -------------------------------- ### Example MCP Server Service Endpoint URL Source: https://github.com/opensvm/aeamcp/blob/main/frontend/public/aeamcp.html A concrete example of a primary service endpoint URL for an MCP Server, illustrating the required HTTPS protocol and typical path for JSON-RPC 2.0 API access. ```URL https://mcp.kb-prime.com/api/v1/rpc ``` -------------------------------- ### Build Solana Programs with Docker for GLIBC Compatibility Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_GUIDE.md This Dockerfile sets up an Ubuntu 22.04 environment with Rust and Solana CLI, then builds the `agent-registry` and `mcp-server-registry` programs. The subsequent `docker build` and `docker run` commands execute the build process, mounting the target directory for output, effectively bypassing local GLIBC issues. ```bash cat > Dockerfile << EOF FROM ubuntu:22.04 RUN apt-get update && apt-get install -y \ curl \ build-essential \ pkg-config \ libudev-dev \ llvm \ libclang-dev # Install Rust RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" # Install Solana CLI RUN sh -c "$(curl -sSfL https://release.solana.com/v1.18.18/install)" ENV PATH="/root/.local/share/solana/install/active_release/bin:${PATH}" WORKDIR /workspace COPY . . RUN cargo build-sbf --manifest-path programs/agent-registry/Cargo.toml RUN cargo build-sbf --manifest-path programs/mcp-server-registry/Cargo.toml EOF docker build -t solana-ai-registries . docker run --rm -v $(pwd)/target:/workspace/target solana-ai-registries ``` -------------------------------- ### GitHub App Authentication API Endpoints Source: https://github.com/opensvm/aeamcp/blob/main/docs/PHASE1_EXECUTION_PLAN.md Defines the REST API endpoints for managing GitHub App installations and authentication. These endpoints handle the initial installation, OAuth callbacks, token refreshing, and listing accessible repositories for a user. ```APIDOC POST /api/v1/auth/github/install // Handle GitHub App installation GET /api/v1/auth/github/callback // OAuth callback POST /api/v1/auth/github/refresh // Refresh installation token GET /api/v1/auth/github/repos // List accessible repositories ``` -------------------------------- ### API Reference: GET /api/v1/git/analysis/:repoId Response Body Source: https://github.com/opensvm/aeamcp/blob/main/backend/README.md This section outlines the comprehensive JSON response body for the `GET /api/v1/git/analysis/:repoId` endpoint. It provides the `repoId`, the `status` of the analysis (e.g., 'completed'), detailed `analysis` results including MCP metadata and production readiness scores, and `formData` for registration. ```APIDOC GET /api/v1/git/analysis/:repoId Get analysis status and results. Response: { "repoId": "uuid-v4", "status": "completed", "analysis": { "mcpType": "server", "metadata": { "name": "weather-server", "tools": [...], "resources": [...], "prompts": [...] }, "productionReadiness": { "overall": 85, "isProductionReady": true, "recommendations": [...] } }, "formData": { "serverId": "weather-server", "name": "Weather MCP Server", "capabilities": { "supportsTools": true, "supportsResources": true, "supportsPrompts": false } } } ``` -------------------------------- ### Example DOS Command Line and Real-time Statistics Output Source: https://github.com/opensvm/aeamcp/blob/main/docs/DOS_STATUS_BAR_DEMO.html This snippet provides examples of command line prompts and real-time statistical output, simulating the data displayed within the DOS-style status bar. It shows network status (DEVNET, block count, latency, TPS) and protocol statistics (agents, MCP, transactions, success rate). ```Plain Text C:\AEAMCP> NET: DEVNET ● BLK:285,432,156 45MS TPS:2847 AGT: 18/24 MCP: 9/12 TXN: 1,247 SUC: 94.2% ``` -------------------------------- ### Build Programs for Solana AI Registries Source: https://github.com/opensvm/aeamcp/blob/main/docs/IMPLEMENTATION_SUMMARY.md This command executes the build script for the project, preparing the programs for deployment. It's the first step in the deployment process, ensuring all necessary components are compiled and ready. ```Shell ./scripts/build.sh ``` -------------------------------- ### MCP Server Provider Workflow on AEAMCP Source: https://github.com/opensvm/aeamcp/blob/main/frontend/README.md Step-by-step guide for MCP server providers to register their servers on the AEAMCP Solana registry. ```APIDOC For MCP Server Providers: 1. Connect Wallet: Connect your Solana wallet 2. Stake Tokens: Stake $SVMAI tokens for server registration 3. Define Capabilities: Specify tools, resources, and prompts offered 4. Register Server: Submit server details and endpoints 5. Serve Community: Provide valuable AI services to the ecosystem ``` -------------------------------- ### Dynamically Create Documentation Navigation Sidebar in JavaScript Source: https://github.com/opensvm/aeamcp/blob/main/frontend/public/docs.html This code snippet dynamically populates a navigation sidebar element (`doc-nav`) with links for both main documentation files and tutorial book chapters. Each link is configured to load the corresponding markdown content and update the navigation state upon a click event, enhancing user interaction. ```JavaScript // Create navigation sidebar const docNav = document.getElementById('doc-nav'); // Add main documentation files docFiles.forEach(doc => { const li = document.createElement('li'); const a = document.createElement('a'); a.href = `#${doc.id}`; a.dataset.path = doc.path; a.className = 'block p-2 hover:bg-neutral-200 rounded focus:outline-none focus:ring-2 focus:ring-neutral-400'; a.innerText = doc.name; a.setAttribute('role', 'menuitem'); a.addEventListener('click', (e) => { e.preventDefault(); loadMarkdown(doc.path); currentBookChapter = null; // Reset book chapter tracking updateNavigationState(a); window.location.hash = doc.id; }); li.appendChild(a); docNav.appendChild(li); }); // Add separator for book section const separator = document.createElement('li'); separator.innerHTML = '

📚 Tutorial Book

'; docNav.appendChild(separator); // Add book chapters bookChapters.forEach(chapter => { const li = document.createElement('li'); const a = document.createElement('a'); a.href = `#${chapter.id}`; a.dataset.path = chapter.path; a.dataset.chapter = chapter.chapter; a.className = 'block p-2 hover:bg-neutral-200 rounded book-chapter focus:outline-none focus:ring-2 focus:ring-neutral-400'; a.innerText = chapter.name; a.setAttribute('role', 'menuitem'); a.addEventListener('click', (e) => { e.preventDefault(); loadBookChapter(chapter); updateNavigationState(a); window.location.hash = chapter.id; }); li.appendChild(a); docNav.appendChild(li); }); ``` -------------------------------- ### AI Agent Developer Workflow on AEAMCP Source: https://github.com/opensvm/aeamcp/blob/main/frontend/README.md Step-by-step guide for AI agent developers to register their agents on the AEAMCP Solana registry. ```APIDOC For AI Agent Developers: 1. Connect Wallet: Connect your Solana wallet (Phantom, Solflare, etc.) 2. Stake $SVMAI: Stake required tokens to register your agent 3. Register Agent: Provide agent details, capabilities, and endpoints 4. Go Live: Your agent becomes discoverable in the registry 5. Earn Rewards: Receive $SVMAI tokens based on usage and ratings ``` -------------------------------- ### Perform Manual Health Check API Request Source: https://github.com/opensvm/aeamcp/blob/main/docs/DEPLOYMENT_AND_TESTING_GUIDE.md cURL command to manually test the health endpoint of the AEAMCP Git Registration Backend. ```bash curl http://localhost:3001/health ``` -------------------------------- ### Updating Agent Status in Solana Agent Registry Source: https://github.com/opensvm/aeamcp/blob/main/README.md Shows how to create an `AgentRegistryInstruction::UpdateAgentStatus` instruction to change the status of an existing agent, for example, setting it to 'Active'. ```Rust let update_instruction = AgentRegistryInstruction::UpdateAgentStatus { new_status: AgentStatus::Active as u8, }; ``` -------------------------------- ### Import and Initialize Solana AI Registries SDK Source: https://github.com/opensvm/aeamcp/blob/main/docs/ONBOARDING_I18N_SPECIFICATIONS.md Import the necessary classes, SolanaAIRegistries and WalletAdapter, from the SDK to begin interacting with the registry. This sets up the core components for agent discovery and connection. ```typescript import { SolanaAIRegistries, WalletAdapter } from '@solana-ai/registries-sdk'; ``` -------------------------------- ### View Program Build Results Source: https://github.com/opensvm/aeamcp/blob/main/docs/PHASE2_DEPLOYMENT_PLAN.md This snippet shows the successful compilation status of the core programs: aeamcp-common, svmai-token, solana-a2a (agent-registry), and solana-mcp (mcp-server-registry). It confirms that all components are ready for deployment. ```bash ✅ aeamcp-common v0.1.0 - compiled successfully ✅ svmai-token v0.1.0 - compiled successfully ✅ solana-a2a v0.1.0 (agent-registry) - compiled successfully ✅ solana-mcp v0.1.0 (mcp-server-registry) - compiled successfully ``` -------------------------------- ### Starting the Development Server Source: https://github.com/opensvm/aeamcp/blob/main/docs/ASCII_TRANSFORMATION_PROGRESS.md Command to activate the local development server, typically used in Node.js projects, making the application accessible at http://localhost:3000. ```Shell npm run dev ```