
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@coinbase/twitter-langchain
Advanced tools
Twitter integration with Langchain to enable agentic workflows using the core primitives defined in cdp-agentkit-core.
This toolkit contains tools that enable an LLM agent to interact with Twitter. The toolkit provides a wrapper around the Twitter (X) API, allowing agents to perform social operations like posting text.
npm install @coinbase/twitter-langchain
Set the following environment variables:
export OPENAI_API_KEY=<your-openai-api-key>
export TWITTER_API_KEY=<your-api-key>
export TWITTER_API_SECRET=<your-api-secret>
export TWITTER_ACCESS_TOKEN=<your-access-token>
export TWITTER_ACCESS_TOKEN_SECRET=<your-access-token-secret>
export TWITTER_BEARER_TOKEN=<your-bearer-token>
import { TwitterAgentkit } from "@coinbase/cdp-agentkit-core";
import { TwitterToolkit } from "@coinbase/twitter-langchain";
// Initialize Twitter AgentKit
const agentkit = new TwitterAgentkit();
// Create toolkit
const toolkit = new TwitterToolkit(agentkit);
// Get available tools
const tools = toolkit.getTools();
The toolkit provides the following tools:
npm install @langchain/langgraph @langchain/openai
import { ChatOpenAI } from "@langchain/openai";
import { createReactAgent } from "@langchain/langgraph/prebuilt";
// Initialize LLM
const model = new ChatOpenAI({
model: "gpt-4o-mini",
});
// Create agent executor
const agent = createReactAgent({
llm: model,
tools,
});
// Example usage
const result = await agent.invoke({
messages: [new HumanMessage("please post 'hello, world!' to twitter")],
});
console.log(result.messages[result.messages.length - 1].content);
Check out twitter-langchain/examples for inspiration and help getting started!
See CONTRIBUTING.md for detailed setup instructions and contribution guidelines.
FAQs
Twitter (X) langchain Toolkit extension of CDP Agentkit
The npm package @coinbase/twitter-langchain receives a total of 7 weekly downloads. As such, @coinbase/twitter-langchain popularity was classified as not popular.
We found that @coinbase/twitter-langchain demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.