OpenFang
The OpenFang runtime — Rust-based agent with REST API, Ollama fallback, and ffmpeg on agentstead.dev.
OpenFang is a Rust-based agent runtime with a REST API surface. It's the right choice when you want an API-oriented interface, a lightweight default configuration without requiring an upstream provider key, or media processing capabilities via ffmpeg.
Port: 4200 | Token type: API Key | Best for: API-oriented workflows, media processing, Rust tooling
What starts on boot
- Homebrew seeding — same as all runtimes, seeds to
/data/homebrewon first boot. - OpenFang init — runs once on first boot:
openfang init --quickinitialises~/.openfang/. - Chrome with CDP — starts on port
9222for browser automation. - OpenFang daemon — starts on port
4200, bound to0.0.0.0. Auto-restarts on crash.
No provider key required
OpenFang defaults to Ollama with llama3.2:3b as its provider — so the agent starts and the API works without any upstream API key. You can add provider keys to use hosted models instead.
The Ollama default gives you a working agent out of the box, but responses will be limited by the llama3.2:3b model. Add a provider key for production-quality results.
Configuration
OpenFang config lives in ~/.openfang/:
| File | Purpose |
|---|---|
~/.openfang/config.toml | Provider and model selection |
~/.openfang/.env | API keys (auto-populated from Secrets) |
Default config.toml:
[default_model]
provider = "ollama"
model = "llama3.2:3b"API key injection
Add any of these to Secrets in the dashboard — they're written to ~/.openfang/.env on every boot:
| Secret name | Provider |
|---|---|
OPENROUTER_API_KEY | OpenRouter |
ANTHROPIC_API_KEY | Anthropic (Claude) |
OPENAI_API_KEY | OpenAI |
GROQ_API_KEY | Groq |
GEMINI_API_KEY | Google Gemini |
MISTRAL_API_KEY | Mistral |
Getting started
Deploy and wait for ONLINE
OpenFang is ready as soon as the agent shows ONLINE — no API key needed to start.
Find your API key
Open the agent → Access & Credentials → copy the API Key (this is your OpenFang authentication token). Your public URL is also here.
Make an API call
curl https://your-agent.eu2.agentstead.dev/api/chat \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"message": "Hello"}'Add a provider key (optional)
To use a hosted model instead of the Ollama fallback, add a key to Secrets, restart the agent, and update config.toml in the desktop terminal:
[default_model]
provider = "anthropic"
model = "claude-3-5-sonnet-20241022"ffmpeg
OpenFang is the only runtime that includes ffmpeg pre-installed. This makes it well-suited for:
- Video transcoding and processing pipelines
- Audio extraction and manipulation
- Streaming media workflows
- Any agent that handles video or audio files
ffmpeg -version
# ffmpeg version 6.x...
# Example: extract audio from video
ffmpeg -i input.mp4 -vn -acodec copy output.aacAI coding tools
OpenFang includes the same AI coding tools as all other runtimes. See Pre-installed Tools:
Claude Code
claude — set ANTHROPIC_API_KEY in Secrets.
Codex
codex — set OPENAI_API_KEY in Secrets.
OpenCode
opencode — multi-provider TUI.
VS Code + Kilo Code
Pre-installed with Kilo Code extension.