
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
@cloudbase/agent-adapter-langchain
Advanced tools
将 LangChain Agent 转换为符合 AG-UI 协议 的 Agent。
createAgent() 创建的 Agent 包装为 AG-UI 兼容的 Agentnpm install @cloudbase/agent-adapter-langchain
import { run } from "@cloudbase/agent-server";
import { createAgent as createLangchainAgent } from "langchain";
import { MemorySaver } from "@langchain/langgraph";
import { ChatOpenAI } from "@langchain/openai";
import { LangchainAgent, clientTools } from "@cloudbase/agent-adapter-langchain";
const checkpointer = new MemorySaver();
const model = new ChatOpenAI({
model: process.env.OPENAI_MODEL!,
apiKey: process.env.OPENAI_API_KEY!,
configuration: {
baseURL: process.env.OPENAI_BASE_URL,
},
});
// 创建 LangChain Agent,使用 clientTools 中间件支持客户端工具
const lcAgent = createLangchainAgent({
model,
checkpointer,
middleware: [clientTools()],
});
// 部署为 HTTP 服务
run({
createAgent: () => ({
agent: new LangchainAgent({ agent: lcAgent }),
}),
port: 9000,
});
将 LangChain Agent 包装为 AG-UI 兼容的 Agent。
type LangchainAgentConfig = AgentConfig & {
agent: ReturnType<typeof createAgent>; // LangChain 的 createAgent() 返回值
logger?: Logger; // 可选,日志实例
};
const agent = new LangchainAgent(config);
AgentConfig:来自 AG-UI 协议Logger:日志接口,详见 @cloudbase/agent-server 文档创建一个中间件,让客户端可以动态注入工具到 Agent 调用中。
const agent = createAgent({
model,
checkpointer,
middleware: [clientTools()],
});
客户端定义的工具会与服务端工具合并使用。
langchain:LangChain Agent 框架@langchain/langgraph:Agent 会话记忆(MemorySaver)@langchain/openai:OpenAI 兼容模型接入📚 完整文档请参阅 云开发 Agent 开发指南
FAQs
LangChain adapter for AG-Kit agents
The npm package @cloudbase/agent-adapter-langchain receives a total of 582 weekly downloads. As such, @cloudbase/agent-adapter-langchain popularity was classified as not popular.
We found that @cloudbase/agent-adapter-langchain demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.