mcp-use
Version:
Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.
48 lines • 1.85 kB
TypeScript
/**
* Remote agent implementation for executing agents via API.
*/
import type { ZodSchema } from "zod";
import type { RunOptions } from "./mcp_agent.js";
import type { BaseMessage } from "./types.js";
export declare class RemoteAgent {
private agentId;
private apiKey;
private baseUrl;
private chatId;
constructor(options: {
agentId: string;
apiKey?: string;
baseUrl?: string;
});
private pydanticToJsonSchema;
private parseStructuredResponse;
private createChatSession;
/**
* Runs the remote agent with options object and returns a promise for the final result.
*/
run(options: RunOptions): Promise<string>;
/**
* Runs the remote agent with options object and structured output.
*/
run<T>(options: RunOptions<T>): Promise<T>;
/**
* Runs the remote agent and returns a promise for the final result.
* @deprecated Use options object instead: run({ prompt, maxSteps, ... })
*/
run<T = string>(query: string, maxSteps?: number, manageConnector?: boolean, externalHistory?: BaseMessage[], outputSchema?: ZodSchema<T>): Promise<T>;
/**
* Streams the remote agent execution with options object.
*/
stream(options: RunOptions): AsyncGenerator<any, string, void>;
/**
* Streams the remote agent execution with options object and structured output.
*/
stream<T>(options: RunOptions<T>): AsyncGenerator<any, T, void>;
/**
* Streams the remote agent execution.
* @deprecated Use options object instead: stream({ prompt, maxSteps, ... })
*/
stream<T = string>(query: string, maxSteps?: number, manageConnector?: boolean, externalHistory?: BaseMessage[], outputSchema?: ZodSchema<T>): AsyncGenerator<any, T, void>;
close(): Promise<void>;
}
//# sourceMappingURL=remote.d.ts.map