/** Remote execution support for hosted MCP agents. */ import type { ZodSchema } from "zod"; import type { RunOptions } from "./run_options.js"; import type { BaseMessage } from "./types.js"; /** Configures a {@link RemoteAgent}. */ export interface RemoteAgentOptions { /** Hosted agent identifier. */ agentId: string; /** API key. Defaults to `MCP_USE_API_KEY`. */ apiKey?: string; /** API origin. Defaults to `https://cloud.manufact.com`. */ baseUrl?: string; } /** Executes a hosted MCP agent through the mcp-use remote API. */ export declare class RemoteAgent { private agentId; private apiKey; private baseUrl; private chatId; /** * @param options - Hosted agent identifier and API connection settings. * @throws Error if no API key is supplied or available from * `MCP_USE_API_KEY`. */ constructor(options: RemoteAgentOptions); private pydanticToJsonSchema; private parseStructuredResponse; private createChatSession; /** * Runs the remote agent and returns its final text. * * @param options - Input and per-run execution settings. * @returns Final agent text. */ run(options: RunOptions): Promise; /** * Runs the remote agent and parses its result with `options.schema`. * * @param options - Input, schema, and per-run execution settings. * @returns The schema-validated result. */ run(options: RunOptions): Promise; /** * Runs the remote agent and returns a promise for the final result. * @deprecated Use the options object instead: `run({ prompt, maxSteps, ... })`. */ run(query: string, maxSteps?: number, manageConnector?: boolean, externalHistory?: BaseMessage[], outputSchema?: ZodSchema): Promise; /** * Runs the remote agent through an async-generator interface. * * The current remote API does not emit intermediate values. Read the * generator's return value for the final result. * * @param options - Input and per-run execution settings. * @returns An async generator whose return value is the final text. */ stream(options: RunOptions): AsyncGenerator; /** * Runs structured remote execution through an async-generator interface. * * @param options - Input, schema, and per-run execution settings. * @returns An async generator whose return value is schema validated. */ stream(options: RunOptions): AsyncGenerator; /** * Streams the remote agent execution. * @deprecated Use the options object instead: `stream({ prompt, maxSteps, ... })`. */ stream(query: string, maxSteps?: number, manageConnector?: boolean, externalHistory?: BaseMessage[], outputSchema?: ZodSchema): AsyncGenerator; /** Releases local remote-agent state. */ close(): Promise; } //# sourceMappingURL=remote.d.ts.map