adk-typescript
Version:
TypeScript port of Google's Agent Development Kit (ADK)
59 lines (58 loc) • 1.47 kB
TypeScript
import { FunctionTool } from './FunctionTool';
/**
* Interface for CrewAI tool schema
*/
export interface CrewaiToolSchema {
/** Properties of the tool schema */
properties: Record<string, any>;
/** Type of the schema */
type: string;
/** Required properties */
required?: string[];
}
/**
* Interface for simplified CrewAI tool
*/
export interface CrewaiBaseTool {
/** The name of the tool */
name: string;
/** Description of the tool */
description: string;
/** Function to execute */
run: (...args: any[]) => Promise<any>;
/** Schema for arguments */
args_schema: {
/** Returns a JSON schema for the tool */
model_json_schema: () => any;
};
}
/**
* Options for creating a CrewAI tool wrapper
*/
export interface CrewaiToolOptions {
/** The wrapped CrewAI tool */
tool: CrewaiBaseTool;
/** Optional name override */
name?: string;
/** Optional description override */
description?: string;
}
/**
* A wrapper for CrewAI tools to use them with ADK
*/
export declare class CrewaiTool extends FunctionTool {
/** The wrapped CrewAI tool */
private crewaiTool;
/**
* Create a new CrewAI tool wrapper
*
* @param options Options for the CrewAI tool
*/
constructor(options: CrewaiToolOptions);
/**
* Get the wrapped CrewAI tool
*
* @returns The wrapped CrewAI tool
*/
getCrewaiTool(): CrewaiBaseTool;
}