Initialize Configuration
Create the configuration directory and default config file:Expected output:This creates:
~/.openfang/config.toml— Main configuration~/.openfang/data/— Database and runtime data~/.openfang/agents/— Agent manifests (optional)
Set Up an API Key
OpenFang needs at least one LLM provider. Set an API key as an environment variable:Verify your setup:Expected output:
Add the export to your shell profile (
~/.bashrc, ~/.zshrc, etc.) to persist it across sessions.Start the Daemon
Launch the OpenFang daemon:Expected output: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
Spawn Your First Agent
OpenFang ships with 30 pre-built agent templates. Let’s spawn a simple agent:Expected output:List all running agents:Expected output:
The agent ID is generated automatically. You’ll use this ID to interact with the agent.
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
Need Help?
Full Installation Guide
Detailed instructions for all installation methods including Docker, Cargo, and platform-specific options.
