
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
@cloudbase/agent-adapter-langgraph
Advanced tools
LangGraph adapter for AG-Kit agents. This package provides integration between AG-Kit and LangGraph framework, enabling you to use LangGraph workflows with AG-Kit's agent infrastructure.
npm install @cloudbase/agent-agents @cloudbase/agent-adapter-langgraph
import { StateGraph, START, END } from "@langchain/langgraph";
import { AGKitStateAnnotation, LanggraphAgent } from "@cloudbase/agent-adapter-langgraph";
import { AgentConfig } from "@cloudbase/agent-agents/abstract";
// Create your LangGraph workflow
const workflow = new StateGraph(AGKitStateAnnotation)
.addNode("chat_node", chatNode)
.addEdge(START, "chat_node")
.addEdge("chat_node", END);
const compiledWorkflow = workflow.compile();
// Create the agent
const agent = new LanggraphAgent({
name: "my-langgraph-agent",
description: "A LangGraph agent",
compiledWorkflow,
});
import { TDAISaver } from "@cloudbase/agent-adapter-langgraph";
import { MemoryClient } from "@cloudbase/agent-agents";
const memoryClient = new MemoryClient({
endpoint: "https://api.tdai.com",
apiKey: "your-api-key",
memoryId: "your-memory-id",
});
const checkpointer = new TDAISaver({
endpoint: "https://api.tdai.com",
apiKey: "your-api-key",
memoryId: "your-memory-id",
});
const compiledWorkflow = workflow.compile({
checkpointer,
});
import { TDAIStore } from "@cloudbase/agent-adapter-langgraph";
import { MemoryClient } from "@cloudbase/agent-agents";
const memoryClient = new MemoryClient({
endpoint: "https://api.tdai.com",
apiKey: "your-api-key",
memoryId: "your-memory-id",
});
const store = new TDAIStore({
memoryClient,
sessionId: "session-123",
});
Agent class that extends AbstractAgent and works with compiled LangGraph workflows.
Constructor:
constructor(config: AgentConfig & { compiledWorkflow: CompiledStateGraph })
Checkpoint saver implementation for LangGraph using TDAI Memory.
Constructor:
constructor(config: TDAISaverConfig)
Store implementation for LangGraph using TDAI Memory.
Constructor:
constructor(config: TDAIStoreConfig)
@cloudbase/agent-agents: Core agent functionality@langchain/langgraph: LangGraph framework@langchain/core: LangChain core utilitiesrxjs: Reactive extensions for JavaScriptFAQs
LangGraph adapter for AG-Kit agents
We found that @cloudbase/agent-adapter-langgraph 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.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.