AI Forge Documentation

Quick Start Guide

Build Your First AI Agent in 10 Minutes

This guide will take you from zero to a deployed AI trading agent in under 10 minutes. You'll learn the basics of AI Forge and deploy your first decentralized AI agent.

Beginner friendly
10 minutes to complete
Free to try

Before You Start

Requirements Checklist

Node.js 18+
MetaMask or compatible wallet
0G testnet tokens
Basic JavaScript knowledge

Need testnet tokens? Get free 0G testnet tokens from our faucet

What You'll Build

DeFi Trading Agent

  • Monitors DEX prices across multiple chains
  • Identifies arbitrage opportunities automatically
  • Executes profitable trades with risk management
  • Operates 24/7 on decentralized infrastructure

Step-by-Step Tutorial

1

Install AI Forge SDK

Get the SDK and create your first project

2 minutes
# Install the AI Forge SDK
npm install -g @aiforge/cli
npm install @aiforge/sdk

# Create a new project
aiforge init my-first-agent
cd my-first-agent
2

Configure Your Agent

Set up your agent configuration and API keys

3 minutes
// config/agent.js
export default {
  name: "My Trading Bot",
  type: "defi-trading",
  networks: ["ethereum", "polygon"],
  strategies: ["arbitrage", "yield-farming"],
  riskLevel: "moderate",
  maxInvestment: "1000 USDC"
}
3

Write Agent Logic

Implement your agent's core functionality

5 minutes
// src/agent.js
import { AIForge } from '@aiforge/sdk'

export class TradingAgent extends AIForge.Agent {
  async onStart() {
    console.log('Agent started successfully!')
    this.startPriceMonitoring()
  }

  async startPriceMonitoring() {
    // Monitor DEX prices for arbitrage opportunities
    const opportunities = await this.scanArbitrageOpportunities()
    
    for (const opportunity of opportunities) {
      if (opportunity.profitMargin > 0.02) { // 2% minimum profit
        await this.executeTrade(opportunity)
      }
    }
  }
}
4

Deploy to 0G Network

Launch your agent on the decentralized network

1 minute
# Deploy your agent
aiforge deploy --network 0g-testnet

# Check deployment status
aiforge status

# View agent logs
aiforge logs --follow

Testing Your Agent

Congratulations! 🎉

Your AI agent is now deployed and running on the 0G Network. Here's how to verify it's working:

Check Status

aiforge status

View Logs

aiforge logs

Monitor Dashboard

aiforge dashboard

What's Next?

Need Help?

Join our community of developers building the future of decentralized AI: