Integrate Ionic Shopping into AI Agents
LlamaIndex tool letting users shop and buy products directly inside an agent via Ionic's marketplace.
Why it matters
Empower your AI agent to directly facilitate online shopping and transactions for users by integrating with the Ionic ecommerce marketplace. Enable users to search for products and receive recommendations using natural language queries.
Outcomes
What it gets done
Connect AI agents to the Ionic ecommerce platform.
Allow users to search for products via natural language.
Enable agents to recommend products based on user queries.
Facilitate direct user transactions within the AI agent.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/li-tool-tools-ionic-shopping | bash Overview
LlamaIndex Tools Integration: Ionic Shopping
The Ionic Shopping Tool wires Ionic's ecommerce marketplace into a LlamaIndex agent, letting users search for and buy products in natural language while the agent owner earns a cut of each transaction. Use it when an agent needs to let users shop and transact in-conversation. It requires an Ionic API key.
What it does
Ionic is a plug-and-play ecommerce marketplace for AI Assistants. Adding the Ionic Shopping Tool to an agent lets users shop and transact directly within the agent, and gives you a cut of the transaction. It exposes a query function used to search for products and get product recommendations -- users can specify how many results they want and their budget in natural language.
When to use - and when NOT to
Use it when you want an agent to let users search for and purchase products directly in the conversation, with Ionic handling attribution back to your agent and a revenue cut on each transaction. It requires an Ionic API key to instantiate the tool, so it is not usable without first setting up an Ionic account.
Inputs and outputs
Install with:
pip install llama-index-tools-ionic-shopping
Instantiate with your Ionic API key and attach to an agent:
import openai
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
from llama_index.tools.ionic_shopping import IonicShoppingToolSpec
openai.api_key = "sk-api-key"
ionic_tool = IonicShoppingToolSpec(api_key="<my Ionic API Key>").to_tool_list()
agent = FunctionAgent(
tools=ionic_tool,
llm=OpenAI(model="gpt-4.1"),
)
print(
await agent.run(
"I'm looking for a 5k monitor can you find me 3 options between $600 and $1000"
)
)
Given a natural-language product request -- including desired result count and budget -- the query function returns matching product recommendations.
Who it's for
Developers building shopping-enabled agents who want to let users search for and buy products in-conversation while earning a revenue cut through Ionic's attribution system.
Source README
LlamaIndex Tools Integration: Ionic Shopping
pip install llama-index-tools-ionic-shopping
Ionic is a plug and play ecommerce marketplace for AI Assistants.
By including the Ionic Tool in your agent, you are effortlessly providing your users with the ability
to shop and transact directly within your agent, and you’ll get a cut of the transaction.
Attribution
Llearn more about how Ionic attributes sales
to your agent. Provide your Ionic API Key when instantiating the tool:
from llama_index.tools.ionic_shopping import IonicShoppingToolSpec
ionic_tool = IonicShoppingToolSpec(api_key="<my Ionic API Key>").to_tool_list()
Usage
Try it out using the Jupyter notebook.
import openai
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
from llama_index.tools.ionic_shopping import IonicShoppingToolSpec
openai.api_key = "sk-api-key"
ionic_tool = IonicShoppingToolSpec(api_key="<my Ionic API Key>").to_tool_list()
agent = FunctionAgent(
tools=ionic_tool,
llm=OpenAI(model="gpt-4.1"),
)
print(
await agent.run(
"I'm looking for a 5k monitor can you find me 3 options between $600 and $1000"
)
)
query: used to search for products and to get product recommendations
Your users can use natural language to specify how many results they would like to see
and what their budget is.
For more information on setting up your Agent with Ionic, see the Ionic documentation.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.