Skip to main content

TreeAgentOptions Interface

Options for creating a tree agent via createTreeAgent(model, tree, options).

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/tree-agent/alpha.

For more information about our API support guarantees, see here.

Signature​

export interface TreeAgentOptions<TSchema extends ImplicitFieldSchema>

Type Parameters​

ParameterConstraintDescription
TSchemaImplicitFieldSchema

Properties​

PropertyAlertsModifiersTypeDescription
domainHintsAlphaoptionalstringAdditional information about the application domain that will be included in the context provided to the model.
editorAlphaoptionalSynchronousEditor<TSchema> | AsynchronousEditor<TSchema>Executes any generated JavaScript created by the model's editing tool.
loggerAlphaoptionalLoggerIf supplied, generates human-readable markdown text describing the actions taken by the agent.
maximumSequentialEditsAlphaoptionalnumberThe maximum number of sequential edits the LLM can make before we assume it's stuck in a loop.

Property Details​

domainHints​

Additional information about the application domain that will be included in the context provided to the model.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature​

domainHints?: string;

Type: string

editor​

Executes any generated JavaScript created by the model's editing tool.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature​

editor?: SynchronousEditor<TSchema> | AsynchronousEditor<TSchema>;

Type: SynchronousEditor<TSchema> | AsynchronousEditor<TSchema>

Remarks​

If an error is thrown while executing the code, it will be caught and the message will be forwarded to the model for debugging. If this function is not provided, the generated code will be executed using a simple JavaScript eval which may not provide sufficient security guarantees for some environments. Run the code in a sandboxed environment or use a library such as SES to provide a more secure implementation — see @fluidframework/tree-agent-ses for a drop-in implementation.

logger​

If supplied, generates human-readable markdown text describing the actions taken by the agent.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature​

logger?: Logger;

Type: Logger

maximumSequentialEdits​

The maximum number of sequential edits the LLM can make before we assume it's stuck in a loop.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature​

maximumSequentialEdits?: number;

Type: number