Skip to main content

SemanticAgentOptions Interface

Options used to parameterize the creation of a SharedTreeSemanticAgent.

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 SemanticAgentOptions<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 as it performs queries.
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 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 as it performs queries.

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