🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@cryptyx/langchain-tools

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cryptyx/langchain-tools

LangChain tool wrappers for the CRYPTYX x402 API. Drop-in DynamicStructuredTool instances that any LangChain agent can bind — signals, factor scores, institutional trigger evaluation, natural-language query. Payment plumbing handled via @cryptyx/x402-clie

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

@cryptyx/langchain-tools

LangChain DynamicStructuredTool wrappers over the CRYPTYX x402 API. Bind institutional-grade crypto conviction to any LangChain agent in three lines.

npm install @cryptyx/langchain-tools @cryptyx/x402-client @cryptyx/tool-schemas @langchain/core

Quickstart

import { ChatOpenAI } from '@langchain/openai';
import { AgentExecutor, createOpenAIFunctionsAgent } from 'langchain/agents';
import { ChatPromptTemplate } from '@langchain/core/prompts';
import { Cryptyx } from '@cryptyx/x402-client';
import { cryptyxTools } from '@cryptyx/langchain-tools';

const cx = new Cryptyx({
  wallet: process.env.WALLET_PRIVATE_KEY!,
  network: 'base',
  maxSpend: 2.0,
  onPay: (r) => console.log(`Paid $${r.priceUsd}${r.route}`),
});

const tools = cryptyxTools(cx);   // 15 LangChain tools ready

const prompt = ChatPromptTemplate.fromMessages([
  ['system', 'You are a crypto quant analyst. Use CRYPTYX tools to ground every claim in institutional evidence. Never recommend a trade without walk-forward-validated Sharpe > 0.3.'],
  ['placeholder', '{chat_history}'],
  ['human', '{input}'],
  ['placeholder', '{agent_scratchpad}'],
]);

const llm = new ChatOpenAI({ model: 'gpt-4o' });
const agent = await createOpenAIFunctionsAgent({ llm, tools, prompt });
const executor = new AgentExecutor({ agent, tools });

const result = await executor.invoke({
  input: 'What is the strongest institutional-grade trigger firing on BTC or ETH right now, and should I act on it?',
});
console.log(result.output);

Tool coverage

15 tools covering the canonical agent workflow. See @cryptyx/tool-schemas for the full catalog.

Narrow toolbelts

Bind only the tools you need:

import { cryptyxTool } from '@cryptyx/langchain-tools';

const tools = [
  cryptyxTool(cx, 'get_agent_context'),
  cryptyxTool(cx, 'get_trigger_preset'),
  cryptyxTool(cx, 'get_asset_thesis'),
].filter(Boolean);

License

MIT.

Keywords

cryptyx

FAQs

Package last updated on 15 Jul 2026

Did you know?

Socket

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.

Install

Related posts