Table of Contents

Property Filters

Namespace
LMKit.Agents
Assembly
LM-Kit.NET.dll

Filters

Gets or sets the filter pipeline that intercepts prompt, completion, and tool invocation stages.

public FilterPipeline Filters { get; set; }

Property Value

FilterPipeline

Examples

Adding filters directly on an agent:

using LMKit.Agents;
using LMKit.TextGeneration.Filters;

var agent = new Agent(model); agent.Filters = new FilterPipeline(); agent.Filters.AddPromptFilter(async (ctx, next) => { Console.WriteLine($"Prompt: {ctx.Prompt}"); await next(ctx); });

Remarks

When set, the pipeline is applied to the underlying MultiTurnConversation when the agent executes. Filters are complementary to events.

Share