@graphty/graphty-element / ai / GraphCommand
Interface: GraphCommand ​
Defined in: graphty-element/src/ai/commands/types.ts:76
Definition of a graph command that can be executed via AI.
Properties ​
description ​
readonlydescription:string
Defined in: graphty-element/src/ai/commands/types.ts:80
Description of what the command does (used in LLM prompt)
examples ​
readonlyexamples:CommandExample[]
Defined in: graphty-element/src/ai/commands/types.ts:84
Examples of how the command can be invoked
name ​
readonlyname:string
Defined in: graphty-element/src/ai/commands/types.ts:78
Unique name of the command (used as tool name)
parameters ​
readonlyparameters:ZodType
Defined in: graphty-element/src/ai/commands/types.ts:82
Zod schema defining the parameters
Methods ​
execute() ​
execute(
graph,params,context?):Promise<CommandResult>
Defined in: graphty-element/src/ai/commands/types.ts:92
Execute the command.
Parameters ​
graph ​
The graph instance to operate on
params ​
Record<string, unknown>
Parameters parsed from user input
context? ​
Optional execution context with abort signal and event emitter
Returns ​
Promise<CommandResult>
Promise resolving to the command result