Getting Started with Agent Forge

Build your first AI agent in under 10 minutes. This guide will walk you through installation, setup, and creating your first working agent.

Prerequisites

  • • Python 3.8 or higher
  • • Basic knowledge of async/await patterns
  • • pip or poetry for package management

Step 1: Installation

Install Agent Forge using pip:

pip install agent-forge

Step 2: Create Your First Agent

Create a simple agent that extracts page titles:

from agent_forge import BaseAgent

class TitleExtractorAgent(BaseAgent):
    async def run(self, url: str) -> str:
        # Navigate to the URL
        page = await self.browser_client.navigate(url)

        # Extract the page title
        title = page.get('page_title', 'No title found')

        return f"Page title: {title}"

# Use your agent
async def main():
    agent = TitleExtractorAgent()
    result = await agent.run("https://example.com")
    print(result)

# Run it
import asyncio
asyncio.run(main())

Step 3: Run Your Agent

Save the code above as my_agent.py and run it:

python my_agent.py

You should see output like: Page title: Example Domain

🎉 Congratulations!

You've successfully created and run your first Agent Forge agent. Here's what to explore next: