import { Result } from '@polywrap/result';
import { AgentFunction, AgentFunctionResult } from './AgentFunction.js';
import { AgentVariables } from './AgentVariables.js';
export interface ExecuteAgentFunctionCalled {
    name: string;
    params: any;
}
export interface ExecuteAgentFunctionResult {
    functionCalled?: ExecuteAgentFunctionCalled;
    result: AgentFunctionResult;
}
export type ExecuteAgentFunction = <TContext>(func: AgentFunction<TContext>, args: unknown, context: TContext, agentFunctions: AgentFunction<TContext>[]) => Promise<ExecuteAgentFunctionResult>;
export declare function processFunctionAndArgs<TContext>(name: string | undefined, args: string | undefined, agentFunctions: AgentFunction<TContext>[], variables: AgentVariables): Result<[unknown, AgentFunction<TContext>], string>;
export declare const executeAgentFunction: <TContext>([params, func]: [unknown, AgentFunction<TContext>], rawParams: string | undefined, context: TContext) => Promise<ExecuteAgentFunctionResult>;
