Skip to main content

FurlPay for LlamaIndex

Give your LlamaIndex agents a wallet. This package exposes the FurlPay API as a LlamaIndex tool spec — so an agent can check balances, create checkouts, move stablecoins, place investment orders, and pay for x402-protected APIs within a spending budget.

FurlPay is the open-source financial OS for the agentic internet: stablecoin payments + the first Solana-native x402 facilitator. This is the LlamaIndex binding for it.

Maintained by FurlPay · MIT licensed.

Install

pip install furlpay-llamaindex

Quickstart

from furlpay_llama import FurlPayToolSpec
from llama_index.core.agent import ReActAgent

tools = FurlPayToolSpec().to_tool_list()   # reads FURLPAY_API_KEY from the environment
agent = ReActAgent.from_tools(tools, llm=llm)

Zero-config: with no FURLPAY_API_KEY set, every tool runs in demo mode — reads return deterministic sample data and writes simulate without touching the network. Wire up your agent and watch the tool calls before you ever create an account. Set the key to go live against https://api.furlpay.com/v1.

export FURLPAY_API_KEY=fp_live_sk_...          # optional; omit for demo mode
export FURLPAY_API_BASE=https://sandbox.api.furlpay.com/v1   # optional sandbox

Tools

Tool What the agent can do
get_wallet_balances Read stablecoin balances across Solana & Base
create_payment Create a hosted USDC checkout link
send_transfer Send USDC/USDT to an address or FurlPay handle
place_investment_order Buy/sell fractional stocks, ETFs, crypto in USDC
get_swap_quote Quote a swap, e.g. SOL → USDC
get_x402_config Discover x402 chains, tokens, and limits
pay_for_resource ⚡ Autonomously pay for a 402-gated API within a USDC budget and return its content
set_agent_budget Cap an agent's x402 spend per day/week/month
get_agent_budget Read an agent's budget and spend-to-date
create_x402_paywall Protect a resource so agents pay per call
verify_x402_payment Verify an inbound x402 proof (merchant side)
settle_x402_payment Settle a verified x402 payment (merchant side)

⚡ pay_for_resource is the headline: it lets an agent buy metered data or API access over x402 — the payment primitive API keys can't express — while set_agent_budget keeps it from overspending.

Full agent example

from llama_index.core.agent import ReActAgent
from llama_index.llms.anthropic import Anthropic
from furlpay_llama import FurlPayToolSpec

tools = FurlPayToolSpec().to_tool_list()
agent = ReActAgent.from_tools(tools, llm=Anthropic(model="claude-sonnet-5"), verbose=True)
agent.chat("Buy $25 of VOO and cap my x402 budget at $50/day.")

A runnable version is in examples/agent.py:

pip install "furlpay-llamaindex[examples]"
python examples/agent.py

Use an explicit client

from furlpay_llama import FurlPayClient, FurlPayToolSpec

client = FurlPayClient(api_key="fp_live_sk_...", base_url="https://api.furlpay.com/v1")
tools = FurlPayToolSpec(client).to_tool_list()

The spec subclasses BaseToolSpec, so it also plugs into LlamaIndex workflows, FunctionCallingAgent, and anything else that consumes a tool list.

Test

pip install "furlpay-llamaindex[dev]"
python -m pytest tests -q        # or, no pytest:  python tests/test_tool_spec.py

The suite runs in demo mode and asserts the tool contract: the spec converts to a well-formed FunctionTool list, every declared spec_function is exposed with metadata, each is callable and returns serialisable output, and the x402 budget guard refuses to overspend.

Scope

This package orchestrates FurlPay's public API into LlamaIndex tools. It doesn't custody funds or sign transactions itself — wallets, MPC custody, brokerage (via Alpaca), and x402 settlement all happen in the FurlPay API. Point it at your own FurlPay account and it operates on your data.

License

MIT

Metadata

Release files for furlpay-llamaindex 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for furlpay-llamaindex 0.1.0
File Size Uploaded
furlpay_llamaindex-0.1.0.tar.gz 10.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for furlpay-llamaindex 0.1.0
File Interpreter ABI Platform
furlpay_llamaindex-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.4 kB

Release files / furlpay_llamaindex-0.1.0.tar.gz

Download URL furlpay_llamaindex-0.1.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3d3943351f736a7b84b22d28eb0ea99bd7b9e2f825b6fbefc0d040c3b0a8e6a7
BLAKE2b-256 checksum
How to use checksums
960a401136eb951834c63aa9fc417a2b4317737616bd201233891dd17eeb14c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Release files / furlpay_llamaindex-0.1.0-py3-none-any.whl

Download URL furlpay_llamaindex-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81b634f42cf6a4a18b21f6f2cd533e1f769410ff52542052709d2881b38e284e
BLAKE2b-256 checksum
How to use checksums
d632e22216577e99d53015d4e6601c1e6640d95778f4500b6b32ccf85456b6ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page