Creates a new Search API client instance
Initializes the search client with the appropriate endpoint URI. The search endpoint provides universal search across multiple resource types.
Optional base URI path. If provided, the endpoint will be ${uri}/search.
If not provided, defaults to /search.
Perform a universal search across multiple resource types
Searches across agents, apps, tools, and models simultaneously based on the provided query parameters. Returns results grouped by resource type.
Search query parameters
Promise resolving to search results grouped by resource type
// Search all resource types
const results = await search.query({
q: 'customer support AI',
limit: 10
});
// Access results by type
if (results.data.agents) {
console.log(`Found ${results.data.agents.length} agents`);
}
if (results.data.apps) {
console.log(`Found ${results.data.apps.length} apps`);
}
Search API client for the Mosaia SDK
Provides universal search functionality across multiple resource types (agents, apps, tools, models) in the Mosaia platform.
This class provides a specialized search interface that allows searching across multiple resource types simultaneously with a single query.
Example
Example