Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
VelaClaw 🕷️
Protocol-driven autonomous AI agent runtime with intelligent model selection and multi-model negotiation.
Contributing · ai-lib migration (matrix & env)
Overview
VelaClaw is a Rust-first autonomous AI agent runtime that integrates with the ai-protocol ecosystem for intelligent, protocol-driven AI operations.
Key Features
| Feature | Description |
|---|---|
| Protocol-driven Providers | Configure AI providers via YAML files without code changes |
| Intelligent Model Selection | Automatically select the best model for each task based on cost, speed, quality, and reliability |
| Multi-model Negotiation | Get multiple AI opinions and synthesize the best response |
| Parallel Task Execution | Execute independent tasks concurrently for faster results |
| Remote Deployment | Deploy agents to remote servers with controlled access |
| Hardware Integration | Support for GPIO, STM32, and other peripherals |
Quick Start
Prerequisites
- Rust 1.70+ (2021 edition)
- A local ai-protocol checkout for provider manifests
Build
# Clone the repository
# Build with default protocol support
Cross-Compile for Raspberry Pi (aarch64)
# Install target
# Build release binary
# Binary location
Run
# Enable smart model selection
# Enable multi-model negotiation
# Run with the default protocol model id (openai/gpt-5.2)
Web Chat UI
With the gateway running (velaclaw daemon), open http://127.0.0.1:8080/chat in your browser for the local Web Chat UI.
- Pair once:
POST http://127.0.0.1:8080/pairwith your pairing code, then paste the bearer token into the chat UI. - Select a model from the dropdown (requires BYOK credentials for providers in your ai-protocol checkout).
- Messages stream over WebSocket (
/ws) using the same agent loop as the CLI.
For frontend development, run npm ci && npm run dev inside ui-chat/ (Vite proxies API calls to the gateway).
Configuration
Environment Variables
# AI Protocol directory (for protocol-driven providers)
# Clone from: git clone https://github.com/ailib-official/ai-protocol
# Provider API keys declared by ai-protocol manifests
Config File
# ~/.velaclaw/config.toml
= "openai/gpt-5.2"
= "openai/gpt-5.2"
Documentation
- User Guide (Chinese) - Complete user documentation
- Integration Guide - Developer integration guide
- Upstream Requirements - Requirements for ai-lib-rust and ai-protocol
User Guide Chapters
- Getting Started
- Basic Concepts
- Chat with AI
- Providers
- Smart Routing
- Channels
- Telegram
- Tools
- Negotiation
- Automation
- Deployment
- Remote Deployment
- Security
- Commands
- Configuration
- FAQ
Feature Flags
| Flag | Description |
|---|---|
ai-protocol |
Enable ai-lib-rust integration (protocol-driven providers via protocol:provider/model) |
smart-routing |
Enable provider scoring and adaptive model selection |
multi-model |
Enable multi-model negotiation and parallel tasks |
remote-deploy |
Enable controlled remote deployment |
hardware |
Enable hardware peripherals support |
channel-matrix |
Enable Matrix channel with E2EE |
Dashboard
When running the gateway (velaclaw gateway), a monitoring dashboard is available at GET /dashboard:
- Status: Health and pairing state
- Cost: Session, daily, monthly costs and token usage (when
[cost] enabled = true) - Runtime: Component health snapshot
The dashboard auto-refreshes every 30 seconds.
Remote Deployment
VelaClaw supports controlled remote deployment via SSH with the --features remote-deploy flag.
Deploy Commands
# Deploy to a remote server
# Check deployment status
# Run health check
# List configured deployment targets
# Rollback to previous deployment
# Update to new version
# Sync configuration
Configuration
Configure deployment targets in your config.toml:
[]
[[]]
= "prod-001"
= "192.168.1.100"
= 22
= "deploy"
= "~/.ssh/id_ed25519"
= ["env:production", "region:us-west"]
[]
= "direct" # Options: direct, docker, systemd
= "/usr/local/bin/velaclaw"
= "/opt/velaclaw"
= true
= 30
= true
= 3
Architecture
VelaClaw uses a trait-driven, modular architecture:
- Providers: AI model backends (OpenAI, Anthropic, local models, etc.)
- Channels: Communication platforms (Telegram, Discord, Matrix, etc.)
- Tools: Extensible tool execution (shell, file, browser, etc.)
- Memory: Persistent storage backends (SQLite, PostgreSQL, etc.)
- Security: Policy enforcement and secret management
Upstream Dependencies
VelaClaw integrates with:
- ai-lib-rust - Protocol-driven AI API client (crates.io, enable with
--features ai-protocol) - ai-protocol - Provider YAML configs (clone and set
AI_PROTOCOL_DIR)
Sync with Upstream
VelaClaw tracks velaclaw-labs/velaclaw for updates:
# List upstream changes
# Preview merge
# Merge upstream
# Cherry-pick specific commit
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Author
Luqiang Wang
Acknowledgments
VelaClaw is a fork of VelaClaw with additional features:
- ai-protocol integration
- Provider scoring and smart routing
- Multi-model negotiation
- Parallel task execution
- Remote deployment