import type { PlatformClient } from "./client"; import type { Agent, MarketplaceAgentsResponse } from "./types"; /** * API for managing agents on the OpenServ platform. * * @example * ```typescript * const client = new PlatformClient({ apiKey: 'your-key' }); * * // List your own agents * const myAgents = await client.agents.list(); * * // Search your own agents by name/description * const myMatches = await client.agents.searchOwned({ query: 'data' }); * * // List all public marketplace agents * const marketplaceAgents = await client.agents.listMarketplace(); * * // Search all marketplace agents (semantic search) * const searchResults = await client.agents.listMarketplace({ * search: 'data processing', * page: 1, * pageSize: 20 * }); * * // Create an agent * const agent = await client.agents.create({ * name: 'My Agent', * capabilities_description: 'Handles data processing', * endpoint_url: 'https://my-agent.example.com' * }); * ``` */ export declare class AgentsAPI { private client; constructor(client: PlatformClient); /** * List all agents owned by the authenticated user. * @returns Array of agents */ list(): Promise; /** * List all public agents from the marketplace. * @param params - Optional parameters * @param params.search - Search query to filter agents * @param params.page - Page number (default: 1) * @param params.pageSize - Number of items per page (default: 50) * @param params.showPrivateAgents - Include private agents owned by the user (default: true) * @returns Paginated marketplace agents response */ listMarketplace(params?: { search?: string; page?: number; pageSize?: number; showPrivateAgents?: boolean; }): Promise; /** * Get an agent by ID. * @param params - Parameters object * @param params.id - The agent ID * @returns The agent */ get(params: { id: number | string; }): Promise; /** * Search for agents owned by the authenticated user. * Searches both name and capabilities_description fields. * For marketplace-wide search, use listMarketplace({ search }) instead. * @param params - Parameters object * @param params.query - Search query to match against agent names and descriptions * @returns Array of matching agents owned by the user */ searchOwned(params: { query: string; }): Promise; /** * Create a new agent. * @param params - Parameters object * @param params.name - Unique name for the agent * @param params.capabilities_description - Description of what the agent can do * @param params.endpoint_url - URL where the agent is hosted * @param params.model_parameters - Optional model parameters (e.g. { model: "gpt-5-mini", verbosity: "medium", reasoning_effort: "low" }) * @returns The created agent */ create(params: { name: string; capabilities_description: string; endpoint_url: string; model_parameters?: Record; }): Promise; /** * Get the API key for an agent. * @param params - Parameters object * @param params.id - The agent ID * @returns The agent's API key */ getApiKey(params: { id: number | string; }): Promise; /** * Update an existing agent. * @param params - Parameters object * @param params.id - The agent ID to update * @param params.endpoint_url - New endpoint URL (optional) * @param params.name - New name (optional) * @param params.capabilities_description - New description (optional) * @param params.model_parameters - New model parameters (optional, e.g. { model: "gpt-4.1", temperature: 0 }) * @returns The updated agent */ update(params: { id: number | string; endpoint_url?: string; name?: string; capabilities_description?: string; model_parameters?: Record; }): Promise; /** * Delete an agent. * @param params - Parameters object * @param params.id - The agent ID to delete */ delete(params: { id: number | string; }): Promise; /** * Generate a new auth token for securing agent requests. * Returns both the plaintext token (for the agent) and the hash (for the platform). */ generateAuthToken(): Promise<{ authToken: string; authTokenHash: string; }>; /** * Save the auth token hash to the platform for a specific agent. * The platform will use this to verify requests to the agent. */ saveAuthToken(params: { id: number | string; authTokenHash: string; }): Promise; } //# sourceMappingURL=agents-api.d.ts.map