v0.1 - Beta
Use agent-scoped keys. All framework integrations accept an apiKey parameter. Always pass an agent-scoped key, not your operator key. Agent keys are bound to a single wallet and cannot modify policy or provision new accounts.

LangChain / LangGraph

NeoMPP ships as a LangChain tool. Drop it into any LangChain agent or LangGraph node - the agent can check balances, make transfers, and open MPP sessions as part of its reasoning loop.

bash
npm install @neompp/langchain
typescript
import { NeoMPPTool } from "@neompp/langchain";
import { ChatAnthropic } from "@langchain/anthropic";
import { AgentExecutor, createToolCallingAgent } from "langchain/agents";

const neompp = new NeoMPPTool({
  walletId: process.env.NEOMPP_WALLET_ID,
  apiKey: process.env.NEOMPP_AGENT_KEY,
});

const agent = createToolCallingAgent({
  llm: new ChatAnthropic({ model: "claude-sonnet-4-6" }),
  tools: [neompp],
  prompt,
});

const executor = new AgentExecutor({ agent, tools: [neompp] });

const result = await executor.invoke({
  input: "Check my USDC balance, then pay research-sub-agent $8.50 for the data task it completed.",
});
// Agent calls neompp.getBalance(), reasons, then calls neompp.transfer()

Available tool functions

FunctionDescription
neompp_get_balanceReturns current USDC balance for the agent's wallet
neompp_transferSends USDC to a recipient. Requires to, amount, memo.
neompp_get_transactionsReturns recent transaction history
neompp_open_sessionOpens an MPP session with a spending cap for a provider
neompp_close_sessionCloses an open session and triggers on-chain settlement

CrewAI

NeoMPP integrates as a CrewAI tool, available to any agent in a crew. Each crew member that needs to make payments should be provisioned its own NeoMPP wallet with an appropriate policy for its role.

bash
pip install neompp-crewai
python
from crewai import Agent, Task, Crew
from neompp.crewai import NeoMPPTool

payment_tool = NeoMPPTool(
    wallet_id=os.environ["NEOMPP_WALLET_ID"],
    api_key=os.environ["NEOMPP_AGENT_KEY"],
)

orchestrator = Agent(
    role="Orchestrator",
    goal="Coordinate research tasks and pay sub-agents upon completion",
    tools=[payment_tool],
    verbose=True,
)

pay_task = Task(
    description="Pay the DataFetch agent $3.20 USDC for completing task-88. Memo: task-88-reward.",
    agent=orchestrator,
)

crew = Crew(agents=[orchestrator], tasks=[pay_task])
crew.kickoff()

OpenAI Agents SDK

NeoMPP wraps as an OpenAI Agents SDK tool executor. Compatible with any model that supports tool use.

bash
npm install @neompp/openai-agents
typescript
import { Agent, run } from "@openai/agents";
import { neomppTools } from "@neompp/openai-agents";

const agent = new Agent({
  name: "PaymentAgent",
  model: "gpt-4o",
  instructions: `You are a payment agent. When asked to pay for a completed task,
    verify the balance is sufficient, then execute the transfer.
    Always include the task ID in the memo field.`,
  tools: neomppTools({
    walletId: process.env.NEOMPP_WALLET_ID,
    apiKey: process.env.NEOMPP_AGENT_KEY,
  }),
});

const result = await run(agent, "Pay acct_03x1m7 $12.00 USDC for completing task-42.");
console.log(result.finalOutput);
// "Payment of $12.00 USDC sent to acct_03x1m7. Tx: 5j4Kz9qX... settled."

What agents cannot do

All framework integrations expose only the agent-facing surface. Regardless of which framework you use, the agent cannot:

  • Modify spending policy
  • Pause or unpause its own wallet
  • Provision new wallets
  • Access other agents' wallets
  • Rotate or create API keys

These constraints are enforced by the agent-scoped API key at the API layer - not just by the framework integration.

Idempotency in agentic loops

Agents in reasoning loops may retry a payment action if the first response is ambiguous. All framework integrations derive a deterministic idempotency key from the task context to prevent double payments:

typescript
new NeoMPPTool({
  walletId: process.env.NEOMPP_WALLET_ID,
  apiKey: process.env.NEOMPP_AGENT_KEY,
  idempotencyStrategy: "task-scoped",
  // derives key from task_id + operation name
  // same logical payment in the same task always maps to the same key
})