Marketplace search
The Marketplace search tool finds and inspects agents, models, tools and integrations in the aixplain Marketplace, from an agent or a script.
Asset path: aixplain/aixplain-marketplace-search/aixplain · Marketplace card
Try it
from aixplain import Aixplain
aix = Aixplain(api_key="YOUR_API_KEY")
marketplace = aix.Tool.get("aixplain/aixplain-marketplace-search/aixplain")
marketplace.allowed_actions = ["search", "get_asset_details"]
agent = aix.Agent(
name="Marketplace concierge",
description="Answers questions about what is available in the aixplain Marketplace.",
instructions=(
"Answer only from Marketplace search results; never invent assets, prices or hosts. "
"Use search to find assets, then get_asset_details on the best match for price, host or status."
),
tools=[marketplace],
).save()
result = agent.run("Is there a Whisper model? Who hosts it and what does it cost?")
print(result.data.output)
The tool needs no connect step and no config. You get it by path and it is ready to run.
Actions
| Action | What it does |
|---|---|
search | Searches all asset types, or one with asset_type. Returns results and a total per type. |
search_agents, search_models, search_tools, search_integrations | Searches one asset type. |
get_asset_details | Returns one asset's function, supplier, host, pricing and status, by asset_id. |
list_filters | Returns the valid developers, hosts, suppliers and categories values. |
list_actions_<type>, list_inputs_<type> | Lists the actions or inputs of one agent, model, tool or integration, by asset_id. |
run_<type> | Runs one agent, model, tool or integration by asset_id, with an input payload. |
The run_<type> actions call other assets and spend credits, so leave them out of allowed_actions unless the agent should run what it finds.
Inputs for the search actions, passed in data:
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | required | Search text. Pass "" to match everything and filter only. |
asset_type | str | all types | search only: "agent", "model", "tool" or "integration". |
categories, developers, suppliers, hosts | list[str] | none | Filters. Get valid values from list_filters. |
function | str | none | Fine-grained task filter for models and tools, for example "speech-recognition". |
page_size, page_number | int | platform default | Paging. page_number starts at 0. |
Run the tool directly
allowed_actions also applies to direct runs, so get a fresh copy of the tool to use every action. search returns one entry per asset type, each with results and stats.
marketplace = aix.Tool.get("aixplain/aixplain-marketplace-search/aixplain")
result = marketplace.run(action="search", data={"query": "translation"})
for asset_type, hits in result.data.items():
print(asset_type, hits["stats"]["total"], [hit["path"] for hit in hits["results"][:2]])
Count assets with filters
Pass an empty query and filter by category to count a whole class of assets.
llms = marketplace.run(action="search", data={"query": "", "categories": ["LLM"], "asset_type": "model"})
print("LLMs:", llms.data["model"]["stats"]["total"])
openai_llms = marketplace.run(action="search", data={"query": "", "categories": ["LLM"], "hosts": ["openai"], "asset_type": "model"})
print("OpenAI-hosted LLMs:", openai_llms.data["model"]["stats"]["total"])
Inspect one asset
details = marketplace.run(action="get_asset_details", data={"asset_id": "66311fda6eb563279c574b71"})
print({key: details.data[key] for key in ["path", "name", "function", "supplier", "pricing", "status"]})
List filter values
filters = marketplace.run(action="list_filters", data={})
print(list(filters.data))
print(filters.data["categories"][:8])
Clean up
agent.delete()
The Marketplace search tool is a shared Marketplace tool, so there is no tool to delete.
Next steps
- Tools: see every kind of tool an agent can call.
- MCP servers: call any Marketplace model or tool from an MCP client.
- Agents: configure the agent that calls the tool.
- API reference: tool: every parameter and method.