Skip to main content
This guide will get you from zero to a working OpenFang agent in under 5 minutes.

Prerequisites

  • An LLM API key (Anthropic, OpenAI, Groq, or Gemini)
  • Terminal access (macOS, Linux, or Windows PowerShell)
If you don’t have an API key yet, we recommend Groq for fast free inference, or Ollama for running models locally.

Installation

1

Install OpenFang

Verify the installation:
2

Initialize configuration

Run the interactive setup wizard:
The wizard will:
  • Create ~/.openfang/ directory
  • Generate a default config.toml
  • Prompt you to configure an LLM provider
Use openfang init --quick to skip the wizard and create a minimal config.
3

Configure your LLM provider

When prompted, choose your provider and paste your API key. The wizard supports:
  • Anthropic (Claude) - Recommended for production
  • OpenAI (GPT-4) - Widest compatibility
  • Groq - Fastest inference, generous free tier
  • Gemini - Google’s models
  • Ollama - Run models locally
Example for Anthropic:
The wizard will test your API key and save it to ~/.openfang/config.toml.
If you prefer to configure manually, edit ~/.openfang/config.toml:
config.toml
Then set your API key as an environment variable:
4

Start the daemon

Start the OpenFang daemon:
The daemon will:
  • Boot the kernel and load all subsystems
  • Start the HTTP API server on http://127.0.0.1:4200
  • Initialize the memory substrate (SQLite)
  • Connect to configured channel adapters
Verify the daemon is running:
Expected output:
5

Spawn your first agent

Create an agent using the researcher template:
The CLI will:
  1. Show you the template’s manifest
  2. Prompt for a name (default: “researcher”)
  3. Create and spawn the agent
Example session:
6

Chat with your agent

Start an interactive chat session:
Try asking a research question:
Type /help to see available chat commands, or /stop to end the conversation.

What You’ve Built

You now have:
  • ✅ OpenFang daemon running
  • ✅ HTTP API accessible at http://127.0.0.1:4200
  • ✅ A researcher agent with web search capabilities
  • ✅ SQLite memory for conversation persistence

Next Steps

Web Dashboard

Open the built-in dashboard to manage agents visually

Create Custom Agents

Build agents with custom tools and prompts

Autonomous Hands

Activate pre-built Hands that work for you 24/7

Connect to Telegram

Deploy your agent to messaging platforms

Try the Dashboard

Open your browser to http://127.0.0.1:4200 to access the WebChat UI:
  1. Chat Interface - Message agents with real-time streaming
  2. Agent List - View all spawned agents and their status
  3. Memory Browser - Explore conversation history
  4. System Status - Monitor token usage and costs

Quick Commands Reference

Activate an Autonomous Hand

Hands are pre-built autonomous agents that run on schedules. Try the Researcher Hand:
The Researcher Hand will:
  • Run daily at a configured time
  • Research topics you assign
  • Build a knowledge graph of findings
  • Deliver reports to your configured channel (Telegram, Discord, etc.)
View active Hands:

Troubleshooting

The installer adds ~/.openfang/bin/ to your PATH, but your shell may need to be restarted:
Or use the full path: ~/.openfang/bin/openfang
Test your API key configuration:
If it fails, reconfigure:
Change the listen address in ~/.openfang/config.toml:
Then restart: openfang stop && openfang start
Run diagnostics:
Check logs:

What’s Next?

Full Installation Guide

Advanced installation options, Docker Compose, systemd services

Configuration

Configure models, channels, security, and memory

Core Concepts

Understand the 14-crate architecture

API Reference

Integrate OpenFang programmatically