
Security News
GitHub Actions Adds cache-mode to Limit Cache Poisoning Risk
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.
@suwappu/langchain-suwappu
Advanced tools
LangChain-compatible tools for the Suwappu DEX API — cross-chain swaps, prices, and portfolio tracking for AI agents
LangChain-compatible tools for the Suwappu DEX API. Gives AI agents the ability to get swap quotes, token prices, and portfolio balances across 7+ chains.
npm install langchain-suwappu @langchain/core zod
| Tool | Description |
|---|---|
SuwappuSwapTool | Get quotes and execute cross-chain token swaps |
SuwappuPriceTool | Get current token prices in USD |
SuwappuPortfolioTool | Get wallet token balances and portfolio value |
import { SuwappuSwapTool, SuwappuPriceTool, SuwappuPortfolioTool } from "langchain-suwappu";
const config = { apiKey: process.env.SUWAPPU_API_KEY! };
const tools = [
new SuwappuSwapTool(config),
new SuwappuPriceTool(config),
new SuwappuPortfolioTool(config),
];
import { ChatOpenAI } from "@langchain/openai";
import { AgentExecutor, createOpenAIFunctionsAgent } from "langchain/agents";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { SuwappuSwapTool, SuwappuPriceTool, SuwappuPortfolioTool } from "langchain-suwappu";
const config = { apiKey: process.env.SUWAPPU_API_KEY! };
const tools = [
new SuwappuSwapTool(config),
new SuwappuPriceTool(config),
new SuwappuPortfolioTool(config),
];
const llm = new ChatOpenAI({ model: "gpt-4o", temperature: 0 });
const prompt = ChatPromptTemplate.fromMessages([
["system", "You are a DeFi assistant that can look up prices, get swap quotes, and check portfolio balances."],
["human", "{input}"],
["placeholder", "{agent_scratchpad}"],
]);
const agent = await createOpenAIFunctionsAgent({ llm, tools, prompt });
const executor = new AgentExecutor({ agent, tools });
const result = await executor.invoke({
input: "What's the current price of ETH and get me a quote to swap 1 ETH to USDC on Base",
});
console.log(result.output);
import { SuwappuSwapTool } from "langchain-suwappu";
const swap = new SuwappuSwapTool({ apiKey: "your-api-key" });
const quote = await swap.invoke({
from_token: "ETH",
to_token: "USDC",
amount: "1.0",
chain: "base",
});
console.log(quote);
// Swap Quote (base)
// 1.0 ETH -> 3245.50 USDC
// Rate: 3245.50
// Price impact: 0.02%
import { SuwappuPriceTool } from "langchain-suwappu";
const prices = new SuwappuPriceTool({ apiKey: "your-api-key" });
const result = await prices.invoke({ symbols: "ETH,BTC,SOL" });
console.log(result);
// Token Prices (USD)
// ETH: $3245.50
// BTC: $67890.00
// SOL: $142.30
import { SuwappuPortfolioTool } from "langchain-suwappu";
const portfolio = new SuwappuPortfolioTool({ apiKey: "your-api-key" });
const result = await portfolio.invoke({
wallet_address: "0x1234...abcd",
});
console.log(result);
// Portfolio for 0x1234...abcd
// Total value: $12345.67
// ETH: 2.5 ($8113.75)
// USDC: 4231.92 ($4231.92)
Point to a different API endpoint (useful for staging/testing):
const swap = new SuwappuSwapTool({
apiKey: "your-api-key",
baseUrl: "https://staging-api.suwappu.bot",
});
Ethereum, Base, Arbitrum, Polygon, BSC, Optimism, Solana
MIT
FAQs
LangChain-compatible tools for the Suwappu DEX API — cross-chain swaps, prices, and portfolio tracking for AI agents
We found that @suwappu/langchain-suwappu 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.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.