### Start OpenFang daemon examples Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Commands for starting the daemon with default or custom configurations. ```bash # Start with default config openfang start # Start with custom config openfang start --config /path/to/config.toml ``` -------------------------------- ### Install and Start OpenFang (Linux/macOS) Source: https://github.com/rightnow-ai/openfang/blob/main/README.md Use this command to install OpenFang via curl and then initialize and start the agent system. The dashboard will be accessible at http://localhost:4200. ```bash curl -fsSL https://openfang.sh/install | sh openfang init openfang start # Dashboard live at http://localhost:4200 ``` -------------------------------- ### Install and Run vLLM Server Source: https://github.com/rightnow-ai/openfang/blob/main/docs/providers.md Instructions for installing vLLM and starting its OpenAI-compatible API server. No API key is required for local use. ```bash pip install vllm ``` ```bash python -m vllm.entrypoints.openai.api_server --model ``` -------------------------------- ### OpenFang First-time Setup Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Steps to set up OpenFang for the first time, including exporting API keys, initializing the application, and starting the daemon. ```bash # 1. Set your API key export GROQ_API_KEY="gsk_your_key_here" # 2. Initialize OpenFang openfang init --quick # 3. Start the daemon openfang start ``` -------------------------------- ### Install and Start OpenFang (Windows) Source: https://github.com/rightnow-ai/openfang/blob/main/README.md Use this PowerShell command to install OpenFang and then initialize and start the agent system. The dashboard will be accessible at http://localhost:4200. ```powershell irm https://openfang.sh/install.ps1 | iex openfang init openfang start ``` -------------------------------- ### Initialize OpenFang Source: https://github.com/rightnow-ai/openfang/blob/main/README.md Run the openfang init command to start the initialization process, which includes provider setup. ```bash # 2. Initialize. Walks you through provider setup. openfang init ``` -------------------------------- ### Initialize and Start OpenFang Source: https://github.com/rightnow-ai/openfang/blob/main/docs/README.md Quick start command sequence to initialize the environment and launch the OpenFang daemon. ```bash export GROQ_API_KEY="your-key" openfang init && openfang start # Open http://127.0.0.1:4200 ``` -------------------------------- ### OpenFang daemon output example Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Example console output upon successful daemon startup. ```text OpenFang Agent OS v0.1.0 Starting daemon... [ok] Kernel booted (groq/llama-3.3-70b-versatile) [ok] 50 models available [ok] 3 agent(s) loaded API: http://127.0.0.1:4200 Dashboard: http://127.0.0.1:4200/ Provider: groq Model: llama-3.3-70b-versatile hint: Open the dashboard in your browser, or run `openfang chat` hint: Press Ctrl+C to stop the daemon ``` -------------------------------- ### Install OpenFang from source Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Installs the CLI tool using Cargo. ```bash cargo install --path crates/openfang-cli ``` -------------------------------- ### Manual PowerShell Setup for OpenFang Source: https://github.com/rightnow-ai/openfang/blob/main/docs/VERTEX_AI_LOCAL_TESTING.md Manually set up environment variables and start OpenFang using PowerShell commands. Ensure to clear proxy settings and pre-fetch the OAuth token for Windows. ```powershell # 1. Kill any existing instances taskkill /F /IM openfang.exe 2>$null # 2. Set environment variables (CRITICAL: clear proxy!) $env:HTTPS_PROXY = "" $env:HTTP_PROXY = "" $env:GOOGLE_APPLICATION_CREDENTIALS = "C:\Users\at384\Downloads\osc\dbg-grcit-dev-e1-c79e5571a5a7.json" # 3. Pre-fetch OAuth token (IMPORTANT: avoids subprocess issues on Windows) $env:VERTEX_AI_ACCESS_TOKEN = gcloud auth print-access-token # 4. Start OpenFang cd C:\Users\at384\Downloads\osc\dllm\openfang .\target\debug\openfang.exe start ``` -------------------------------- ### Install a Skill Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Install a skill from various sources including a local directory, a Git URL, or the FangHub marketplace. The command handles verification and scanning for remote installations. ```bash openfang skill install ``` ```bash # Install from local directory openfang skill install ./my-skill/ ``` ```bash # Install from FangHub openfang skill install web-search ``` ```bash # Install an OpenClaw-format skill openfang skill install ./openclaw-skill/ ``` -------------------------------- ### Build and Install OpenFang CLI from Source Source: https://github.com/rightnow-ai/openfang/blob/main/docs/getting-started.md Clones the OpenFang repository and installs the CLI from source using Cargo. This is an alternative to installing directly from the Git repository. ```bash git clone https://github.com/RightNow-AI/openfang.git cd openfang cargo install --path crates/openfang-cli ``` -------------------------------- ### GET /skill/list Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md List all installed skills. ```APIDOC ## GET /skill/list ### Description List all installed skills. ``` -------------------------------- ### Install Manual Skill Directory Source: https://github.com/rightnow-ai/openfang/blob/main/docs/skill-development.md Install a skill directory after manually creating the required manifest. ```bash openfang skill install /path/to/skill-directory ``` -------------------------------- ### IDE Integration Examples Source: https://github.com/rightnow-ai/openfang/blob/main/docs/mcp-a2a.md Configuration examples for integrating OpenFang MCP servers with IDEs like Cursor and Claude Desktop. ```APIDOC ## IDE Integration Examples ### Description Provides configuration snippets for integrating OpenFang MCP servers into popular IDEs that support the MCP protocol. ### Method N/A (Configuration) ### Endpoint N/A ### Parameters N/A ### Request Example #### Cursor / VS Code (MCP extension) Add the following to your MCP configuration file (e.g., `.cursor/mcp.json` or VS Code MCP settings): ```json { "mcpServers": { "openfang": { "command": "openfang", "args": ["mcp"] } } } ``` #### Claude Desktop Add the following to `claude_desktop_config.json`: ```json { "mcpServers": { "openfang": { "command": "openfang", "args": ["mcp"], "env": {} } } } ``` ### Response N/A ``` -------------------------------- ### Spawn OpenFang Agent using Built-in Template Source: https://github.com/rightnow-ai/openfang/blob/main/docs/getting-started.md Spawns the 'hello-world' agent using its predefined manifest file. This is a quick way to get started with a basic agent. ```bash openfang agent spawn agents/hello-world/agent.toml ``` -------------------------------- ### Interactive Telegram Channel Setup Source: https://github.com/rightnow-ai/openfang/blob/main/docs/channel-adapters.md Use the `openfang channel setup telegram` command for an interactive walkthrough of setting up the Telegram adapter. This command guides you through the necessary steps. ```bash openfang channel setup telegram ``` -------------------------------- ### Install OpenFang via shell script Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Downloads and runs the automated installation script. ```bash curl -fsSL https://get.openfang.ai | sh ``` -------------------------------- ### Start OpenFang Channels with Debug Logging Source: https://github.com/rightnow-ai/openfang/blob/main/docs/troubleshooting.md Run OpenFang with RUST_LOG set to debug for the channels crate to get detailed logs for troubleshooting channel adapter issues. ```bash RUST_LOG=openfang_channels=debug openfang start ``` -------------------------------- ### Install Skill Request Body Source: https://github.com/rightnow-ai/openfang/blob/main/docs/api-reference.md Request body for installing a skill. Specify the source path or URL and whether to verify the installation. ```json { "source": "/path/to/skill", "verify": true } ``` -------------------------------- ### Docker Compose Configuration for OpenFang Source: https://github.com/rightnow-ai/openfang/blob/main/docs/configuration.md Example Docker Compose setup for OpenFang, including port mapping, volume mounting, and environment variables for binding and API keys. ```yaml services: openfang: image: ghcr.io/rightnow-ai/openfang:latest ports: - "4200:4200" volumes: - openfang-data:/data environment: - OPENFANG_LISTEN=0.0.0.0:4200 # required: bind to all interfaces inside the container - OPENFANG_API_KEY=${OPENFANG_API_KEY} # strongly recommended when exposing - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-} volumes: openfang-data: ``` -------------------------------- ### Start Daemon with API Keys Source: https://github.com/rightnow-ai/openfang/blob/main/CLAUDE.md Start the OpenFang daemon with the necessary API keys. Ensure you wait for the daemon to fully boot before proceeding. ```bash GROQ_API_KEY= target/release/openfang.exe start & sleep 6 # Wait for full boot curl -s http://127.0.0.1:4200/api/health # Verify it's up ``` -------------------------------- ### Install Skill Response Source: https://github.com/rightnow-ai/openfang/blob/main/docs/api-reference.md Response indicating successful skill installation, including the skill name and version. ```json { "status": "installed", "skill": "my-custom-skill", "version": "1.0.0" } ``` -------------------------------- ### Linux/macOS Install Script Execution Source: https://github.com/rightnow-ai/openfang/blob/main/docs/production-checklist.md Download and execute the install script for Linux and macOS using curl. Verify the installation by checking the version. ```bash curl -sSf https://openfang.sh | sh openfang --version # Should print v0.1.0 ``` -------------------------------- ### Start vLLM OpenAI API Server Source: https://github.com/rightnow-ai/openfang/blob/main/docs/troubleshooting.md Command to start a vLLM server compatible with the OpenAI API. ```bash # vLLM python -m vllm.entrypoints.openai.api_server --model ... ``` -------------------------------- ### Install OpenFang (macOS/Linux) Source: https://github.com/rightnow-ai/openfang/blob/main/README.md Download and execute the OpenFang installation script using curl. ```bash # 1. Install (macOS/Linux) curl -fsSL https://openfang.sh/install | sh ``` -------------------------------- ### POST /api/skills/install Source: https://github.com/rightnow-ai/openfang/blob/main/docs/api-reference.md Installs a skill from a local path or URL. ```APIDOC ## POST /api/skills/install ### Description Install a skill from a local path or URL. The skill manifest is verified (SHA256 checksum) and scanned for prompt injection before installation. ### Method POST ### Endpoint /api/skills/install ### Parameters #### Request Body - **source** (string) - Required - Path or URL to the skill - **verify** (boolean) - Required - Whether to verify the skill ### Response #### Success Response (201) - **status** (string) - Status of the operation - **skill** (string) - Name of the installed skill - **version** (string) - Version of the installed skill #### Response Example { "status": "installed", "skill": "my-custom-skill", "version": "1.0.0" } ``` -------------------------------- ### POST /skill/install Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Install a skill from a source. ```APIDOC ## POST /skill/install ### Description Install a skill from a local directory, git URL, or FangHub marketplace. ### Endpoint openfang skill install ### Parameters #### Path Parameters - **SOURCE** (string) - Required - Skill name, local directory path, or git URL. ``` -------------------------------- ### Install WhatsApp Gateway Dependencies Source: https://github.com/rightnow-ai/openfang/blob/main/README.md Navigate to the whatsapp-gateway package directory and install its dependencies using npm. ```bash cd packages/whatsapp-gateway npm install ``` -------------------------------- ### Workflow Step Configuration Example Source: https://github.com/rightnow-ai/openfang/blob/main/docs/workflows.md An example of a single workflow step configuration, specifying agent, prompt, mode, and error handling. ```json { "name": "research", "agent_name": "web-search", "prompt": "Search for the latest news on {{topic}}", "mode": "sequential", "timeout_secs": 60, "error_mode": "retry", "max_retries": 3, "output_var": "search_results" } ``` -------------------------------- ### POST /api/clawhub/install Source: https://github.com/rightnow-ai/openfang/blob/main/docs/api-reference.md Installs a skill from ClawHub. ```APIDOC ## POST /api/clawhub/install ### Description Install a skill from ClawHub. Downloads, verifies SHA256 checksum, scans for prompt injection, and converts SKILL.md format to OpenFang skill.toml automatically. ### Method POST ### Endpoint /api/clawhub/install ### Parameters #### Request Body - **slug** (string) - Required - The skill slug to install ### Response #### Success Response (201) - **status** (string) - Status of the operation - **skill** (string) - Name of the installed skill - **version** (string) - Version of the installed skill - **converted_from** (string) - Source format #### Response Example { "status": "installed", "skill": "data-pipeline", "version": "1.2.0", "converted_from": "SKILL.md" } ``` -------------------------------- ### Install OpenFang using Raw GitHub Redirect Source: https://github.com/rightnow-ai/openfang/blob/main/docs/production-checklist.md Provides a temporary method to install OpenFang using a direct curl command pointing to the raw install script on GitHub. This is a fallback until the `openfang.sh` domain is properly configured. ```bash curl -sSf https://raw.githubusercontent.com/RightNow-AI/openfang/main/scripts/install.sh | sh ``` -------------------------------- ### Start OpenFang Daemon Source: https://github.com/rightnow-ai/openfang/blob/main/README.md Start the OpenFang daemon to make the dashboard and API available. The dashboard is accessible at http://localhost:4200. ```bash # 3. Start the daemon openfang start ``` -------------------------------- ### Install OpenFang CLI via Shell Source: https://github.com/rightnow-ai/openfang/blob/main/docs/getting-started.md Downloads and installs the latest OpenFang CLI binary to `~/.openfang/bin/`. This method is suitable for Linux and macOS. ```bash curl -sSf https://openfang.sh | sh ``` -------------------------------- ### Start MCP Server Source: https://github.com/rightnow-ai/openfang/blob/main/docs/getting-started.md Command to start the MCP server, typically used for standard input/output communication. ```bash openfang mcp # Start MCP server (stdio) ``` -------------------------------- ### OpenFang Configuration Example Source: https://github.com/rightnow-ai/openfang/blob/main/docs/VERTEX_AI_LOCAL_TESTING.md Example TOML configuration file for OpenFang, specifying the default model provider, memory decay rate, and network listen address. ```toml [default_model] provider = "vertex-ai" model = "gemini-2.0-flash" [memory] decay_rate = 0.05 [network] listen_addr = "127.0.0.1:4200" ``` -------------------------------- ### List Installed Skills Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md This command lists all skills that are currently installed. It shows the skill's name, version, associated tools, and a brief description. Skills are loaded from `~/.openfang/skills/` and bundled ones. ```bash openfang skill list ``` -------------------------------- ### List Installed Skills Source: https://github.com/rightnow-ai/openfang/blob/main/docs/api-reference.md Retrieve a list of all installed skills, including their name, version, runtime, description, and bundled status. ```json { "skills": [ { "name": "github", "version": "1.0.0", "runtime": "prompt_only", "description": "GitHub integration for issues, PRs, and repos", "bundled": true }, { "name": "docker", "version": "1.0.0", "runtime": "prompt_only", "description": "Docker container management", "bundled": true } ], "total": 60 } ``` -------------------------------- ### Knowledge Graph Query Examples Source: https://github.com/rightnow-ai/openfang/blob/main/crates/openfang-hands/bundled/infisical-sync/SKILL.md Examples of queries to the knowledge graph for retrieving information about secrets, projects, and their relationships. ```shell knowledge_query type=secret // list all known secrets ``` ```shell knowledge_query type=secret_project // list all projects ``` ```shell knowledge_query relation=belongs_to target= // secrets in a project ``` -------------------------------- ### Content Pillars Example Source: https://github.com/rightnow-ai/openfang/blob/main/crates/openfang-hands/bundled/twitter/SKILL.md An example of defining 3-5 core topics for content strategy, with a suggested percentage allocation for a tech founder. ```text Example for a tech founder: Pillar 1: AI & Machine Learning (40% of content) Pillar 2: Startup Building (30% of content) Pillar 3: Engineering Culture (20% of content) Pillar 4: Personal Growth (10% of content) ``` -------------------------------- ### Initialize OpenFang examples Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Demonstrates interactive and non-interactive initialization workflows. ```bash # Interactive setup openfang init # Non-interactive (CI/scripts) export GROQ_API_KEY="gsk_..." openfang init --quick ``` -------------------------------- ### Install OpenFang CLI via PowerShell Source: https://github.com/rightnow-ai/openfang/blob/main/docs/getting-started.md Downloads, verifies the checksum, and installs the latest OpenFang CLI binary to your user PATH. This method is for Windows. ```powershell irm https://openfang.sh/install.ps1 | iex ``` -------------------------------- ### Test Linux/macOS Install Script Source: https://github.com/rightnow-ai/openfang/blob/main/docs/production-checklist.md Executes the `install.sh` script locally to test the installation process on Linux or macOS. This should be tested against a real GitHub release after the first tag is created. ```bash bash scripts/install.sh ``` -------------------------------- ### GET /api/skills Source: https://github.com/rightnow-ai/openfang/blob/main/docs/api-reference.md Lists all installed skills. ```APIDOC ## GET /api/skills ### Description List all installed skills. ### Method GET ### Endpoint /api/skills ### Response #### Success Response (200) - **skills** (array) - List of installed skills - **total** (integer) - Total count of skills #### Response Example { "skills": [ { "name": "github", "version": "1.0.0", "runtime": "prompt_only", "description": "GitHub integration for issues, PRs, and repos", "bundled": true } ], "total": 60 } ``` -------------------------------- ### Clone and build the repository Source: https://github.com/rightnow-ai/openfang/blob/main/CONTRIBUTING.md Initial setup commands to download the source code and perform the first build. ```bash git clone https://github.com/RightNow-AI/openfang.git cd openfang cargo build ``` -------------------------------- ### Start OpenFang daemon Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Boots the kernel and API server. ```bash openfang start [--config ] ``` -------------------------------- ### Setup channel integration Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Launches an interactive wizard to configure a specific channel or all channels if no argument is provided. ```bash openfang channel setup [] ``` ```bash # Interactive picker openfang channel setup # Direct setup openfang channel setup telegram openfang channel setup discord openfang channel setup slack ``` -------------------------------- ### Reset OpenFang Installation Source: https://github.com/rightnow-ai/openfang/blob/main/docs/troubleshooting.md Use this command to completely remove the OpenFang configuration and data, allowing for a fresh start. ```bash rm -rf ~/.openfang openfang init # Start fresh ``` -------------------------------- ### Initialize OpenFang workspace Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Sets up the configuration and directory structure. ```bash openfang init [--quick] ``` -------------------------------- ### Retrieve MCP Server Status Source: https://github.com/rightnow-ai/openfang/blob/main/docs/mcp-a2a.md Example JSON response from the GET /api/mcp/servers endpoint showing configured and connected servers. ```json { "configured": [ { "name": "github", "transport": { "type": "stdio", "command": "npx", "args": [...] }, "timeout_secs": 30, "env": ["GITHUB_PERSONAL_ACCESS_TOKEN"] } ], "connected": [ { "name": "github", "tools_count": 12, "tools": [ { "name": "mcp_github_create_issue", "description": "[MCP:github] Create a GitHub issue" }, { "name": "mcp_github_search_repos", "description": "[MCP:github] Search repositories" } ], "connected": true } ] } ``` -------------------------------- ### Get Cron Job Status Response Source: https://github.com/rightnow-ai/openfang/blob/main/docs/api-reference.md Example JSON response for retrieving the status of a specific cron job, including run history and configuration. ```json { "job": { "id": "550e8400-e29b-41d4-a716-446655440000", "agent_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "name": "daily-report", "enabled": true, "schedule": { "kind": "every", "every_secs": 3600 }, "action": { "kind": "agent_turn", "message": "Generate the daily report", "timeout_secs": 120 }, "delivery": { "kind": "none" }, "created_at": "2026-03-15T10:30:00Z", "last_run": "2026-03-16T09:00:00Z", "next_run": "2026-03-16T10:00:00Z" }, "one_shot": false, "last_status": "ok", "consecutive_errors": 0 } ``` -------------------------------- ### Build Production Binaries Source: https://github.com/rightnow-ai/openfang/blob/main/docs/desktop.md Commands to generate platform-specific installers. ```bash cd crates/openfang-desktop cargo tauri build ``` -------------------------------- ### Dockerfile Best Practices Source: https://github.com/rightnow-ai/openfang/blob/main/crates/openfang-skills/bundled/docker/SKILL.md Examples of recommended Dockerfile instructions for image optimization and security. ```dockerfile USER ``` ```dockerfile COPY --from=builder ``` ```dockerfile HEALTHCHECK ``` ```dockerfile COPY ``` ```dockerfile ADD ``` -------------------------------- ### Full OpenFang Agent OS Configuration Example Source: https://github.com/rightnow-ai/openfang/blob/main/docs/configuration.md A comprehensive TOML configuration file demonstrating all major sections and options for the OpenFang Agent OS. This includes top-level settings, default and fallback LLM providers, memory configuration, and network settings. ```toml # ============================================================ # OpenFang Agent OS -- Complete Configuration Reference # ============================================================ # --- Top-level fields --- home_dir = "~/.openfang" # OpenFang home directory data_dir = "~/.openfang/data" # SQLite databases and data files log_level = "info" # trace | debug | info | warn | error api_listen = "127.0.0.1:50051" # HTTP/WS API bind address network_enabled = false # Enable OFP peer-to-peer network api_key = "" # API Bearer token (empty = unauthenticated) mode = "default" # stable | default | dev language = "en" # Locale for CLI/messages usage_footer = "full" # off | tokens | cost | full # --- Default LLM Provider --- [default_model] provider = "anthropic" model = "claude-sonnet-4-20250514" api_key_env = "ANTHROPIC_API_KEY" # base_url = "https://api.anthropic.com" # Optional override # --- Fallback Providers --- [[fallback_providers]] provider = "ollama" model = "llama3.2:latest" api_key_env = "" # base_url = "http://localhost:11434" # Uses catalog default if omitted [[fallback_providers]] provider = "groq" model = "llama-3.3-70b-versatile" api_key_env = "GROQ_API_KEY" # --- Memory --- [memory] # sqlite_path = "~/.openfang/data/openfang.db" # Auto-resolved if omitted embedding_model = "all-MiniLM-L6-v2" consolidation_threshold = 10000 decay_rate = 0.1 # --- Network (OFP Wire Protocol) --- [network] listen_addresses = ["/ip4/0.0.0.0/tcp/0"] bootstrap_peers = [] mdns_enabled = true max_peers = 50 shared_secret = "" # Required when network_enabled = true ``` -------------------------------- ### Windows PowerShell Install Script Execution Source: https://github.com/rightnow-ai/openfang/blob/main/docs/production-checklist.md Download and execute the install script for Windows using Invoke-RestMethod (irm). Verify the installation by checking the version. ```powershell irm https://openfang.sh/install.ps1 | iex openfang --version ``` -------------------------------- ### Initialize OpenFang Configuration Source: https://github.com/rightnow-ai/openfang/blob/main/docs/getting-started.md Creates the `~/.openfang/` directory and a default `config.toml` file. This is the first step in configuring OpenFang. ```bash openfang init ``` -------------------------------- ### Install OpenFang Skills Source: https://github.com/rightnow-ai/openfang/blob/main/MIGRATION.md After migration, skills from OpenClaw are not automatically converted. Use this command to install skills into OpenFang, which will automatically detect and convert OpenClaw-format skills during installation. ```bash openfang skill install ``` -------------------------------- ### Groq Provider Setup Source: https://github.com/rightnow-ai/openfang/blob/main/docs/providers.md Set the GROQ_API_KEY environment variable after creating an API key on the Groq console. The free tier is rate-limited but usable. ```bash export GROQ_API_KEY="gsk_..." ``` -------------------------------- ### GET /a2a/tasks/{id} Source: https://github.com/rightnow-ai/openfang/blob/main/docs/api-reference.md Get the status and result of an A2A task. ```APIDOC ## GET /a2a/tasks/{id} ### Description Get the status and result of an A2A task. ### Method GET ### Endpoint /a2a/tasks/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The task ID ### Response #### Success Response (200) - **task_id** (string) - Task identifier - **status** (string) - Current status - **result** (object) - Task result ``` -------------------------------- ### GET /api/models/{id} Source: https://github.com/rightnow-ai/openfang/blob/main/docs/api-reference.md Get detailed information about a specific model. ```APIDOC ## GET /api/models/{id} ### Description Get detailed information about a specific model. ### Method GET ### Endpoint /api/models/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The model ID ### Response #### Success Response (200) - **id** (string) - Model ID - **provider** (string) - Provider name - **display_name** (string) - Human readable name - **tier** (string) - Model tier - **context_window** (integer) - Context window size - **input_cost_per_1m** (float) - Input cost - **output_cost_per_1m** (float) - Output cost - **supports_tools** (boolean) - Tool support flag - **supports_vision** (boolean) - Vision support flag - **supports_streaming** (boolean) - Streaming support flag #### Response Example { "id": "llama-3.3-70b-versatile", "provider": "groq", "display_name": "Llama 3.3 70B", "tier": "fast", "context_window": 131072, "input_cost_per_1m": 0.59, "output_cost_per_1m": 0.79, "supports_tools": true, "supports_vision": false, "supports_streaming": true } ``` -------------------------------- ### Initialize OpenFang Workspace Source: https://github.com/rightnow-ai/openfang/blob/main/MIGRATION.md Run this command to initialize a new OpenFang workspace, creating the `~/.openfang/` directory with a default `config.toml` file. This is the first step in a manual migration. ```bash openfang init ``` -------------------------------- ### GET /api/clawhub/skill/{slug} Source: https://github.com/rightnow-ai/openfang/blob/main/docs/api-reference.md Gets detailed information about a specific ClawHub skill. ```APIDOC ## GET /api/clawhub/skill/{slug} ### Description Get detailed information about a specific ClawHub skill. ### Method GET ### Endpoint /api/clawhub/skill/{slug} ### Parameters #### Path Parameters - **slug** (string) - Required - The skill slug ### Response #### Success Response (200) - **slug** (string) - Skill slug - **name** (string) - Skill name - **description** (string) - Skill description - **author** (string) - Skill author - **version** (string) - Skill version - **runtime** (string) - Runtime environment - **readme** (string) - Skill documentation - **sha256** (string) - SHA256 checksum #### Response Example { "slug": "data-pipeline", "name": "Data Pipeline", "description": "ETL data pipeline automation", "author": "clawhub-community", "version": "1.2.0", "runtime": "python", "readme": "# Data Pipeline\n\nAutomated ETL...", "sha256": "a1b2c3d4..." } ``` -------------------------------- ### Verify OpenFang Installation Source: https://github.com/rightnow-ai/openfang/blob/main/docs/getting-started.md Checks if the OpenFang CLI is installed correctly by displaying its version. ```bash openfang --version ``` -------------------------------- ### OpenFang Channel Setup and Management Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Commands for setting up, testing, enabling, and disabling various communication channels. ```bash # Interactive channel picker openfang channel setup # Direct channel setup openfang channel setup telegram # Check channel status openfang channel list # Test a channel openfang channel test telegram # Enable/disable channels openfang channel enable discord openfang channel disable slack ``` -------------------------------- ### Initialize OpenFang Source: https://github.com/rightnow-ai/openfang/blob/main/docs/getting-started.md Use this command to initialize the OpenFang configuration directory. ```bash openfang init # Initialize ~/.openfang/ ``` -------------------------------- ### Install OpenClaw Skill Source: https://github.com/rightnow-ai/openfang/blob/main/docs/skill-development.md Use the CLI to install an OpenClaw-format skill, which triggers automatic detection and conversion. ```bash openfang skill install /path/to/openclaw-skill ``` -------------------------------- ### Test GET Endpoints Source: https://github.com/rightnow-ai/openfang/blob/main/CLAUDE.md Verify that GET endpoints return real data, not empty or null values. ```bash curl -s http://127.0.0.1:4200/api/ ``` -------------------------------- ### Manage Skills Source: https://github.com/rightnow-ai/openfang/blob/main/docs/getting-started.md Commands for installing, listing, searching, and creating skills. ```bash openfang skill install # Install a skill ``` ```bash openfang skill list # List installed skills ``` ```bash openfang skill search # Search FangHub ``` ```bash openfang skill create # Scaffold a new skill ``` -------------------------------- ### Build OpenFang from workspace Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Compiles the CLI binary from the local workspace. ```bash cargo build --release -p openfang-cli # Binary: target/release/openfang (or openfang.exe on Windows) ``` -------------------------------- ### Update Rust Toolchain and Install OpenFang Source: https://github.com/rightnow-ai/openfang/blob/main/docs/troubleshooting.md If `cargo install` fails due to compilation errors, update your stable Rust toolchain to version 1.75 or later. Ensure you have necessary system dependencies like `pkg-config`, `libssl-dev`, and `libsqlite3-dev` installed. ```bash rustup update stable rustup default stable rustc --version # Need 1.75+ ``` ```bash # Debian/Ubuntu sudo apt install pkg-config libssl-dev libsqlite3-dev # Fedora sudo dnf install openssl-devel sqlite-devel ``` -------------------------------- ### Quick Setup: Set LLM Provider API Key Source: https://github.com/rightnow-ai/openfang/blob/main/docs/providers.md Set the environment variable for your chosen LLM provider to authenticate it. Local providers do not require a key. For Gemini, either GEMINI_API_KEY or GOOGLE_API_KEY can be used. ```bash export GEMINI_API_KEY="your-key" # Free tier available # OR export GROQ_API_KEY="your-key" # Free tier available # OR export ANTHROPIC_API_KEY="your-key" # OR export OPENAI_API_KEY="your-key" ``` -------------------------------- ### Start a chat session Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Initiates a chat with an agent, either via a running daemon or by booting an in-process kernel. ```bash # Chat with the default agent openfang chat # Chat with a specific agent by name openfang chat coder # Chat with a specific agent by UUID openfang chat a1b2c3d4-e5f6-7890-abcd-ef1234567890 ``` -------------------------------- ### Update OpenFang via Install Script Source: https://github.com/rightnow-ai/openfang/blob/main/docs/troubleshooting.md Re-run the official install script to update OpenFang to the latest release. ```bash curl -fsSL https://openfang.sh/install | sh ``` -------------------------------- ### Remove an Installed Skill Source: https://github.com/rightnow-ai/openfang/blob/main/docs/cli-reference.md Uninstall a skill by specifying its name. This command removes the skill from your local OpenFang installation. ```bash openfang skill remove ``` ```bash openfang skill remove web-search ``` -------------------------------- ### Python Skill Example: Web Summarizer Source: https://github.com/rightnow-ai/openfang/blob/main/docs/skill-development.md An example of a Python skill that can summarize a given URL or extract links from it. ```APIDOC ## Example: Web Summarizer `src/main.py`: ```python #!/usr/bin/env python3 """OpenFang skill: web-summarizer""" import json import sys import urllib.request def summarize_url(url: str) -> str: """Fetch a URL and return a basic summary.""" req = urllib.request.Request(url, headers={"User-Agent": "OpenFang-Skill/1.0"}) with urllib.request.urlopen(req, timeout=30) as resp: content = resp.read().decode("utf-8", errors="replace") # Simple extraction: first 500 chars as summary text = content[:500].strip() return f"Summary of {url}:\n{text}..." def extract_links(url: str) -> str: """Extract all links from a web page.""" import re req = urllib.request.Request(url, headers={"User-Agent": "OpenFang-Skill/1.0"}) with urllib.request.urlopen(req, timeout=30) as resp: content = resp.read().decode("utf-8", errors="replace") links = re.findall(r'href="(https?://[^\"]+)"', content) unique_links = list(dict.fromkeys(links)) return "\n".join(unique_links[:50]) def main(): payload = json.loads(sys.stdin.read()) tool_name = payload["tool"] input_data = payload["input"] try: if tool_name == "summarize_url": result = summarize_url(input_data["url"]) elif tool_name == "extract_links": result = extract_links(input_data["url"]) else: print(json.dumps({"error": f"Unknown tool: {tool_name}"})) return print(json.dumps({"result": result})) except Exception as e: print(json.dumps({"error": str(e)})) if __name__ == "__main__": main() ``` ``` -------------------------------- ### Alpaca API Authentication Setup Source: https://github.com/rightnow-ai/openfang/blob/main/crates/openfang-hands/bundled/trader/SKILL.md Bash script to set up environment variables for Alpaca API base URLs (paper and live trading) and authentication headers. ```bash # Paper trading (ALWAYS start here) BASE_URL="https://paper-api.alpaca.markets" # Live trading (only after paper validation) # BASE_URL="https://api.alpaca.markets" # Data API (same for both paper and live) DATA_URL="https://data.alpaca.markets" # Auth headers (required on every request) HEADERS="-H 'APCA-API-KEY-ID: $ALPACA_API_KEY' -H 'APCA-API-SECRET-KEY: $ALPACA_SECRET_KEY'" ```