Skip to content

Latest commit

 

History

History
117 lines (83 loc) · 2 KB

File metadata and controls

117 lines (83 loc) · 2 KB

Getting Started

AgentForge SDK is a professional AI Agent development framework. This guide will help you get started quickly.

Prerequisites

  • Python 3.12 or newer
  • uv installed

Installation

Install uv

# Windows PowerShell
irm https://astral.sh/uv/install.ps1 | iex

# Linux/macOS
curl -LsSf https://astral.sh/uv/install.sh | sh

Install AgentForge

# Clone the repository
git clone https://github.com/AstroAir/agentforge.git
cd agentforge

# Install dependencies (including dev tools)
uv sync --all-groups

Optional Dependencies

# Full installation (FastAPI server)
uv pip install agentforge[full]

# Swarm features (Redis, monitoring)
uv pip install agentforge[swarm]

# Monitoring only
uv pip install agentforge[monitoring]

Quick Start

1. Initialize a new project

agentforge init my-agent
cd my-agent

2. Configure your agent

Edit agent.json:

{
    "id": "my-agent",
    "name": "My Agent",
    "version": "0.1.0",
    "model": {
        "provider": "anthropic",
        "name": "claude-sonnet-4-20250514",
        "parameters": {
            "temperature": 0.7
        }
    },
    "prompts": {
        "system": "You are a helpful AI assistant."
    }
}

3. Run the agent

# Interactive CLI
agentforge run

# With specific skills
agentforge run --skill web-search --skill code-analysis

4. Use programmatically

import asyncio
from agentforge import Agent

async def main():
    agent = Agent("agent.json")
    await agent.start()
    
    session = agent.create_session()
    
    async for chunk in session.stream("Hello!"):
        print(chunk, end="", flush=True)
    
    await agent.stop()

asyncio.run(main())

Run tests

uv run pytest -q

Next Steps