Skip to main content

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)
Show output

The tool needs no connect step and no config. You get it by path and it is ready to run.

Actions​

ActionWhat it does
searchSearches all asset types, or one with asset_type. Returns results and a total per type.
search_agents, search_models, search_tools, search_integrationsSearches one asset type.
get_asset_detailsReturns one asset's function, supplier, host, pricing and status, by asset_id.
list_filtersReturns 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:

ParameterTypeDefaultDescription
querystrrequiredSearch text. Pass "" to match everything and filter only.
asset_typestrall typessearch only: "agent", "model", "tool" or "integration".
categories, developers, suppliers, hostslist[str]noneFilters. Get valid values from list_filters.
functionstrnoneFine-grained task filter for models and tools, for example "speech-recognition".
page_size, page_numberintplatform defaultPaging. 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]])
Show output

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"])
Show output

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"]})
Show output

List filter values​

filters = marketplace.run(action="list_filters", data={})
print(list(filters.data))
print(filters.data["categories"][:8])
Show output

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.