自己招一个ai员工-Ubuntu22.04安装Openclaw详细教程-小白可直接上手-持续更新中

自己招一个ai员工-Ubuntu22.04安装Openclaw详细教程-小白可直接上手-持续更新中

Ubuntu22.04安装Openclaw

虽然gnuradio我已经弄完了,项目已经做完。但是还需要完整移植一下,并且要修改射频前端,提高带宽,提高频率切换速度。安装openclaw,其实是想让ai帮我实现gnuradio移植、FPGA程序编写、射频以及ARM里面的linux编程。
一句话验证ai是否能帮我提高效率。

准备工作

还是三哥说的,做什么事情都要找到官网:openclaw的中文官网网址如下:
https://clawd.org.cn/
我们就用中文的,也不翻墙。也不搞什么花里胡哨的东西。

在这里插入图片描述

一键安装

curl -fsSL https://clawd.org.cn/install.sh | sudo bash

在这里插入图片描述


在这里插入图片描述


输入Y

在这里插入图片描述

## 这里面需要deepseek的apikey
我们到https://platform.deepseek.com/sign_in
注册,并获取apikey

在这里插入图片描述


在这里插入图片描述
回到安装终端中,输入key

在这里插入图片描述

设置通道 配置飞书

需要创建飞书机器人。
https://open.feishu.cn,进入开发者后台,这里面需要注册用户,并创建ai机器人。

在这里插入图片描述


创建好后,就能看到app id 和app secret了。

在这里插入图片描述


之后在安装终端中填入app id和secret
在后续也可以单独输入命令
openclaw-cn configure --section channels

在这里插入图片描述
在这里插入图片描述


在这里插入图片描述
在这里插入图片描述


在这里插入图片描述


在这里插入图片描述


如果有问题,运行openclaw-cn onboard --install-daemon,在重新配置一下。
以上gateway没有安装,所以打不开网页端。
执行sudo apt install net-tools 安装必备的工具,之后就可以打开了。

在这里插入图片描述


好了,enjoy吧!

让ai员工更好用

加入免费的模型

配置 GLM-4 .7-Flash官方免费API
https://bigmodel.cn/ 注册个开发者,之后获取apikey

在这里插入图片描述


进入控制台,新建个apikey,之后复制。
之后在openclaw.json文件中写入:
“models”: {
“providers”: {
“glm”: {
“baseUrl”: “https://open.bigmodel.cn/api/paas/v4”,
“apiKey”: “你的apiKey”,
“api”: “openai-completions”,
“models”: [
{
“id”: “glm-4.7-flash”,
“name”: “GLM-4.7 Flash”,
“contextWindow”: 128000,
“maxTokens”: 4096,
“reasoning”: false,
“input”: [
“text”
],
“cost”: {
“input”: 0,
“output”: 0,
“cacheRead”: 0,
“cacheWrite”: 0
}
}
]
}
}
},
“agents”: {
“defaults”: {
“model”: {
“primary”: “glm/glm-4.7-flash”
},
“maxConcurrent”: 4,
“subagents”: {
“maxConcurrent”: 8
}
}
},

可以重新启动openclaw,执行openclaw-cn gateway restart

在这里插入图片描述

配置钉钉

https://open-dev.dingtalk.com 在钉钉开发者平台上拷贝apikey 和secret。
Client ID(即 AppKey)
Client Secret(即 AppSecret)
在“权限管理”中,搜索并添加权限:
Card.Instance.Write(卡片实例写权限)
Card.Streaming.Write(卡片流式写权限)
im:message(消息相关权限,根据需要)
之后安装dingtalk插件
OpenClaw 默认没有内置钉钉插件,需要手动安装社区版本:
openclaw-cn plugins install https://github.com/soimy/clawdbot-channel-dingtalk.git

在这里插入图片描述

在GLM-4 .7-Flash基础上加入deepseek

帮我再添加deepseek,我已经有deepseek的apikey了,当GLM-4.7 Flash免费tocken不够了的时候自动切换到deepseek

在这里插入图片描述


但是ai员工就卡住了。
原来是openclaw.json文件配置错了,在修改一下,加入apikey就可以了。
重启openclaw-cn gateway restart就可以。

在这里插入图片描述


在这里插入图片描述

加入minimax和豆包模型

  1. MiniMax M2.5 API Key获取访问MiniMax平台:https://api.minimax.chat/;
    注册/登录账号,直接获取API Key,复制保存备用。
  2. Seedance2.0 API Key获取访问火山方舟平台:https://console.volcengine.com/ark;
    注册/登录火山引擎账号,开通“火山方舟”服务;
    在“API Key管理”页面创建Key,复制保存备用。
    之后配置openclaw.json
    就可以接入多个大模型了。

配置web搜索

https://exa.ai/
这个可以免费注册

在这里插入图片描述


Sign In
之后填写信息:

在这里插入图片描述
在这里插入图片描述


之后我们copy setup prompt,以便后面使用
之后copy一下apikey,把这个apikey告诉openclaw,让它帮你配置就好了。
输入:
我注册了Exa.ai,并得到apikey:b9fxxxxx,请帮我配置exa.ai,代替Brave Search进行网络搜索。
之后重启openclaw-cn gateway restart,之后就可以。

# Exa API Setup Guide ## Your Configuration | Setting | Value | |---------|-------| | Coding Tool | Codex | | Framework | Other | | Use Case | Web search tool | | Search Type | Auto - Balanced relevance and speed (~1 second) | | Content | Full text | **Project Description:** (Not provided) --- ## API Key Setup ### Environment Variable ```bash export EXA_API_KEY="YOUR_API_KEY" 

.env File

EXA_API_KEY=YOUR_API_KEY 

🔌 Exa MCP Server for OpenAI Codex

Give OpenAI Codex real-time web search, code context, and company research with Exa MCP.

Run in terminal:

codex mcp add exa --url https://mcp.exa.ai/mcp?exaApiKey=f2492f04-b9f0-4c09-86a5-1ce6e1b9a24a 

Tool enablement (optional):
Add a tools= query param to the MCP URL.

Enable specific tools:

https://mcp.exa.ai/mcp?exaApiKey=f2492f04-b9f0-4c09-86a5-1ce6e1b9a24a&tools=web_search_exa,get_code_context_exa,people_search_exa 

Enable all tools:

https://mcp.exa.ai/mcp?exaApiKey=f2492f04-b9f0-4c09-86a5-1ce6e1b9a24a&tools=web_search_exa,web_search_advanced_exa,get_code_context_exa,crawling_exa,company_research_exa,people_search_exa,deep_researcher_start,deep_researcher_check 

Your API key:f2492f04-b9f0-4c09-86a5-1ce6e1b9a24a
Manage keys at dashboard.exa.ai/api-keys.

Troubleshooting: if tools don’t appear, restart your MCP client after updating the config.

📖 Full docs: docs.exa.ai/reference/exa-mcp


Quick Start

cURL

curl-X POST 'https://api.exa.ai/search'\-H'x-api-key: YOUR_API_KEY'\-H'Content-Type: application/json'\-d'{ "query": "latest developments in AI safety research", "type": "auto", "num_results": 10, "contents": { "text": { "max_characters": 20000 } } }'

Function Calling / Tool Use

Function calling (also known as tool use) allows your AI agent to dynamically decide when to search the web based on the conversation context. Instead of searching on every request, the LLM intelligently determines when real-time information would improve its response—making your agent more efficient and accurate.

Why use function calling with Exa?

  • Your agent can ground responses in current, factual information
  • Reduces hallucinations by fetching real sources when needed
  • Enables multi-step reasoning where the agent searches, analyzes, and responds

📚 Full documentation: https://docs.exa.ai/reference/openai-tool-calling

OpenAI Function Calling

import json from openai import OpenAI from exa_py import Exa openai = OpenAI() exa = Exa() tools =[{"type":"function","function":{"name":"exa_search","description":"Search the web for current information.","parameters":{"type":"object","properties":{"query":{"type":"string","description":"Search query"}},"required":["query"]}}}]defexa_search(query:str)->str: results = exa.search_and_contents(query,type="auto", num_results=10, text={"max_characters":20000})return"\n".join([f"{r.title}: {r.url}"for r in results.results]) messages =[{"role":"user","content":"What's the latest in AI safety?"}] response = openai.chat.completions.create(model="gpt-4o", messages=messages, tools=tools)if response.choices[0].message.tool_calls: tool_call = response.choices[0].message.tool_calls[0] search_results = exa_search(json.loads(tool_call.function.arguments)["query"]) messages.append(response.choices[0].message) messages.append({"role":"tool","tool_call_id": tool_call.id,"content": search_results}) final = openai.chat.completions.create(model="gpt-4o", messages=messages)print(final.choices[0].message.content)

Anthropic Tool Use

import anthropic from exa_py import Exa client = anthropic.Anthropic() exa = Exa() tools =[{"name":"exa_search","description":"Search the web for current information.","input_schema":{"type":"object","properties":{"query":{"type":"string","description":"Search query"}},"required":["query"]}}]defexa_search(query:str)->str: results = exa.search_and_contents(query,type="auto", num_results=10, text={"max_characters":20000})return"\n".join([f"{r.title}: {r.url}"for r in results.results]) messages =[{"role":"user","content":"Latest quantum computing developments?"}] response = client.messages.create(model="claude-sonnet-4-20250514", max_tokens=4096, tools=tools, messages=messages)if response.stop_reason =="tool_use": tool_use =next(b for b in response.content if b.type=="tool_use") tool_result = exa_search(tool_use.input["query"]) messages.append({"role":"assistant","content": response.content}) messages.append({"role":"user","content":[{"type":"tool_result","tool_use_id": tool_use.id,"content": tool_result}]}) final = client.messages.create(model="claude-sonnet-4-20250514", max_tokens=4096, tools=tools, messages=messages)print(final.content[0].text)

Search Type Reference

TypeBest ForSpeedDepth
fastReal-time apps, autocomplete, quick lookupsFastestBasic
autoMost queries - balanced relevance & speedMediumSmart
deepResearch, enrichment, thorough resultsSlowDeep
deep-reasoningComplex research, multi-step reasoningSlowestDeepest

Tip:type="auto" works well for most queries. Use type="deep" when you need thorough research results or structured outputs with field-level grounding.


Content Configuration

Choose ONE content type per request (not both):

TypeConfigBest For
Text"text": {"max_characters": 20000}Full content extraction, RAG
Highlights"highlights": {"max_characters": 4000}Snippets, summaries, lower cost

⚠️ Token usage warning: Using text: true (full page text) can significantly increase token count, leading to slower and more expensive LLM calls. To mitigate:

  • Add max_characters limit: "text": {"max_characters": 10000}
  • Use highlights instead if you don’t need contiguous text

When to use text vs highlights:

  • Text - When you need untruncated, contiguous content (e.g., code snippets, full articles, documentation)
  • Highlights - When you need key excerpts and don’t need the full context (e.g., summaries, Q&A, general research)

Domain Filtering (Optional)

Usually not needed - Exa’s neural search finds relevant results without domain restrictions.

When to use:

  • Targeting specific authoritative sources
  • Excluding low-quality domains from results

Example:

{"includeDomains":["arxiv.org","github.com"],"excludeDomains":["pinterest.com"]}

Note:includeDomains and excludeDomains can be used together to include a broad domain while excluding specific subdomains (e.g., "includeDomains": ["vercel.com"], "excludeDomains": ["community.vercel.com"]).


Web Search Tool

{"query":"latest developments in AI safety research","num_results":10,"contents":{"text":{"max_characters":20000}}}

Tips:

  • Use type: "auto" for most queries
  • Great for building search-powered chatbots or agents
  • Combine with contents for RAG workflows

Category Examples

Use category filters to search dedicated indexes. Each category returns only that content type.

Note: Categories can be restrictive. If you’re not getting enough results, try searching without a category first, then add one if needed.

People Search (category: "people")

Find people by role, expertise, or what they work on

curl-X POST 'https://api.exa.ai/search'\-H'x-api-key: YOUR_API_KEY'\-H'Content-Type: application/json'\-d'{ "query": "software engineer distributed systems", "category": "people", "type": "auto", "num_results": 10 }'

Tips:

  • Use SINGULAR form
  • Describe what they work on
  • No date/text filters supported

Company Search (category: "company")

Find companies by industry, criteria, or attributes

curl-X POST 'https://api.exa.ai/search'\-H'x-api-key: YOUR_API_KEY'\-H'Content-Type: application/json'\-d'{ "query": "AI startup healthcare", "category": "company", "type": "auto", "num_results": 10 }'

Tips:

  • Use SINGULAR form
  • Simple entity queries
  • Returns company objects, not articles

News Search (category: "news")

News articles

curl-X POST 'https://api.exa.ai/search'\-H'x-api-key: YOUR_API_KEY'\-H'Content-Type: application/json'\-d'{ "query": "OpenAI announcements", "category": "news", "type": "auto", "num_results": 10, "contents": { "text": { "max_characters": 20000 } } }'

Tips:

  • Use livecrawl: “preferred” for breaking news
  • Avoid date filters unless required

Research Papers (category: "research paper")

Academic papers

curl-X POST 'https://api.exa.ai/search'\-H'x-api-key: YOUR_API_KEY'\-H'Content-Type: application/json'\-d'{ "query": "transformer architecture improvements", "category": "research paper", "type": "auto", "num_results": 10, "contents": { "text": { "max_characters": 20000 } } }'

Tips:

  • Use type: “auto” for most queries
  • Includes arxiv.org, paperswithcode.com, and other academic sources

Tweet Search (category: "tweet")

Twitter/X posts

curl-X POST 'https://api.exa.ai/search'\-H'x-api-key: YOUR_API_KEY'\-H'Content-Type: application/json'\-d'{ "query": "AI safety discussion", "category": "tweet", "type": "auto", "num_results": 10, "contents": { "text": { "max_characters": 20000 } } }'

Tips:

  • Good for real-time discussions
  • Captures public sentiment

Content Freshness (maxAgeHours)

maxAgeHours sets the maximum acceptable age (in hours) for cached content. If the cached version is older than this threshold, Exa will livecrawl the page to get fresh content.

ValueBehaviorBest For
24Use cache if less than 24 hours old, otherwise livecrawlDaily-fresh content
1Use cache if less than 1 hour old, otherwise livecrawlNear real-time data
0Always livecrawl (ignore cache entirely)Real-time data where cached content is unusable
-1Never livecrawl (cache only)Maximum speed, historical/static content
(omit)Default behavior (livecrawl as fallback if no cache exists)Recommended — balanced speed and freshness

When LiveCrawl Isn’t Necessary:
Cached data is sufficient for many queries, especially for historical topics or educational content. These subjects rarely change, so reliable cached results can provide accurate information quickly.

See maxAgeHours docs for more details.


Other Endpoints

Beyond /search, Exa offers these endpoints:

EndpointDescriptionDocs
/contentsGet contents for known URLsDocs
/answerQ&A with citations from web searchDocs

Example - Get contents for URLs:

POST/contents {"urls":["https://example.com/article"],"text":{"max_characters":20000}}

Troubleshooting

Results not relevant?

  1. Try type: "auto" - most balanced option
  2. Try type: "deep" - runs multiple query variations and ranks the combined results
  3. Refine query - use singular form, be specific
  4. Check category matches your use case

Need structured data from search?

  1. Use type: "deep" or type: "deep-reasoning" with outputSchema
  2. Define the fields you need in the schema — Exa returns grounded JSON with citations

Results too slow?

  1. Use type: "fast"
  2. Reduce num_results
  3. Skip contents if you only need URLs

No results?

  1. Remove filters (date, domain restrictions)
  2. Simplify query
  3. Try type: "auto" - has fallback mechanisms

Resources

  • Docs: https://exa.ai/docs
  • Dashboard: https://dashboard.exa.ai
  • API Status: https://status.exa.ai

Read more

仿生新势力:Openclaw开源仿生爪,如何革新机器人抓取?

仿生新势力:Openclaw开源仿生爪,如何革新机器人抓取?

仿生新势力:Openclaw开源仿生爪,如何革新机器人抓取? 引言 在仓储、农业乃至家庭服务中,机器人如何像猫一样灵巧、自适应地抓取千变万化的物体?这曾是行业难题。如今,一个名为 Openclaw 的开源仿生机械爪项目,正以其独特的被动适应性设计和亲民的成本,在机器人末端执行器领域掀起波澜。本文将深入解析Openclaw的仿生奥秘、实现原理、应用场景及未来布局,带你全面了解这款来自开源社区的“仿生新势力”。 一、 核心揭秘:从猫爪到机械爪的实现原理 本节将拆解Openclaw如何将生物灵感转化为工程现实。 1. 仿生学设计理念 Openclaw的核心灵感源于猫科动物爪部。当猫抓取物体时,其爪趾会自然地包裹贴合物体表面,这种能力主要依赖于其肌腱和骨骼的被动结构,而非大脑的实时精密控制。Openclaw借鉴了这一思想,核心是被动适应性机制。它无需依赖复杂的传感器反馈和实时力控算法,仅凭精巧的机械结构即可根据物体形状自动调整接触点和抓取力,从而极大地简化了控制系统。 配图建议:猫爪与Openclaw的对比图,或Openclaw抓取不同形状物体的动态示意图。 2. 欠驱动与

FPGA读写DDR4 (一)MIG IP核控制信号

FPGA读写DDR4 (一)MIG IP核控制信号

前言         这几个星期在倒腾DDR4内存的读写控制,期间看了不少资料,这几天终于完工了于是想着把做过的内容总结一下,于是有了这篇文章,由于控制DDR4的内容很多,这一篇文章就只讲基础的,也就是DDR4的控制IP核 MIG的控制信号。         主要参考内容:【正点原子】MPSoC-P4之FPGA开发指南_V2.0,[XILINX] pg150-ultrascale-memory-ip-en-us-1.4 MIG IP核控制信号 IP核创建界面         MIG IP核(memory interface generator)是用户与DDR4进行沟通的桥梁,因为如果我们自己去写直接DDR4代码的话,其内容将会非常复杂,而且即便写出来其性能可能也不会好,以XILINX提供的MIG IP核为例,在综合布线后查看utilization,能发现MIG IP核足足使用了约7500个LUT和9000个register资源,足以看出其编写的复杂,不过对于我们普通用户,能够操作MIG提供的用户接口就我觉得就算差不多了,既然要使用IP核,我们就从IP核的创建界面开始说起,

OpenClaw配置 GLM-4.7 Flash+DuckDuckGo 实现飞书机器人联网问答

OpenClaw配置 GLM-4.7 Flash+DuckDuckGo 实现飞书机器人联网问答

摘要 OpenClaw+GLM-4.7 Flash+DuckDuckGo:手把手教你搭建飞书群聊联网问答机器人。本文提供一套100% 免费的落地方案,详解 OpenClaw 安装、GLM-4.7 Flash 模型配置、DuckDuckGo 搜索插件启用、飞书应用创建与网关对接、群聊白名单配置等关键步骤,附完整命令与避坑指南,实现飞书内 @机器人即可获取实时联网信息,打造高效团队协作 AI 工具。 效果展示 准备工作 node.js安装 下载地址 https://nodejs.org/en/download 安装完成。 git 安装 下载地址 https://git-scm.com/install/windows 上图普通用户默认选择,我是程序员,因此选择第二项 接下来的步骤都是保持默认选择,点击Next,

【离散化 线段树 二分查找】3661可以被机器人摧毁的最大墙壁数目|2525

【离散化 线段树 二分查找】3661可以被机器人摧毁的最大墙壁数目|2525

本文涉及知识点 【C++】树状数组的使用、原理、封装类、样例 C++线段树 C++二分查找 3661. 可以被机器人摧毁的最大墙壁数目 一条无限长的直线上分布着一些机器人和墙壁。给你整数数组 robots ,distance 和 walls: robots[i] 是第 i 个机器人的位置。 distance[i] 是第 i 个机器人的子弹可以行进的 最大 距离。 walls[j] 是第 j 堵墙的位置。 每个机器人有 一颗 子弹,可以向左或向右发射,最远距离为 distance[i] 米。 子弹会摧毁其射程内路径上的每一堵墙。机器人是固定的障碍物:如果子弹在到达墙壁前击中另一个机器人,它会 立即 在该机器人处停止,无法继续前进。