Skip to main content

LlamaIndex tools for x402 payments - let agents pay for APIs autonomously

Project description

llamaindex-nory

LlamaIndex tools for x402 payments - Let your agents pay for APIs autonomously.

Installation

pip install llamaindex-nory

Quick Start

from llama_index.core.agent import ReActAgent
from llama_index.llms.openai import OpenAI
from llamaindex_nory import NoryPaymentToolSpec

# Create tool spec
tool_spec = NoryPaymentToolSpec()

# Create agent with Nory tools
llm = OpenAI(model="gpt-4")
agent = ReActAgent.from_tools(tool_spec.to_tool_list(), llm=llm)

# Agent can now pay for premium data!
response = agent.chat("Get the current price of Bitcoin")
print(response)

Available Tools

Tool Description Cost
fetch_paid Fetch any URL with auto x402 payment Varies
crypto_prices Real-time crypto prices $0.001
weather Weather + 7-day forecast $0.002
translate Translate 20+ languages $0.005
web_summary Extract webpage content $0.01

Environment

export NORY_WALLET_KEY="your-solana-private-key"

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llamaindex_nory-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llamaindex_nory-0.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file llamaindex_nory-0.1.0.tar.gz.

File metadata

  • Download URL: llamaindex_nory-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.3

File hashes

Hashes for llamaindex_nory-0.1.0.tar.gz
Algorithm Hash digest
SHA256 85dc4ba5109afd491162523737d4a58c7954aa6feb0c660ebf5feccbffdfe82e
MD5 6d4cbd5d685cfc39141003d742417835
BLAKE2b-256 399547143692152924945e23f7419bafd3dbc943d1590256e804180236ee4018

See more details on using hashes here.

File details

Details for the file llamaindex_nory-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llamaindex_nory-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6529046847dbf4b8c0283640ea73ce7061fe716c4843ba10235a6bce4f6573af
MD5 fb95cd953f3dc00f1f3e56bafb7ae31a
BLAKE2b-256 dbb9b2990e6d0fe436a625f2a398ae8e20ffa811deee962b7785f7775b368826

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page