Documentation

Everything you need to build intelligent agents

Installation

Install the AgentForge SDK using pip:

bash
pip install agentforge

Or with npm:

bash
npm install @agentforge/sdk

Your First Agent

Create a simple agent that responds to user messages:

python
from agentforge import Agent

agent = Agent(
    name="hello-agent",
    model="gpt-4",
    instructions="You are a helpful assistant"
)

response = agent.chat("Hello, world!")
print(response.message)

Core Concepts

Agents

Agents are autonomous entities that can perform tasks, make decisions, and interact with users or other agents.

Tools

Tools are functions that agents can use to interact with external systems, like APIs, databases, or file systems.

Workflows

Workflows define how agents coordinate with each other to accomplish complex tasks.

API Reference

Agent Class

python
class Agent:
    def __init__(
        self,
        name: str,
        model: str = "gpt-4",
        instructions: str = "",
        tools: List[Tool] = []
    )
    
    def chat(self, message: str) -> Response:
        """Send a message to the agent"""
        
    def stream(self, message: str) -> Iterator:
        """Stream agent responses"""
        
    def deploy(self, scale: str = "auto"):
        """Deploy the agent"""

SDKs

AgentForge provides official SDKs for multiple languages:

  • Python - pip install agentforge
  • JavaScript/TypeScript - npm install @agentforge/sdk
  • Go - go get github.com/agentforge/go-sdk
  • Rust - cargo add agentforge

Examples

Check out our example projects:

Customer Support Bot

A multi-agent system for handling customer inquiries

View Code

Data Analysis Agent

Analyze data and generate insights automatically

View Code