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

Install OpenFang

Choose your platform:
curl -fsSL https://openfang.sh/install | sh
The installer downloads the latest CLI binary (~32MB) and adds it to your PATH.
Verify the installation:
openfang --version
Expected output:
openfang 0.3.25
2

Initialize Configuration

Create the configuration directory and default config file:
openfang init
Expected output:
Initializing OpenFang...
Created ~/.openfang/config.toml
Created ~/.openfang/data/
Created ~/.openfang/agents/

OpenFang initialized successfully!
This creates:
  • ~/.openfang/config.toml — Main configuration
  • ~/.openfang/data/ — Database and runtime data
  • ~/.openfang/agents/ — Agent manifests (optional)
3

Set Up an API Key

OpenFang needs at least one LLM provider. Set an API key as an environment variable:
export ANTHROPIC_API_KEY=sk-ant-...
Add the export to your shell profile (~/.bashrc, ~/.zshrc, etc.) to persist it across sessions.
Verify your setup:
openfang doctor
Expected output:
✓ Config file exists at ~/.openfang/config.toml
✓ API keys configured
✓ Toolchain available
All checks passed!
4

Start the Daemon

Launch the OpenFang daemon:
openfang start
Expected output:
Starting OpenFang daemon...
OpenFang daemon running on http://127.0.0.1:4200
Press Ctrl+C to stop.
The daemon provides:
  • REST API at http://127.0.0.1:4200/api/
  • WebSocket endpoint at ws://127.0.0.1:4200/api/agents/{id}/ws
  • WebChat UI at http://127.0.0.1:4200/
  • OFP P2P networking on port 4200
Open http://127.0.0.1:4200/ in your browser to access the dashboard UI.
5

Spawn Your First Agent

OpenFang ships with 30 pre-built agent templates. Let’s spawn a simple agent:
openfang agent spawn agents/hello-world/agent.toml
Expected output:
Agent spawned successfully!
  ID:   a1b2c3d4-e5f6-7890-abcd-ef1234567890
  Name: hello-world
The agent ID is generated automatically. You’ll use this ID to interact with the agent.
List all running agents:
openfang agent list
Expected output:
ID                                     NAME          STATE    PROVIDER  MODEL
----------------------------------------------------------------------------------
a1b2c3d4-e5f6-7890-abcd-ef1234567890  hello-world   Running  groq      llama-3.3-70b-versatile
6

Chat with Your Agent

Start an interactive chat session:
openfang chat hello-world
Expected output:
Chat session started (daemon mode). Type 'exit' or Ctrl+C to quit.

you> Hello! What can you do?

agent> I'm the hello-world agent running on OpenFang. I can:
- Read files from the filesystem
- List directory contents
- Fetch web pages

Try asking me to read a file or look up something on the web!

  [tokens: 142 in / 87 out | iterations: 1]

you> List the files in the current directory

agent> Here are the files in the current directory:
- Cargo.toml
- Cargo.lock
- README.md
- agents/
- crates/
- docs/
...

  [tokens: 89 in / 134 out | iterations: 1]

you> exit
Chat session ended.
You can also use openfang agent chat <agent-id> with the full agent ID, or just openfang chat to chat with the first available agent.
7

Activate an Autonomous Hand (Optional)

Hands are OpenFang’s autonomous capability packages that work for you without prompting.Activate the Researcher Hand:
openfang hand activate researcher
Expected output:
Hand 'researcher' activated successfully!
The Researcher Hand will now run autonomously based on its schedule.
Check the Hand’s status:
openfang hand status researcher
List all available Hands:
openfang hand list
Expected output:
Available Hands:
- clip       (Video processing: YouTube → vertical shorts)
- lead       (Lead generation and ICP scoring)
- collector  (OSINT intelligence gathering)
- predictor  (Superforecasting with confidence intervals)
- researcher (Deep research with citations)
- twitter    (Autonomous Twitter/X account management)
- browser    (Web automation with purchase approval gate)

What’s Next?

Explore Agent Templates

Browse the agents/ directory for 30 pre-built agents including coder, researcher, writer, ops, analyst, and security-auditor.

Set Up Channels

Connect your agents to 40 messaging platforms including Telegram, Discord, Slack, WhatsApp, and more.

Use Bundled Skills

60 expert knowledge skills are pre-installed covering GitHub, Docker, Kubernetes, security audit, and prompt engineering.

API Reference

Explore 140+ REST/WS/SSE endpoints, including an OpenAI-compatible /v1/chat/completions API.

Useful Commands

openfang init                          # Initialize ~/.openfang/
openfang start                         # Start the daemon
openfang status                        # Check daemon status
openfang doctor                        # Run diagnostic checks

openfang agent spawn <manifest.toml>   # Spawn an agent
openfang agent list                    # List all agents
openfang agent chat <id>               # Chat with an agent
openfang agent kill <id>               # Kill an agent

openfang hand activate <hand>          # Activate an autonomous Hand
openfang hand list                     # List available Hands
openfang hand status <hand>            # Check Hand status
openfang hand pause <hand>             # Pause a Hand

openfang chat [agent]                  # Quick chat (alias)
openfang migrate --from openclaw       # Migrate from OpenClaw

Need Help?

Full Installation Guide

Detailed instructions for all installation methods including Docker, Cargo, and platform-specific options.

Build docs developers (and LLMs) love