@hashgraphonline/standards-agent-kit
Version:
A modular SDK for building on-chain autonomous agents using Hashgraph Online Standards, including HCS-10 for agent discovery and communication.
29 lines (28 loc) • 946 B
TypeScript
import { IPlugin, BasePluginContext } from './PluginInterface';
import { StructuredTool } from '@langchain/core/tools';
/**
* Base class for plugins to simplify implementation
*/
export declare abstract class BasePlugin<T extends BasePluginContext = BasePluginContext> implements IPlugin<T> {
abstract id: string;
abstract name: string;
abstract description: string;
abstract version: string;
abstract author: string;
protected context: T;
/**
* Initialize the plugin with the provided context
* @param context The context containing shared resources
*/
initialize(context: T): Promise<void>;
/**
* Get the tools provided by this plugin
* @returns Array of tools provided by this plugin
*/
abstract getTools(): StructuredTool[];
/**
* Clean up resources when the plugin is unloaded
* Default implementation does nothing
*/
cleanup(): Promise<void>;
}