Skip to main content

LlamaIndex tools for iwant.fyi -- reference implementation of the iwant.fyi demand-side protocol v1.1. Lets any LlamaIndex agent express structured purchase intent and receive matched supply across multiple sources.

Project description

iwantfyi-llamaindex

LlamaIndex tools for iwant.fyi — the reference implementation of the iwant.fyi demand-side protocol v1.1. Lets any LlamaIndex agent express structured purchase intent and receive matched supply across multiple sources.

pip install iwantfyi-llamaindex

Usage

from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
from iwantfyi_llamaindex import get_iwant_tools

tools = get_iwant_tools(api_key="iwant_ak_...")

agent = FunctionAgent(
    tools=tools,
    llm=OpenAI(model="gpt-4o"),
    system_prompt="You help users find and buy things via iwant.fyi.",
)

response = await agent.run("Find me waterproof running shoes under $120")
print(response)

Get a free API key by registering an agent: POST https://iwant.fyi/api/agents/register (or see /developers).

Tools

Tool What it does
demand_create_want Create a buyer Want (structured purchase intent) and return matches.
demand_search Find matched supply for a query without persisting a Want.
demand_get_want Retrieve a Want by id with its current matches.
demand_record_outcome Report viewed/clicked/purchased for attribution + match-quality learning.
demand_list_verticals Discover supported verticals + spec keys.
demand_list_constraints Discover the constraint vocabulary.
demand_health Liveness + active supply sources.

Options

get_iwant_tools(...):

  • api_key (required) — iwant_ak_...
  • base_url — defaults to https://iwant.fyi
  • transport"mcp" (default) or "http" for the REST fallback
  • client — reuse an existing IwantClient (testing / pooling)

License

Apache-2.0. Full protocol spec: iwant.fyi/protocol/v1.

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

iwantfyi_llamaindex-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

iwantfyi_llamaindex-0.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for iwantfyi_llamaindex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 99fbb7c95baadc1674f1359d679ca9371297e2ec5e3892a7f72a8546a38739c3
MD5 c0a16cf694620ae8d24fa3867f977c8f
BLAKE2b-256 28794fd7f8788c6d7fbd0331c7fa918176af7f4172f0646a6364ca5892eaa2b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for iwantfyi_llamaindex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff7f1df0671ca01b9674ffbc8366210db7347cc1c44fc687c55fc4e2f344d7bd
MD5 129a776a8f13c58e9eb708fa37762554
BLAKE2b-256 eff61f3377ef678465d63f2c35f09ac78e6732d5f129d955f6240f13be117758

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