FreeClaw
Python-based AI agent supporting multiple AI providers (NVIDIA NIM, OpenRouter, Groq). Flexible model switching for cost optimization.
多提供商 Python AI 助手
FreeClaw 是一个基?Python ?AI 助手框架,专?AI 提供商选择的灵活性而设计。它支持多个 AI 提供商,包括 NVIDIA NIM、OpenRouter ?Groq,允许您根据成本、速度或能力需求在提供商之间切换?
核心优势:无供应商锁?---随时切换 AI 提供商而无需更改设置?
为什么选择 FreeClaw?
提供商灵活?
与绑定单一 AI 提供商的解决方案不同,FreeClaw 让您选择和切换:
┌─────────────────────────────────────────?
? FreeClaw 提供商选项 ?
├─────────────────────────────────────────?
? ?
? ┌───────────? ┌───────────? ?
? ? NVIDIA ? ?OpenRouter? ?
? ? NIM ? ? (50+ 模型)? ?
? └───────────? └───────────? ?
? ?
? ┌───────────? ┌───────────? ?
? ? Groq ? ? 更多... ? ?
? ? (快? ? ? ? ?
? └───────────? └───────────? ?
? ?
└─────────────────────────────────────────?成本优化
不同的提供商擅长不同的任务:
| 提供? | 最适合 | 价格范围 |
|---|---|---|
| Groq | 速度关键任务 | $-$$ |
| NVIDIA NIM | GPU 加速工作负? | $$ |
| OpenRouter | 模型多样性(50+ 模型? | $-$$$ |
使用 Groq 快速推?
Groq 提供超快 AI 推理?
| 指标 | Groq | 标准 |
|---|---|---|
| *令牌/? | 500+ | 50-100 |
| *首令牌时? | 小于100ms | 500-1000ms |
| 最适合 | 实时聊天 | 批量处理 |
核心特?
$#1.
多提供商支持
支持的提供商?
| 提供? | 可用模型 | 特色功能 |
|---|---|---|
| NVIDIA NIM | Llama、Mistral、Gemma | GPU 加? |
| OpenRouter | 50+ 模型(GPT、Claude 等) | 模型多样? |
| Groq | Llama、Mixtral | 超快推理 |
| OpenAI 兼容 | 任何 OpenAI 兼容 API | 灵活? |
轻松切换?
# ?config.yaml 中更改提供商
model:
provider: groq # 更改为:nvidia、openrouter、openai
api_key: "your-key"
model: "mixtral-8x7b"$#2.
成本优化
自动提供商选择?
# FreeClaw 可根据您的标准自动选择最佳提供商
# 最便宜选项
freeclaw --optimize cost
# 最快选项
freeclaw --optimize speed
# 最佳质?
freeclaw --optimize quality成本对比(每 100 万令牌)?
| 提供? | 输入 | 输出 | 速度 |
|---|---|---|---|
| Groq | $0.27 | $0.27 | 500+ tok/s |
| NVIDIA NIM | $0.20 | $0.20 | 100+ tok/s |
| OpenRouter(变化) | $0.10-15 | $0.30-45 | 50-200 tok/s |
$#3.
Python 生态系?
**Python 的优?*?
- 丰富?ML/AI 库生态系?
- 易于扩展和定?
- 庞大的开发者社?
- 非常适合数据处理任务
集成示例?
# 与流?Python 库一起使?
import pandas as pd # 数据分析
import numpy as np # 数值计?
import requests # API 调用$#4.
快速设?
几分钟内运行?
$#1.
克隆
git clone https://github.com/openconstruct/freeclaw
cd freeclaw
$#2.
安装
pip install -r requirements.txt
$#3.
配置
cp config.example.yaml config.yaml
# 编辑 config.yaml
$#4.
运行
python main.py安装教程
前置条件
| 要求 | 详情 |
|---|---|
| Python | 3.8 版或更高 |
| pip | Python 包管理器 |
| Git | 用于克隆仓库 |
分步安装
步骤 1:安?Python
下载:https://www.python.org/downloads/
*步骤 2:克隆仓?
git clone https://github.com/openconstruct/freeclaw
cd freeclaw*步骤 3:创建虚拟环境(推荐?
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate*步骤 4:安装依?
pip install -r requirements.txt*步骤 5:配?
# 复制示例配置
cp config.example.yaml config.yaml
# 用您首选的提供商编?*步骤 6:运?
python main.pyDocker 部署
# 构建镜像
docker build -t freeclaw .
# 运行容器
docker run -d --name freeclaw \
-v ./config.yaml:/app/config.yaml \
-v ./data:/app/data \
freeclaw配置说明
基本配置
配置文件格式(config.yaml):
model:
provider: groq # 选项:groq、nvidia、openrouter、openai
api_key: "your-api-key-here"
model: "mixtral-8x7b-32768"
temperature: 0.7
max_tokens: 2048
# 功能配置
features:
file_access: true
web_search: true
code_execution: false
memory: true提供商切?
**快速切换命?*?
# 切换?Groq 获得速度
freeclaw switch-provider groq
# 切换?NVIDIA 进行 GPU 任务
freeclaw switch-provider nvidia
# 切换?OpenRouter 获得模型多样?
freeclaw switch-provider openrouter使用场景
成本优化
场景:您想最小化 AI API 成本
策略?
1. 使用 Groq 处理简单查询(最便宜 + 最快)
2. 使用 OpenRouter 处理复杂推理(最佳模型)
3. 使用 NVIDIA NIM 进行 GPU 加速任?
结果:与单一提供商相比成本降?`60%`配置?
cost_optimization:
enabled: true
simple_tasks:
provider: groq
complex_tasks:
provider: openrouter实时聊天
场景:构建实时聊天机器人
为什么?Groq?
- 500+ 令牌/?
- 小于100ms 首令牌时?
- 自然的对话流?
设置?
model:
provider: groq
model: "mixtral-8x7b-32768"
chat:
streaming: true
fast_response: true多提供商冗余
场景:需要高可用性的生产系统
设置?
redundancy:
primary: groq
fallback:
- nvidia
- openrouter
auto_failover: true
health_check_interval: 60 # ?工作原理?
主提供商(Groq)失?
?
自动切换?NVIDIA NIM
?
继续服务用户
?
?Groq 恢复时自动切换回系统要求
| 组件 | 最低要? | 推荐配置 |
|---|---|---|
| CPU | 2 ? | 4 ? |
| 内存 | 512MB RAM | 2GB RAM |
| 存储 | 100MB | 500MB |
| Python | 3.8 | 3.11+ |
| 网络 | 必需 | 稳定连接 |
与替代方案对?
| 特? | FreeClaw | OpenClaw | NanoBot | ZeptoClaw |
|---|---|---|---|---|
| 多提供商 | ?原生 | ⚠️ 插件 | ⚠️ 有限 | ?单一 |
| 语言 | Python | TypeScript | Python | Rust |
| 提供商选项 | 4+ | 10+ | 5+ | 2+ |
| 成本优化 | ?内置 | ?手动 | ?手动 | ?手动 |
| *设置复杂? | ⭐⭐?中等 | ⭐⭐⭐⭐?? | ⭐⭐ ? | ⭐⭐?中等 |
优缺点分?
优点
| 优势 | 说明 |
|---|---|
| *提供商灵活? | ?4+ 提供商之间轻松切? |
| 成本优化 | 为每项任务选择最便宜的提供商 |
| *快速推? | Groq 集成用于实时使用 |
| *Python 生? | 访问丰富?Python ? |
| *无锁? | 不绑定单一提供? |
| MIT 许可 | 任何用途免? |
局限?
| 局限? | 说明 |
|---|---|
| 需?Python | 需?Python 环境 |
| *生态较? | 不如 OpenClaw 成熟 |
| 配置 | 对初学者可能复? |
| 文档 | 与大型项目相比文档有? |
定价
FreeClaw 软件:完全免费(MIT 许可?
**AI 提供商成?*(您直接支付给提供商):
| 提供? | 免费额度 | 付费计划 |
|---|---|---|
| Groq | 有限免费额度 | $0.27-0.79/100 万令? |
| NVIDIA NIM | $50 免费积分 | 按量付费 |
| OpenRouter | $1 免费积分 | $0.10-45/100 万令? |
社区和支?
- GitHub:https://github.com/openconstruct/freeclaw
- 问题反馈:https://github.com/openconstruct/freeclaw/issues
- **讨论?*:https://github.com/openconstruct/freeclaw/discussions
许可?
*MIT 许可? - 个人和商业使用免费?
总结
FreeClaw 是一款多提供?Python AI 助手,提供:
- *提供商灵活? -- ?4+ 提供商之间切?
- 成本优化 -- 为每项任务选择最佳提供商
- *快速推? -- Groq 集成用于实时使用
- *Python 生? -- 丰富的库集成
- *无锁? -- 不绑定单一提供?
适合人群?
- 注重成本的用?
- 需要提供商冗余
- Python 开发?
- 实时应用
- 多模型实?
**不推?*?
- 想要单一提供商简单性的用户
- 非技术用?
- 需要全面支持的企业
---
## 信息来源
内容基于 AI 助手生态系统中记录的多提供?AI 助手框架和成本优化策略?
---
---
## FAQ
### Is FreeClaw free to use?
Yes, FreeClaw is free and open source (MIT license). You only pay for AI model API costs if using external models.
### What are the system requirements for FreeClaw?
FreeClaw requires 512MB RAM of RAM minimum, Runtime: Python 3.8+. It runs on Windows, macOS, and Linux.
### Can I self-host FreeClaw?
Yes. FreeClaw is open source (MIT) and can be self-hosted on your own hardware.
Clone the repository from GitHub and follow the installation guide.
### What platforms does FreeClaw support?
FreeClaw supports popular chat platforms. Check the official documentation for the most up-to-date list of supported platforms.
### Is FreeClaw suitable for beginners?
Suitability depends on your technical background. Check the getting started guide for more details.
---
## 快速入门指南
几分钟内启动 FreeClaw。
### 选项 A: 快速设置
### 步骤 3: 配置
按照官方文档配置您的系统。
### 步骤 4: 开始使用
连接您的平台并开始交互。
**首次使用时间: ~5-15分钟**,具体取决于安装方式。
完整文档: [https://github.com/openconstruct/freeclaw#readme](https://github.com/openconstruct/freeclaw#readme)
源代码: [https://github.com/openconstruct/freeclaw](https://github.com/openconstruct/freeclaw)
---
## 常见问题
### FreeClaw 免费吗?
是的,FreeClaw 是免费的开源软件(MIT 许可证)。您只需支付 AI 模型 API 的费用。
### FreeClaw 的系统要求是什么?
FreeClaw 需要 512MB RAM, Python 3.8+。它可在 Windows、macOS 和 Linux 上运行。
### 我可以自托管 FreeClaw 吗?
可以。FreeClaw 是开源软件(MIT),可以在您自己的硬件上自托管。
### FreeClaw 支持哪些平台?
FreeClaw 支持流行的聊天平台。请查看官方文档获取最新支持的平台列表。
### FreeClaw 适合初学者吗?
适不适合取决于您的技术背景。请参阅入门指南了解更多详情。Edict
Multi-agent orchestration system based on Tang Dynasty's Three Departments and Six Ministries system. 9 specialized AI agents working together in an ancient Chinese governmental structure for modern task execution.
Hermes Agent
Self-improving AI Agent framework by Nous Research. Built-in learning loop and 5-stage skill extraction mechanism with compound growth capabilities. 95.6k+ GitHub stars. Fastest-growing agent framework of 2026.