@untitledfinancial/dpx-agent-toolkit
v1.0.1
Published
DPX Protocol settlement tools for AI agents — LangChain and Vercel AI SDK adapters
Maintainers
Readme
@untitledfinancial/dpx-agent-toolkit
DPX Protocol settlement tools for AI agents. Works alongside @stripe/agent-toolkit — combine both to give agents payment initiation (Stripe) and cross-border settlement (DPX).
npm install @untitledfinancial/dpx-agent-toolkitLangChain
import { DPXAgentToolkit } from '@untitledfinancial/dpx-agent-toolkit/langchain';
import { StripeAgentToolkit } from '@stripe/agent-toolkit/langchain';
import { ChatAnthropic } from '@langchain/anthropic';
import { AgentExecutor, createToolCallingAgent } from 'langchain/agents';
import { ChatPromptTemplate } from '@langchain/core/prompts';
const tools = [
...new StripeAgentToolkit({ secretKey: process.env.STRIPE_SECRET_KEY! }).getTools(),
...new DPXAgentToolkit().getTools(),
];
const llm = new ChatAnthropic({ model: 'claude-sonnet-4-6' });
const prompt = ChatPromptTemplate.fromMessages([
['system', 'You are a treasury agent. Use Stripe for payment initiation and DPX for cross-border settlement.'],
['human', '{input}'],
['placeholder', '{agent_scratchpad}'],
]);
const agent = createToolCallingAgent({ llm, tools, prompt });
const executor = new AgentExecutor({ agent, tools });
const result = await executor.invoke({
input: 'Check DPX oracle stability, get a quote for $500K USD→EUR, screen counterparty 0x1234..., then execute in sandbox mode',
});Tools: dpx_oracle_status · dpx_esg_score · dpx_compliance_screen · dpx_quote · dpx_settle
Vercel AI SDK
import { DPXAgentToolkit } from '@untitledfinancial/dpx-agent-toolkit/vercel';
import { generateText } from 'ai';
import { anthropic } from '@ai-sdk/anthropic';
const { text } = await generateText({
model: anthropic('claude-sonnet-4-6'),
tools: new DPXAgentToolkit().getTools(),
prompt: 'Check oracle stability and get a quote for $1M USD to EUR',
maxSteps: 5,
});Raw (framework-agnostic)
import { ALL_TOOLS, dpxQuoteTool } from '@untitledfinancial/dpx-agent-toolkit';
// Each tool has: name, description, parameters (JSON Schema), execute()
const quote = await dpxQuoteTool.execute({ amountUsd: 500_000, hasFx: true, esgScore: 75 });Settlement flow
The recommended agent flow — matches what the DPX MCP tools do:
dpx_oracle_status— check macro stability (STABLE/CAUTION/UNSTABLE)dpx_esg_score— score counterparty (0–100, required for EU SFDR)dpx_compliance_screen— FATF R16 + AML + sanctions pre-checkdpx_quote— binding fee quote (valid 300s)dpx_settle— execute (sandbox=true by default; set false for live)
Links
- Documentation
- MCP server — 32 tools for Claude Desktop / Cursor
- npm
