Explore our growing ecosystem of DeAI applications in the awesome-aiforge repository.
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.
Need testnet tokens? Get free 0G testnet tokens from our faucet
Get the SDK and create your first project
# 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
Set up your agent configuration and API keys
// config/agent.js
export default {
name: "My Trading Bot",
type: "defi-trading",
networks: ["ethereum", "polygon"],
strategies: ["arbitrage", "yield-farming"],
riskLevel: "moderate",
maxInvestment: "1000 USDC"
}
Implement your agent's core functionality
// 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)
}
}
}
}
Launch your agent on the decentralized network
# Deploy your agent
aiforge deploy --network 0g-testnet
# Check deployment status
aiforge status
# View agent logs
aiforge logs --follow
Your AI agent is now deployed and running on the 0G Network. Here's how to verify it's working:
aiforge status
aiforge logs
aiforge dashboard
Learn advanced concepts like custom plugins, multi-agent coordination, and enterprise features.
Explore pre-built agent templates for trading, social media, research, and security use cases.
Join our community of developers building the future of decentralized AI: