aiXplain Marketplace Search
aiXplain Marketplace Search is an aiXplain-managed utility tool that searches and inspects the aiXplain marketplace from inside an agent or script. Find agents, models, tools, and integrations by keyword; filter by modality, developer, supplier, or host; pull full details for any asset (function, supplier, pricing, status); and read result counts per asset type.
View the asset on the aiXplain Marketplace.
Setup
from aixplain import Aixplain
aix = Aixplain(api_key="<AIXPLAIN_API_KEY>")
Get the tool
It is a built-in utility — fetch it by ID.
browse = aix.Tool.get("6960f934f316da19e5f22494")
print(browse.id)
Actions
| Action | Input (data) | Returns |
|---|---|---|
search | query (required; "" = wildcard) + optional filters | Counts and top hits per type: {agent, model, tool, integration}, each {items, total} |
search_models | query + optional filters | Up to 10 models: [{id, path, name}] |
search_tools | query + optional filters | Up to 10 tools |
search_agents | query | Up to 10 agents |
search_integrations | query | Up to 10 integrations |
get_asset_details | assetId | Full metadata for one asset |
list_filters | (none) | Valid filter values: developers, hosts, suppliers, categories |
Optional filters (arrays, accepted by search and search_models/search_tools):
categories (modality/domain), developers, suppliers, hosts, and function (fine-grained task).
Only search returns a total per asset type. The search_* actions return at most 10 results and do not paginate, so use search whenever you need a count or a category-wide view.
Search across everything
result = browse.run(action="search", data={"query": "translation"})
print(result.data)
Count assets with filters
Pass an empty query as a wildcard and filter by categories to count a whole class of assets. Read the total for the type you care about.
llms = browse.run(action="search", data={"query": "", "categories": ["LLM"]})
print("LLMs:", llms.data["model"]["total"])
openai_llms = browse.run(action="search", data={"query": "", "categories": ["LLM"], "hosts": ["openai"]})
print("OpenAI-hosted LLMs:", openai_llms.data["model"]["total"])
Search one asset type
models = browse.run(action="search_models", data={"query": "whisper", "function": "speech-recognition"})
print(models.data)
Inspect one asset
Use get_asset_details with assetId to read pricing, supplier, function, and status.
details = browse.run(action="get_asset_details", data={"assetId": "66aa869f6eb56342c26057e1"})
print(details.data)
List available filters
filters = browse.run(action="list_filters", data={})
print(list(filters.data.keys()))
categories includes modality/domain values such as LLM, Speech, Image, Video, OCR, Classification, and Language. Use these values in the categories filter.
Use with an Agent
Attach Marketplace Search so an agent can answer catalog questions ("do we have X? how much does it cost? who hosts it? how many LLMs do we have?"). The Marketplace Concierge below answers every question from a live tool result and never invents assets, prices, hosts, or counts.
browse = aix.Tool.get("6960f934f316da19e5f22494")
browse.allowed_actions = [
"search", "search_models", "search_tools", "search_agents",
"search_integrations", "get_asset_details", "list_filters",
]
INSTRUCTIONS = """You answer questions about what is available on the aiXplain marketplace, using only the Marketplace Search tool. Never invent assets, prices, hosts, or counts — every fact must come from a tool result.
HOW TO USE THE TOOL (action + data):
- Existence / "do we have X": call `search` with {"query": "<name or keywords>"}. It returns, per asset type (agent, model, tool, integration), a list of items {id, path, name} and a total. If every total is 0, the asset is not available — say so plainly.
- Details / cost / host / supplier / function: take the matching item's id and call `get_asset_details` with {"assetId": "<id>"}. It returns asset_type, function, supplier, hosted_by, developed_by, supports_streaming, pricing {price, unitType}, and status. Report price as "<price> per <unitType>" (e.g. 0.00002 per CHAR). If a field is empty, say it is not listed.
- Counts / "how many X": call `search` with {"query": "", ...filters} and read the `total` for the relevant type. (The search_models / search_tools / search_agents / search_integrations actions cap at 10 results and have no total — use them only to list examples, not to count.)
- Filters (arrays, combine freely on `search`): `categories` for modality/domain (e.g. LLM, Speech, Image, Video, OCR, Classification, Language), `developers`, `suppliers`, `hosts`, and `function` for a fine-grained task. Call `list_filters` (no data) to see valid values if unsure.
- A `search` call REQUIRES a query; pass "" as a wildcard when you only want to filter or count.
HARD RULE — always finish the lookup yourself:
- Whenever the user asks about cost, price, host, supplier, function, or status, you MUST immediately call `get_asset_details` on the best-matching asset's id from your `search` result, in the SAME response. Do NOT stop after `search`, and do NOT ask the user for permission to look up details — just do it and report the answer.
- If `search` returns more than one strong match, fetch details for the most relevant one and mention the other names.
ANSWERING:
- Lead with a direct yes/no or the number, then the supporting details (path, host, supplier, function, price, status).
- When listing matches, show name + path so the user can identify the exact asset.
- Keyword matching is literal — if a multi-word phrase returns nothing, retry with a single distinctive token before concluding the asset is absent.
- Be concise. Use a short bulleted block for details. Do not output raw tool JSON."""
agent = aix.Agent(
name="Marketplace Concierge",
description="Answers questions about what is available on the aiXplain marketplace — whether an asset exists, its cost, who hosts it, and how many of a kind exist.",
instructions=INSTRUCTIONS,
tools=[browse],
output_format="markdown",
max_tokens=4000,
max_iterations=10,
)
agent.save()
print(agent.run(query="Do we have a Whisper model? Who hosts it and what does it cost?").data.output)
| Parameter | Description |
|---|---|
name | Display name for the agent |
description | Short summary of what the agent does |
instructions | System prompt that constrains the agent to tool-sourced facts and tells it which action to use for existence, detail, and count questions |
tools | List of tools the agent can call — here, Marketplace Search with allowed_actions set |
output_format | "markdown" so answers render as a tidy yes/no + bulleted detail block |
max_tokens | Upper bound on the response length |
max_iterations | Maximum tool-call/reasoning steps per run |
More questions the Concierge can answer:
print(agent.run(query="How many LLMs are on the marketplace? How many are hosted by OpenAI?").data.output)
print(agent.run(query="Is there a translation model from Google, and what does it cost per character?").data.output)
Notes
- Counts come from
searchonly. Thesearch_*actions cap at 10 results and do not paginate; usesearchand readtotalfor counts or category-wide views. searchneeds aquery. Pass""as a wildcard when you only want to filter/count.- Keyword matching is literal. Prefer single distinctive tokens; multi-word phrases can under-match.
- Parameter names differ by action: searches use
query;get_asset_detailsusesassetId. - It is a built-in utility — there is no connect step and nothing to delete; fetch it with
aix.Tool.get(...).