@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.
45 lines (44 loc) • 1.31 kB
TypeScript
import { HCS10Client } from '../hcs10/HCS10Client';
import { StructuredTool } from '@langchain/core/tools';
import { z } from 'zod';
/**
* SendMessageTool wraps the sendMessage() function of HCS10Client.
* It sends a message to a specified Hedera topic and monitors for responses.
*/
export declare class SendMessageTool extends StructuredTool {
name: string;
description: string;
private client;
private lastProcessedTimestamp;
private logger;
schema: z.ZodObject<{
topicId: z.ZodString;
message: z.ZodString;
messageType: z.ZodOptional<z.ZodString>;
dataset: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
message: string;
topicId: string;
messageType?: string | undefined;
dataset?: string | undefined;
}, {
message: string;
topicId: string;
messageType?: string | undefined;
dataset?: string | undefined;
}>;
/**
* @param client - Instance of HCS10Client.
*/
constructor(client: HCS10Client);
/**
* Calls sendMessage() with the provided parameters.
*/
_call(input: {
topicId: string;
message: string;
messageType?: string;
dataset?: string;
}): Promise<string>;
private monitorResponses;
}