@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.
35 lines (34 loc) • 1.32 kB
TypeScript
import { StructuredTool, ToolParams } from '@langchain/core/tools';
import { z } from 'zod';
import { HCS10Client } from '../hcs10/HCS10Client';
import { IStateManager } from '../state/state-types';
export interface CheckMessagesToolParams extends ToolParams {
hcsClient: HCS10Client;
stateManager: IStateManager;
}
/**
* A tool to check for new messages on an active HCS-10 connection topic,
* or optionally fetch the latest messages regardless of timestamp.
*/
export declare class CheckMessagesTool extends StructuredTool {
name: string;
description: string;
schema: z.ZodObject<{
targetIdentifier: z.ZodString;
fetchLatest: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
lastMessagesCount: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
targetIdentifier: string;
fetchLatest: boolean;
lastMessagesCount?: number | undefined;
}, {
targetIdentifier: string;
fetchLatest?: boolean | undefined;
lastMessagesCount?: number | undefined;
}>;
hcsClient: HCS10Client;
private stateManager;
private logger;
constructor({ hcsClient, stateManager, ...rest }: CheckMessagesToolParams);
protected _call({ targetIdentifier, fetchLatest, lastMessagesCount, }: z.infer<this['schema']>): Promise<string>;
}