Introduction
"The Agent Operating System — not a chatbot framework, not a Python wrapper around an LLM, not a 'multi-agent orchestrator.'"
This is Part 42 of the "One Open Source Project a Day" series. Today's project is OpenFang (GitHub).
Traditional agent frameworks wait for you to type something. OpenFang is an open-source Agent Operating System built from scratch in Rust by RightNow-AI: runs autonomous agents that work for you — on schedules, 24/7, building knowledge graphs, monitoring targets, generating leads, managing your social media, and reporting results to your dashboard. The entire system compiles to a single ~32MB binary. One install, one command, your agents are live. Built-in 7 Hands (autonomous capability packages), 16 security layers, 40 channel adapters, 27 LLM providers, cold start <200ms, idle memory ~40MB.
Why it matters:
- 🦀 Built in Rust: 137K LOC, 14 crates, 1,767+ tests, zero clippy warnings
- 🤖 Autonomous Hands: 7 built-in Hands (Clip, Lead, Collector, Predictor, Researcher, Twitter, Browser) that work on schedules without prompts
- 🔒 16 Security Layers: WASM dual-metered sandbox, Merkle audit chain, information flow taint tracking, Ed25519 signatures, and more
- 🌐 40 Channel Adapters: Telegram, Discord, Slack, WhatsApp, Signal, Matrix, Email, Teams, LINE, Mastodon, and more
- 🚀 High Performance: Cold start <200ms, idle memory 40MB, install size 32MB
- 📊 OpenAI-Compatible API: 140+ REST/WS/SSE endpoints, drop-in replacement for existing tools
What You'll Learn
- OpenFang's positioning and "Agent OS" design philosophy
- Hands mechanism: How autonomous capability packages work (HAND.toml, System Prompt, SKILL.md, Guardrails)
- Implementation details of the 16 security layers
- Architecture design: 14 Rust crates modular kernel
- Performance and feature comparison with OpenClaw, ZeroClaw, CrewAI, LangGraph
- Quick start: Installation, initialization, activating Hands, chatting with agents
Prerequisites
- Basic understanding of AI agents
- Familiarity with Rust is helpful (optional)
- Basic knowledge of security systems, sandboxes, audit trails (optional)
Project Background
Project Overview
OpenFang is an open-source Agent Operating System built from scratch in Rust. It is not a chatbot framework, not a Python wrapper around an LLM, not a "multi-agent orchestrator" — it is a complete operating system for autonomous agents.
Core Features:
- Autonomous Operation: Agents work on schedules, 24/7, without human intervention
- Single Binary: Entire system compiles to a single ~32MB executable
- Built-in Capabilities: 7 Hands (autonomous capability packages) out of the box
- Enterprise Security: 16 independent security layers, defense in depth
- Multi-Channel Support: 40 messaging channel adapters, covering major platforms
- Multi-Model Support: 27 LLM providers, 123+ models
Core Problems Solved:
- Traditional agent frameworks require manual input and cannot work autonomously
- Lack of enterprise-grade security mechanisms, unsuitable for production
- Lack of pre-built autonomous capability packages, requiring development from scratch
- Performance issues: slow cold start, high memory usage
- Lack of multi-channel and multi-model support
Target Users:
- Developers who need autonomous agents to automatically execute tasks
- Production environment users requiring enterprise-grade security
- Teams needing multi-channel and multi-model support
- Users migrating from OpenClaw and similar systems
- Learners interested in Rust and systems programming
Author/Team
- Team: RightNow-AI (GitHub)
- Founder: Jaber (Founder of RightNow)
- Philosophy: Build truly autonomous, secure, high-performance Agent Operating System
- Website: openfang.sh
Project Statistics
- ⭐ GitHub Stars: ~10.9k
- 🍴 Forks: ~1.2k
- 📦 Version: v0.3.24 (actively maintained, 62+ commits)
- 📄 License: MIT / Apache-2.0 (dual license)
- 🌐 Website: openfang.sh
- 💬 Community: Discord, Twitter/X
- 📚 Documentation: Documentation, Quick Start
Tech Stack:
- Language: Rust (87.8%), HTML/JavaScript/CSS (minor)
- Architecture: 14 Rust crates, modular kernel design
- Desktop App: Tauri 2.0
- Codebase: 137,728 lines of code, 1,767+ tests
Core Features
Core Purpose
OpenFang's core purpose is to provide a complete Agent Operating System that enables agents to:
- Work Autonomously: Run on schedules, 24/7, without human intervention
- Execute Multiple Tasks: Build knowledge graphs, monitor targets, generate leads, manage social media, and more
- Secure and Reliable: 16 security layers, suitable for production environments
- Multi-Channel Access: Connect to various platforms through 40 adapters
- Multi-Model Support: 27 LLM providers with intelligent routing and fallback
Use Cases
-
Automated Content Creation
- Clip Hand: Automatically download YouTube videos, identify best moments, create vertical shorts with captions and thumbnails, publish to Telegram/WhatsApp
-
Lead Generation and Scoring
- Lead Hand: Runs daily, discovers prospects matching ICP, enriches with web research, scores 0-100, deduplicates, outputs qualified leads
-
Intelligence Collection and Monitoring
- Collector Hand: OSINT-grade intelligence, continuously monitors targets (companies, people, topics), change detection, sentiment tracking, knowledge graph construction, critical alerts
-
Prediction and Reasoning
- Predictor Hand: Superforecasting engine, collects signals from multiple sources, builds calibrated reasoning chains, makes predictions with confidence intervals, tracks accuracy using Brier scores
-
Deep Research
- Researcher Hand: Autonomous deep researcher, cross-references multiple sources, evaluates credibility using CRAAP criteria, generates cited reports with APA formatting, supports multiple languages
-
Social Media Management
- Twitter Hand: Autonomous Twitter/X account manager, creates content in 7 rotating formats, schedules posts for optimal engagement, responds to mentions, tracks performance metrics
-
Web Automation
- Browser Hand: Web automation agent, navigates sites, fills forms, clicks buttons, handles multi-step workflows, mandatory purchase approval gate
Quick Start
Installation (macOS/Linux):
# One-line install
curl -fsSL https://openfang.sh/install | sh
# Initialize (guided provider setup)
openfang init
# Start daemon
openfang start
# Dashboard live at http://localhost:4200Windows (PowerShell):
irm https://openfang.sh/install.ps1 | iex
openfang init
openfang startActivate Hands:
# Activate Researcher Hand — starts working immediately
openfang hand activate researcher
# Check progress
openfang hand status researcher
# Activate Lead Hand on daily schedule
openfang hand activate lead
# Pause without losing state
openfang hand pause lead
# List all available Hands
openfang hand listChat with Agents:
# Chat with Researcher agent
openfang chat researcher
> "What are the emerging trends in AI agent frameworks?"
# Spawn pre-built agent
openfang agent spawn coderKey Features
-
Hands (Autonomous Capability Packages)
- 7 built-in Hands: Clip, Lead, Collector, Predictor, Researcher, Twitter, Browser
- Each Hand includes: HAND.toml (manifest), System Prompt (500+ word expert procedures), SKILL.md (domain expertise), Guardrails (approval gates)
- Compiled into binary, no downloading or installation needed
-
16 Security Layers
- WASM dual-metered sandbox, Merkle hash-chain audit, information flow taint tracking, Ed25519 signed manifests, SSRF protection, secret zeroization, OFP mutual authentication, capability gates, security headers, health endpoint redaction, subprocess sandbox, prompt injection scanner, loop guard, session repair, path traversal prevention, GCRA rate limiter
-
40 Channel Adapters
- Core: Telegram, Discord, Slack, WhatsApp, Signal, Matrix, Email
- Enterprise: Teams, Mattermost, Google Chat, Webex, Feishu/Lark, Zulip
- Social: LINE, Viber, Facebook Messenger, Mastodon, Bluesky, Reddit, LinkedIn, Twitch
- Community: IRC, XMPP, Guilded, Revolt, Keybase, Discourse
- Privacy: Threema, Nostr, Mumble, Nextcloud Talk, Rocket.Chat, Ntfy, Gotify
- Workplace: Pumble, Flock, Twist, DingTalk, Zalo, Webhooks
-
27 LLM Providers
- 3 native drivers (Anthropic, Gemini, OpenAI-compatible) route to 27 providers
- Support 123+ models, intelligent routing, automatic fallback, cost tracking, per-model pricing
-
High Performance
- Cold start <200ms (vs OpenClaw ~6s, CrewAI ~3s)
- Idle memory 40MB (vs OpenClaw 394MB, CrewAI 200MB)
- Install size 32MB (vs OpenClaw 500MB, CrewAI 100MB)
-
OpenAI-Compatible API
- 140+ REST/WS/SSE endpoints
- Drop-in replacement for existing tools, no code changes needed
-
OpenClaw Migration
- One-command migration:
openfang migrate --from openclaw - Imports agents, memory, skills, configurations
- Compatible with ClawHub marketplace
- One-command migration:
-
Desktop Application
- Tauri 2.0 native app
- System tray, notifications, global shortcuts
Project Advantages
| Comparison | OpenFang | OpenClaw | ZeroClaw | CrewAI | LangGraph |
|---|---|---|---|---|---|
| Language | Rust | TypeScript | Rust | Python | Python |
| Autonomous Hands | ✅ 7 built-in | ❌ None | ❌ None | ❌ None | ❌ None |
| Security Layers | ✅ 16 layers | ⚠️ 3 basic | ⚠️ 6 layers | ⚠️ 1 basic | ⚠️ 2 layers |
| Channel Adapters | ✅ 40 | ⚠️ 13 | ⚠️ 15 | ❌ 0 | ❌ 0 |
| Cold Start | ✅ <200ms | ⚠️ ~6s | ✅ ~10ms | ⚠️ ~3s | ⚠️ ~2.5s |
| Idle Memory | ✅ 40MB | ⚠️ 394MB | ✅ 5MB | ⚠️ 200MB | ⚠️ 180MB |
| Install Size | ✅ 32MB | ⚠️ 500MB | ✅ 8.8MB | ⚠️ 100MB | ⚠️ 150MB |
| Agent Sandbox | ✅ WASM dual-metered | ❌ None | ⚠️ Allowlists | ❌ None | ❌ None |
| Audit Trail | ✅ Merkle hash-chain | ⚠️ Logs | ⚠️ Logs | ⚠️ Tracing | ⚠️ Checkpoints |
| Desktop App | ✅ Tauri 2.0 | ❌ None | ❌ None | ❌ None | ❌ None |
Why Choose OpenFang?
- True autonomous agents: 7 Hands out of the box, work without prompts
- Enterprise-grade security: 16 security layers, suitable for production
- High performance: Cold start <200ms, low memory footprint
- Multi-channel and multi-model: 40 adapters, 27 providers, covering major platforms
- Built with Rust: Type safety, memory safety, high performance
Deep Dive
Architecture Design
OpenFang uses a modular kernel design consisting of 14 Rust crates:
openfang-kernel # Orchestration, workflows, metering, RBAC, scheduler, budget tracking
openfang-runtime # Agent loop, 3 LLM drivers, 53 tools, WASM sandbox, MCP, A2A
openfang-api # 140+ REST/WS/SSE endpoints, OpenAI-compatible API, dashboard
openfang-channels # 40 messaging adapters with rate limiting, DM/group policies
openfang-memory # SQLite persistence, vector embeddings, canonical sessions, compaction
openfang-types # Core types, taint tracking, Ed25519 manifest signing, model catalog
openfang-skills # 60 bundled skills, SKILL.md parser, FangHub marketplace
openfang-hands # 7 autonomous Hands, HAND.toml parser, lifecycle management
openfang-extensions # 25 MCP templates, AES-256-GCM credential vault, OAuth2 PKCE
openfang-wire # OFP P2P protocol with HMAC-SHA256 mutual authentication
openfang-cli # CLI with daemon management, TUI dashboard, MCP server mode
openfang-desktop # Tauri 2.0 native app (system tray, notifications, global shortcuts)
openfang-migrate # OpenClaw, LangChain, AutoGPT migration engine
xtask # Build automationArchitecture Principles:
- Modularity: Each crate has clear responsibilities, independently testable
- Type Safety: Rust's type system ensures memory safety and concurrency safety
- Zero-Copy: High-performance data transfer
- Defense in Depth: 16 security layers, each independently testable
Hands Mechanism
Hands are OpenFang's core innovation: pre-built autonomous capability packages that run independently, on schedules, without requiring prompts.
Hand Structure:
- HAND.toml: Manifest file declaring tools, settings, requirements, dashboard metrics
- System Prompt: Multi-phase operational playbook (500+ word expert procedures, not one-liners)
- SKILL.md: Domain expertise reference injected into context at runtime
- Guardrails: Approval gates for sensitive actions (e.g., Browser Hand requires approval before purchases)
7 Built-in Hands:
- Clip: YouTube video download, best moment identification, vertical short creation with captions and thumbnails, AI voice-over, publish to Telegram/WhatsApp (8-phase pipeline)
- Lead: Runs daily, discovers ICP-matching prospects, enriches with web research, scores 0-100, deduplicates, outputs qualified leads (CSV/JSON/Markdown)
- Collector: OSINT-grade intelligence, continuously monitors targets, change detection, sentiment tracking, knowledge graph construction, critical alerts
- Predictor: Superforecasting engine, collects signals from multiple sources, builds calibrated reasoning chains, makes predictions with confidence intervals, tracks accuracy using Brier scores, contrarian mode
- Researcher: Deep autonomous researcher, cross-references multiple sources, evaluates credibility using CRAAP criteria, generates cited reports with APA formatting, multi-language support
- Twitter: Autonomous Twitter/X account manager, creates content in 7 rotating formats, schedules posts for optimal engagement, responds to mentions, tracks performance metrics, approval queue
- Browser: Web automation agent, navigates, fills forms, clicks buttons, handles multi-step workflows, Playwright bridge, session persistence, mandatory purchase approval gate
16 Security Layers
OpenFang's security system uses a defense in depth strategy, each layer independently testable, no single point of failure:
- WASM Dual-Metered Sandbox: Tool code runs in WebAssembly with fuel metering + epoch interruption, watchdog thread kills runaway code
- Merkle Hash-Chain Audit Trail: Every action cryptographically linked to the previous one, tampering breaks the entire chain
- Information Flow Taint Tracking: Labels propagate through execution, secrets tracked from source to sink
- Ed25519 Signed Agent Manifests: Every agent identity and capability set cryptographically signed
- SSRF Protection: Blocks private IPs, cloud metadata endpoints, DNS rebinding attacks
- Secret Zeroization:
Zeroizing<String>auto-wipes API keys from memory when no longer needed - OFP Mutual Authentication: HMAC-SHA256 nonce-based, constant-time verification for P2P networking
- Capability Gates: Role-based access control, agents declare required tools, kernel enforces it
- Security Headers: CSP, X-Frame-Options, HSTS, X-Content-Type-Options on every response
- Health Endpoint Redaction: Public health check returns minimal info, full diagnostics require authentication
- Subprocess Sandbox: env_clear() + selective variable passthrough, process tree isolation, cross-platform kill
- Prompt Injection Scanner: Detects override attempts, data exfiltration patterns, shell reference injection in skills
- Loop Guard: SHA256-based tool call loop detection with circuit breaker, handles ping-pong patterns
- Session Repair: 7-phase message history validation, automatic recovery from corruption
- Path Traversal Prevention: Canonicalization with symlink escape prevention, ../ doesn't work
- GCRA Rate Limiter: Cost-aware token bucket rate limiting with per-IP tracking, stale cleanup
Channel Adapters and LLM Providers
40 Channel Adapters: Each adapter supports per-channel model overrides, DM/group policies, rate limiting, output formatting.
27 LLM Providers: 3 native drivers (Anthropic, Gemini, OpenAI-compatible) route to 27 providers, support 123+ models, intelligent routing, automatic fallback, cost tracking, per-model pricing.
Performance Benchmarks
According to official documentation (February 2026):
- Cold Start Time: OpenFang <200ms (OpenClaw ~6s, CrewAI ~3s, LangGraph ~2.5s)
- Idle Memory: OpenFang 40MB (OpenClaw 394MB, CrewAI 200MB, LangGraph 180MB)
- Install Size: OpenFang 32MB (OpenClaw 500MB, CrewAI 100MB, LangGraph 150MB)
Migration Support
Migrate from OpenClaw:
# Migrate everything (agents, memory, skills, configs)
openfang migrate --from openclaw
# Migrate from specific path
openfang migrate --from openclaw --path ~/.openclaw
# Dry run first to see changes
openfang migrate --from openclaw --dry-runMigration engine imports agents, conversation history, skills, configurations. OpenFang natively reads SKILL.md and is compatible with ClawHub marketplace.
Stability Notice
OpenFang v0.1.0 is the first public release. Architecture is solid, test suite comprehensive, security model thorough. However:
- Breaking Changes: May occur between minor versions until v1.0
- Hand Maturity: Browser and Researcher are most mature, others being refined
- Edge Cases: Exist — if found, please open an issue
- Production Deployments: Pin to a specific commit until v1.0
Goal: Stable v1.0 by mid-2026.
Project Links and Resources
Official Resources
- 🌟 GitHub: https://github.com/RightNow-AI/openfang
- 🌐 Website: https://openfang.sh
- 📚 Documentation: Documentation, Quick Start
- 💬 Community: Discord, Twitter/X
- 🐛 Issues: GitHub Issues
- 📦 Install Script: openfang.sh/install
Related Resources
- OpenClaw: Can migrate from OpenClaw
- LangChain / AutoGPT: Migration engine support
- Rust: Rust language and ecosystem
- Tauri: Tauri 2.0 desktop app framework
Target Audience
- Need Autonomous Agents: Developers who want agents to work automatically on schedules, 24/7
- Production Users: Production environment deployments requiring enterprise-grade security
- Multi-Channel Needs: Teams needing to connect to multiple messaging platforms
- Performance Sensitive: Applications requiring low latency and low memory footprint
- Rust Developers: Want to learn Rust applications in agent systems
- OpenClaw Migrants: Want to migrate to a more modern, secure system
Learning Value:
- ✅ Rust applications in systems programming
- ✅ Agent Operating System architecture design
- ✅ Defense in depth security system implementation
- ✅ WASM sandbox and metering mechanisms
- ✅ Multi-channel and multi-model routing and fallback
- ✅ Autonomous agent workflow design
Visit my homepage for more useful knowledge and interesting products