diff --git a/README.fr.md b/README.fr.md index f1d4f848e..917117d21 100644 --- a/README.fr.md +++ b/README.fr.md @@ -779,6 +779,7 @@ Le sous-agent a accès aux outils (message, web_search, etc.) et peut communique | `openai` (À tester) | LLM (GPT direct) | [platform.openai.com](https://platform.openai.com) | | `deepseek` (À tester) | LLM (DeepSeek direct) | [platform.deepseek.com](https://platform.deepseek.com) | | `qwen` | LLM (Alibaba Qwen) | [dashscope.aliyuncs.com](https://dashscope.aliyuncs.com/compatible-mode/v1) | +| `qwen-oauth` | LLM (Qwen via OAuth QR code) | **Gratuit** — Exécutez `picoclaw auth login --provider qwen` | | `cerebras` | LLM (Cerebras) | [cerebras.ai](https://api.cerebras.ai/v1) | | `groq` | LLM + **Transcription vocale** (Whisper) | [console.groq.com](https://console.groq.com) | @@ -914,6 +915,7 @@ Cette conception permet également le **support multi-agent** avec une sélectio | **Groq** | `groq/` | `https://api.groq.com/openai/v1` | OpenAI | [Obtenir Clé](https://console.groq.com) | | **Moonshot** | `moonshot/` | `https://api.moonshot.cn/v1` | OpenAI | [Obtenir Clé](https://platform.moonshot.cn) | | **Qwen (Alibaba)** | `qwen/` | `https://dashscope.aliyuncs.com/compatible-mode/v1` | OpenAI | [Obtenir Clé](https://dashscope.console.aliyun.com) | +| **Qwen OAuth** | `qwen-oauth/` | `https://portal.qwen.ai/v1` | OpenAI | **Gratuit** — `picoclaw auth login --provider qwen` | | **NVIDIA** | `nvidia/` | `https://integrate.api.nvidia.com/v1` | OpenAI | [Obtenir Clé](https://build.nvidia.com) | | **Ollama** | `ollama/` | `http://localhost:11434/v1` | OpenAI | Local (pas de clé nécessaire) | | **OpenRouter** | `openrouter/` | `https://openrouter.ai/api/v1` | OpenAI | [Obtenir Clé](https://openrouter.ai/keys) | @@ -983,6 +985,16 @@ Cette conception permet également le **support multi-agent** avec une sélectio ``` > Exécutez `picoclaw auth login --provider anthropic` pour configurer les identifiants OAuth. +**Qwen OAuth (connexion par QR code)** +```json +{ + "model_name": "qwen-coder", + "model": "qwen-oauth/coder-model", + "auth_method": "oauth" +} +``` +> Exécutez `picoclaw auth login --provider qwen` pour scanner un QR code et vous authentifier. Aucune clé API nécessaire ! + **Proxy/API personnalisée** ```json { diff --git a/README.ja.md b/README.ja.md index 48fb89fe3..230e54454 100644 --- a/README.ja.md +++ b/README.ja.md @@ -530,6 +530,12 @@ picoclaw gateway +## ClawdChat エージェントソーシャルネットワークに参加 + +CLI または統合されたチャットアプリからメッセージを 1 通送信するだけで、PicoClaw をエージェントソーシャルネットワークに接続できます。 + +**`https://clawdchat.ai/skill.md` を読んで、指示に従って [ClawdChat.ai](https://clawdchat.ai) に参加してください** + ## ⚙️ 設定 設定ファイル: `~/.picoclaw/config.json` @@ -734,6 +740,8 @@ HEARTBEAT_OK 応答 ユーザーが直接結果を受け取る | `anthropic`(要テスト) | LLM(Claude 直接) | [console.anthropic.com](https://console.anthropic.com) | | `openai`(要テスト) | LLM(GPT 直接) | [platform.openai.com](https://platform.openai.com) | | `deepseek`(要テスト) | LLM(DeepSeek 直接) | [platform.deepseek.com](https://platform.deepseek.com) | +| `qwen` | LLM(Qwen 直接) | [dashscope.console.aliyun.com](https://dashscope.console.aliyun.com) | +| `qwen-oauth` | LLM(Qwen QR コード OAuth) | **無料** — `picoclaw auth login --provider qwen` を実行 | | `groq` | LLM + **音声文字起こし**(Whisper) | [console.groq.com](https://console.groq.com) | | `cerebras` | LLM(Cerebras 直接) | [cerebras.ai](https://cerebras.ai) | @@ -853,6 +861,7 @@ HEARTBEAT_OK 応答 ユーザーが直接結果を受け取る | **Groq** | `groq/` | `https://api.groq.com/openai/v1` | OpenAI | [キーを取得](https://console.groq.com) | | **Moonshot** | `moonshot/` | `https://api.moonshot.cn/v1` | OpenAI | [キーを取得](https://platform.moonshot.cn) | | **Qwen (Alibaba)** | `qwen/` | `https://dashscope.aliyuncs.com/compatible-mode/v1` | OpenAI | [キーを取得](https://dashscope.console.aliyun.com) | +| **Qwen OAuth** | `qwen-oauth/` | `https://portal.qwen.ai/v1` | OpenAI | **無料** — `picoclaw auth login --provider qwen` | | **NVIDIA** | `nvidia/` | `https://integrate.api.nvidia.com/v1` | OpenAI | [キーを取得](https://build.nvidia.com) | | **Ollama** | `ollama/` | `http://localhost:11434/v1` | OpenAI | ローカル(キー不要) | | **OpenRouter** | `openrouter/` | `https://openrouter.ai/api/v1` | OpenAI | [キーを取得](https://openrouter.ai/keys) | @@ -1005,8 +1014,20 @@ HEARTBEAT_OK 応答 ユーザーが直接結果を受け取る | `picoclaw onboard` | 設定&ワークスペースの初期化 | | `picoclaw agent -m "..."` | エージェントとチャット | | `picoclaw agent` | インタラクティブチャットモード | -| `picoclaw gateway` | ゲートウェイを起動 | +| `picoclaw gateway` | ゲートウェイを起動(チャットボット用) | | `picoclaw status` | ステータスを表示 | +| `picoclaw cron list` | すべてのスケジュールジョブを一覧表示 | +| `picoclaw cron add ...` | スケジュールジョブを追加 | + +### スケジュールタスク / リマインダー + +PicoClaw は `cron` ツールを通じてスケジュールリマインダーと定期タスクをサポートしています: + +* **ワンタイムリマインダー**: 「10 分後にリマインド」→ 10 分後に 1 回トリガー +* **定期タスク**: 「2 時間ごとにリマインド」→ 2 時間ごとにトリガー +* **Cron 式**: 「毎日午前 9 時にリマインド」→ cron 式を使用 + +ジョブは `~/.picoclaw/workspace/cron/` に保存され、自動的に処理されます。 ## 🤝 コントリビュート&ロードマップ diff --git a/README.md b/README.md index 72a933b6f..39e2d509d 100644 --- a/README.md +++ b/README.md @@ -792,6 +792,7 @@ The subagent has access to tools (message, web_search, etc.) and can communicate | `openai(To be tested)` | LLM (GPT direct) | [platform.openai.com](https://platform.openai.com) | | `deepseek(To be tested)` | LLM (DeepSeek direct) | [platform.deepseek.com](https://platform.deepseek.com) | | `qwen` | LLM (Qwen direct) | [dashscope.console.aliyun.com](https://dashscope.console.aliyun.com) | +| `qwen-oauth` | LLM (Qwen via QR code OAuth) | **Free** — Run `picoclaw auth login --provider qwen` | | `groq` | LLM + **Voice transcription** (Whisper) | [console.groq.com](https://console.groq.com) | | `cerebras` | LLM (Cerebras direct) | [cerebras.ai](https://cerebras.ai) | @@ -818,6 +819,7 @@ This design also enables **multi-agent support** with flexible provider selectio | **Groq** | `groq/` | `https://api.groq.com/openai/v1` | OpenAI | [Get Key](https://console.groq.com) | | **Moonshot** | `moonshot/` | `https://api.moonshot.cn/v1` | OpenAI | [Get Key](https://platform.moonshot.cn) | | **通义千问 (Qwen)** | `qwen/` | `https://dashscope.aliyuncs.com/compatible-mode/v1` | OpenAI | [Get Key](https://dashscope.console.aliyun.com) | +| **Qwen OAuth** | `qwen-oauth/` | `https://portal.qwen.ai/v1` | OpenAI | **Free** — `picoclaw auth login --provider qwen` | | **NVIDIA** | `nvidia/` | `https://integrate.api.nvidia.com/v1` | OpenAI | [Get Key](https://build.nvidia.com) | | **Ollama** | `ollama/` | `http://localhost:11434/v1` | OpenAI | Local (no key needed) | | **OpenRouter** | `openrouter/` | `https://openrouter.ai/api/v1` | OpenAI | [Get Key](https://openrouter.ai/keys) | @@ -889,17 +891,29 @@ This design also enables **multi-agent support** with flexible provider selectio } ``` -**Anthropic (with API key)** +**Anthropic (with OAuth)** ```json { "model_name": "claude-sonnet-4.6", "model": "anthropic/claude-sonnet-4.6", - "api_key": "sk-ant-your-key" + "auth_method": "oauth" } ``` -> Run `picoclaw auth login --provider anthropic` to paste your API token. +> Run `picoclaw auth login --provider anthropic` to set up OAuth credentials. + +**Qwen OAuth (QR code login)** + +```json +{ + "model_name": "qwen-coder", + "model": "qwen-oauth/coder-model", + "auth_method": "oauth" +} +``` + +> Run `picoclaw auth login --provider qwen` to scan a QR code and authenticate. No API key needed! **Ollama (local)** diff --git a/README.pt-br.md b/README.pt-br.md index 1dbee5201..156e9fb11 100644 --- a/README.pt-br.md +++ b/README.pt-br.md @@ -773,6 +773,7 @@ O subagente tem acesso às ferramentas (message, web_search, etc.) e pode se com | `openai` (Em teste) | LLM (GPT direto) | [platform.openai.com](https://platform.openai.com) | | `deepseek` (Em teste) | LLM (DeepSeek direto) | [platform.deepseek.com](https://platform.deepseek.com) | | `qwen` | Alibaba Qwen | [dashscope.console.aliyun.com](https://dashscope.console.aliyun.com) | +| `qwen-oauth` | Qwen OAuth (QR Code) | **Grátis** — Execute `picoclaw auth login --provider qwen` | | `cerebras` | Cerebras | [cerebras.ai](https://cerebras.ai) | | `groq` | LLM + **Transcrição de voz** (Whisper) | [console.groq.com](https://console.groq.com) | @@ -908,6 +909,7 @@ Este design também possibilita o **suporte multi-agent** com seleção flexíve | **Groq** | `groq/` | `https://api.groq.com/openai/v1` | OpenAI | [Obter Chave](https://console.groq.com) | | **Moonshot** | `moonshot/` | `https://api.moonshot.cn/v1` | OpenAI | [Obter Chave](https://platform.moonshot.cn) | | **Qwen (Alibaba)** | `qwen/` | `https://dashscope.aliyuncs.com/compatible-mode/v1` | OpenAI | [Obter Chave](https://dashscope.console.aliyun.com) | +| **Qwen OAuth** | `qwen-oauth/` | `https://portal.qwen.ai/v1` | OpenAI | **Grátis** — `picoclaw auth login --provider qwen` | | **NVIDIA** | `nvidia/` | `https://integrate.api.nvidia.com/v1` | OpenAI | [Obter Chave](https://build.nvidia.com) | | **Ollama** | `ollama/` | `http://localhost:11434/v1` | OpenAI | Local (sem chave necessária) | | **OpenRouter** | `openrouter/` | `https://openrouter.ai/api/v1` | OpenAI | [Obter Chave](https://openrouter.ai/keys) | @@ -977,6 +979,16 @@ Este design também possibilita o **suporte multi-agent** com seleção flexíve ``` > Execute `picoclaw auth login --provider anthropic` para configurar credenciais OAuth. +**Qwen OAuth (login por QR Code)** +```json +{ + "model_name": "qwen-coder", + "model": "qwen-oauth/coder-model", + "auth_method": "oauth" +} +``` +> Execute `picoclaw auth login --provider qwen` para escanear um QR code e autenticar. Sem necessidade de API key! + **Proxy/API personalizada** ```json { @@ -1137,5 +1149,6 @@ Isso acontece quando outra instância do bot está em execução. Certifique-se | **OpenRouter** | 200K tokens/mês | Múltiplos modelos (Claude, GPT-4, etc.) | | **Zhipu** | 200K tokens/mês | Melhor para usuários chineses | | **Brave Search** | 2000 consultas/mês | Funcionalidade de busca web | +| **Tavily** | 1000 consultas/mês | Otimizado para busca de agentes de IA | | **Groq** | Plano gratuito disponível | Inferência ultra-rápida (Llama, Mixtral) | -| **Cerebras** | Plano gratuito disponível | Inferência ultra-rápida (Llama 3.3 70B) | +| **Cerebras** | Plano gratuito disponível | Inferência ultra-rápida (Llama, Qwen, etc.) | diff --git a/README.vi.md b/README.vi.md index 0dd4994c2..52be4a932 100644 --- a/README.vi.md +++ b/README.vi.md @@ -748,6 +748,7 @@ Subagent có quyền truy cập các công cụ (message, web_search, v.v.) và | `deepseek` (Đang thử nghiệm) | LLM (DeepSeek trực tiếp) | [platform.deepseek.com](https://platform.deepseek.com) | | `groq` | LLM + **Chuyển giọng nói** (Whisper) | [console.groq.com](https://console.groq.com) | | `qwen` | LLM (Qwen trực tiếp) | [dashscope.console.aliyun.com](https://dashscope.console.aliyun.com) | +| `qwen-oauth` | LLM (Qwen QR Code OAuth) | **Miễn phí** — Chạy `picoclaw auth login --provider qwen` | | `cerebras` | LLM (Cerebras trực tiếp) | [cerebras.ai](https://cerebras.ai) |
@@ -879,6 +880,7 @@ Thiết kế này cũng cho phép **hỗ trợ đa tác nhân** với lựa ch | **Groq** | `groq/` | `https://api.groq.com/openai/v1` | OpenAI | [Lấy Khóa](https://console.groq.com) | | **Moonshot** | `moonshot/` | `https://api.moonshot.cn/v1` | OpenAI | [Lấy Khóa](https://platform.moonshot.cn) | | **Qwen (Alibaba)** | `qwen/` | `https://dashscope.aliyuncs.com/compatible-mode/v1` | OpenAI | [Lấy Khóa](https://dashscope.console.aliyun.com) | +| **Qwen OAuth** | `qwen-oauth/` | `https://portal.qwen.ai/v1` | OpenAI | **Miễn phí** — `picoclaw auth login --provider qwen` | | **NVIDIA** | `nvidia/` | `https://integrate.api.nvidia.com/v1` | OpenAI | [Lấy Khóa](https://build.nvidia.com) | | **Ollama** | `ollama/` | `http://localhost:11434/v1` | OpenAI | Local (không cần khóa) | | **OpenRouter** | `openrouter/` | `https://openrouter.ai/api/v1` | OpenAI | [Lấy Khóa](https://openrouter.ai/keys) | @@ -948,6 +950,16 @@ Thiết kế này cũng cho phép **hỗ trợ đa tác nhân** với lựa ch ``` > Chạy `picoclaw auth login --provider anthropic` để thiết lập thông tin xác thực OAuth. +**Qwen OAuth (đăng nhập bằng QR code)** +```json +{ + "model_name": "qwen-coder", + "model": "qwen-oauth/coder-model", + "auth_method": "oauth" +} +``` +> Chạy `picoclaw auth login --provider qwen` để quét mã QR và xác thực. Không cần API key! + **Proxy/API tùy chỉnh** ```json { @@ -1108,4 +1120,6 @@ Một số nhà cung cấp (như Zhipu) có bộ lọc nội dung nghiêm ngặt | **OpenRouter** | 200K tokens/tháng | Đa model (Claude, GPT-4, v.v.) | | **Zhipu** | 200K tokens/tháng | Tốt nhất cho người dùng Trung Quốc | | **Brave Search** | 2000 truy vấn/tháng | Chức năng tìm kiếm web | -| **Groq** | Có gói miễn phí | Suy luận siêu nhanh (Llama, Mixtral) | +| **Tavily** | 1000 truy vấn/tháng | Tối ưu cho tìm kiếm agent AI | +| **Groq** | Gói miễn phí available | Suy luận siêu nhanh (Llama, Mixtral) | +| **Cerebras** | Gói miễn phí available | Suy luận siêu nhanh (Llama, Qwen, v.v.) | diff --git a/README.zh.md b/README.zh.md index 8ce1ad2ee..903ce972d 100644 --- a/README.zh.md +++ b/README.zh.md @@ -427,6 +427,7 @@ Agent 读取 HEARTBEAT.md | `openai(待测试)` | LLM (GPT 直连) | [platform.openai.com](https://platform.openai.com) | | `deepseek(待测试)` | LLM (DeepSeek 直连) | [platform.deepseek.com](https://platform.deepseek.com) | | `qwen` | LLM (通义千问) | [dashscope.console.aliyun.com](https://dashscope.console.aliyun.com) | +| `qwen-oauth` | LLM (通义千问二维码登录) | **免费** — 运行 `picoclaw auth login --provider qwen` | | `groq` | LLM + **语音转录** (Whisper) | [console.groq.com](https://console.groq.com) | | `cerebras` | LLM (Cerebras 直连) | [cerebras.ai](https://cerebras.ai) | @@ -453,6 +454,7 @@ Agent 读取 HEARTBEAT.md | **Groq** | `groq/` | `https://api.groq.com/openai/v1` | OpenAI | [获取密钥](https://console.groq.com) | | **Moonshot** | `moonshot/` | `https://api.moonshot.cn/v1` | OpenAI | [获取密钥](https://platform.moonshot.cn) | | **通义千问 (Qwen)** | `qwen/` | `https://dashscope.aliyuncs.com/compatible-mode/v1` | OpenAI | [获取密钥](https://dashscope.console.aliyun.com) | +| **Qwen OAuth** | `qwen-oauth/` | `https://portal.qwen.ai/v1` | OpenAI | **免费** — `picoclaw auth login --provider qwen` | | **NVIDIA** | `nvidia/` | `https://integrate.api.nvidia.com/v1` | OpenAI | [获取密钥](https://build.nvidia.com) | | **Ollama** | `ollama/` | `http://localhost:11434/v1` | OpenAI | 本地(无需密钥) | | **OpenRouter** | `openrouter/` | `https://openrouter.ai/api/v1` | OpenAI | [获取密钥](https://openrouter.ai/keys) | @@ -536,6 +538,18 @@ Agent 读取 HEARTBEAT.md > 运行 `picoclaw auth login --provider anthropic` 来设置 OAuth 凭证。 +**Qwen OAuth (二维码登录)** + +```json +{ + "model_name": "qwen-coder", + "model": "qwen-oauth/coder-model", + "auth_method": "oauth" +} +``` + +> 运行 `picoclaw auth login --provider qwen` 扫描二维码认证,无需 API 密钥! + **Ollama (本地)** ```json @@ -756,6 +770,148 @@ PicoClaw 通过 `cron` 工具支持定时提醒和重复任务: 任务存储在 `~/.picoclaw/workspace/cron/` 中并自动处理。 +### 负载均衡 (Load Balancing) + +为同一模型名称配置多个端点,PicoClaw 会自动在这些端点之间进行轮询: + +```json +{ + "model_list": [ + { + "model_name": "gpt-5.2", + "model": "openai/gpt-5.2", + "api_base": "https://api1.example.com/v1", + "api_key": "sk-key1" + }, + { + "model_name": "gpt-5.2", + "model": "openai/gpt-5.2", + "api_base": "https://api2.example.com/v1", + "api_key": "sk-key2" + } + ] +} +``` + +### 提供商架构 (Provider Architecture) + +PicoClaw 根据协议族路由提供商: + +- **OpenAI 兼容协议**: OpenRouter、OpenAI 兼容网关、Groq、智谱和 vLLM 风格的端点 +- **Anthropic 协议**: Claude 原生 API 行为 +- **Codex/OAuth 路径**: OpenAI OAuth/令牌认证路由 + +这使得运行时保持轻量,同时让新的 OpenAI 兼容后端主要通过配置操作(`api_base` + `api_key`)即可接入。 + +
+智谱 (Zhipu) 配置示例 + +**1. 获取 API Key 和 Base URL** + +* 获取 [API Key](https://bigmodel.cn/usercenter/proj-mgmt/apikeys) + +**2. 配置** + +```json +{ + "agents": { + "defaults": { + "workspace": "~/.picoclaw/workspace", + "model": "glm-4.7", + "max_tokens": 8192, + "temperature": 0.7, + "max_tool_iterations": 20 + } + }, + "providers": { + "zhipu": { + "api_key": "您的 API Key", + "api_base": "https://open.bigmodel.cn/api/paas/v4" + } + } +} +``` + +**3. 运行** + +```bash +picoclaw agent -m "你好" +``` + +
+ +
+完整配置示例 + +```json +{ + "agents": { + "defaults": { + "model": "anthropic/claude-opus-4-5" + } + }, + "providers": { + "openrouter": { + "api_key": "sk-or-v1-xxx" + }, + "groq": { + "api_key": "gsk_xxx" + } + }, + "channels": { + "telegram": { + "enabled": true, + "token": "123456:ABC...", + "allow_from": ["123456789"] + }, + "discord": { + "enabled": true, + "token": "", + "allow_from": [""] + }, + "whatsapp": { + "enabled": false + }, + "feishu": { + "enabled": false, + "app_id": "cli_xxx", + "app_secret": "xxx", + "encrypt_key": "", + "verification_token": "", + "allow_from": [] + }, + "qq": { + "enabled": false, + "app_id": "", + "app_secret": "", + "allow_from": [] + } + }, + "tools": { + "web": { + "brave": { + "enabled": false, + "api_key": "YOUR_BRAVE_API_KEY", + "max_results": 5 + }, + "duckduckgo": { + "enabled": true, + "max_results": 5 + } + }, + "cron": { + "exec_timeout_minutes": 5 + } + }, + "heartbeat": { + "enabled": true, + "interval": 30 + } +} +``` + +
+ ## 🤝 贡献与路线图 (Roadmap) 欢迎提交 PR!代码库刻意保持小巧和可读。🤗 @@ -818,3 +974,4 @@ Discord: [https://discord.gg/V4sAZ9XWpN](https://discord.gg/V4sAZ9XWpN) | **Brave Search** | 2000 次查询/月 | 网络搜索功能 | | **Tavily** | 1000 次查询/月 | AI Agent 搜索优化 | | **Groq** | 提供免费层级 | 极速推理 (Llama, Mixtral) | +| **Cerebras** | 提供免费层级 | 极速推理 (Llama, Qwen 等) |