
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
core-agentkit-langchain
Advanced tools
LangChain integration for Core AgentKit, enabling seamless use of Core blockchain actions within LangChain workflows.
npm install core-agentkit-langchain
import {
AgentKit,
CoreWalletProvider,
coreActionProvider,
} from "core-agentkit";
import { getLangChainTools } from "core-agentkit-langchain";
import { ChatOpenAI } from "@langchain/openai";
// or use any other LLM like ChatGoogleGenerativeAI
// Create wallet provider
const walletProvider = new CoreWalletProvider(
process.env.PRIVATE_KEY!,
"core-testnet"
);
// Create AgentKit instance
const agentKit = AgentKit.from(walletProvider, [coreActionProvider()]);
// Get LangChain tools
const tools = await getLangChainTools(agentKit);
// Create LLM with tools
const llm = new ChatOpenAI({ model: "gpt-4", temperature: 0 });
const llmWithTools = llm.bindTools(tools);
// Use the LLM with tools
const result = await llmWithTools.invoke([
{
role: "user",
content: "Transfer 0.1 CORE to 0x742d35Cc6634C0532925a3b8D81C3f83C7A84C5e",
},
]);
// Handle tool calls
if (result && result.tool_calls && result.tool_calls.length > 0) {
console.log("Executing tools:", result.tool_calls);
const toolMessages = await Promise.all(
result.tool_calls.map(async (toolCall: any) => {
const tool = tools.find((t: any) => t.name === toolCall.name);
if (!tool) {
return {
content: `Tool ${toolCall.name} not found.`,
tool_call_id: toolCall.id,
};
}
try {
const output = await tool.invoke(toolCall.args);
return {
content: typeof output === "string" ? output : JSON.stringify(output),
tool_call_id: toolCall.id,
};
} catch (error) {
return {
content: `Error executing tool ${toolCall.name}: ${(error as Error).message}`,
tool_call_id: toolCall.id,
};
}
})
);
console.log("Tool execution results:", toolMessages);
}
import {
AgentKit,
CoreWalletProvider,
coreActionProvider,
} from "core-agentkit";
import { getLangChainTools } from "core-agentkit-langchain";
import { ChatOpenAI } from "@langchain/openai";
import { createReactAgent } from "@langchain/langgraph/prebuilt";
// Create wallet provider
const walletProvider = new CoreWalletProvider(
process.env.PRIVATE_KEY!,
"core-testnet"
);
// Create AgentKit instance
const agentKit = AgentKit.from(walletProvider, [coreActionProvider()]);
// Get LangChain tools
const tools = await getLangChainTools(agentKit);
// Create agent
const model = new ChatOpenAI({ temperature: 0 });
const agent = createReactAgent({ llm: model, tools });
// Use agent
const result = await agent.invoke({
messages: [{ role: "user", content: "Check my CORE balance" }],
});
When you convert Core AgentKit actions to LangChain tools, you get access to:
getLangChainTools(agentKit: AgentKit): Promise<StructuredTool[]>Converts all actions from a Core AgentKit instance into LangChain tools.
createLangChainTool(action: Action): StructuredToolConverts a single Core AgentKit action into a LangChain tool.
MIT
FAQs
LangChain integration for Core AgentKit
The npm package core-agentkit-langchain receives a total of 2 weekly downloads. As such, core-agentkit-langchain popularity was classified as not popular.
We found that core-agentkit-langchain demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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 won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.