Skip to content

IAgentDecorator

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

A decorator applied to every agent resolved from the catalog. AgentPrism adds run recording through this mechanism; a consumer can register its own decorator the same way.

public interface IAgentDecorator

A decorator is not Microsoft Agent Framework middleware. The MAF middleware chain is specific to an agent, and HarnessAgent adds its own inner decorators. An outer decorator works the same way on every agent kind, the harness included.

Gets the order of application. A lower value wraps inside, a higher value wraps outside. Run recording uses 0, which makes it the outermost decorator.

int Order { get; }

int

Decorates the agent.

AIAgent Decorate(AIAgent agent, AgentDescriptor descriptor)

agent AIAgent

The agent to decorate.

descriptor AgentDescriptor

The catalog summary of the agent.

AIAgent

The decorated agent.