@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.
31 lines (30 loc) • 1.19 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 InitiateConnectionToolParams extends ToolParams {
hcsClient: HCS10Client;
stateManager: IStateManager;
}
/**
* A tool to actively START a NEW HCS-10 connection TO a target agent.
* Requires the target agent's account ID.
* It retrieves their profile, sends a connection request, waits for confirmation, and stores the connection using the provided stateManager.
* Use this tool ONLY to actively INITIATE an OUTGOING connection.
*/
export declare class InitiateConnectionTool extends StructuredTool {
name: string;
description: string;
schema: z.ZodObject<{
targetAccountId: z.ZodString;
}, "strip", z.ZodTypeAny, {
targetAccountId: string;
}, {
targetAccountId: string;
}>;
private hcsClient;
private stateManager;
private logger;
constructor({ hcsClient, stateManager, ...rest }: InitiateConnectionToolParams);
protected _call({ targetAccountId }: z.infer<this['schema']>): Promise<string>;
}