Table of Contents

👉 Try the demo: https://github.com/LM-Kit/lm-kit-net-samples/tree/main/console_net/ai-agents/agent-templates/agent_templates_showcase

Agent Templates Showcase for C# .NET Applications


🎯 Purpose of the Demo

An interactive console app that demonstrates the four pre-configured agent templates shipped with LM-Kit.NET: Chat, Writer, Analyst, ReAct. Compare all four on the same prompt, or open a REPL with one template at a time.

All inference runs on-device.


👥 Industry Target Audience

  • App developers picking a starting template for a new agent feature.
  • Product / UX: see the tonal differences between templates side-by-side.
  • Engineering leads: standardize team agents around proven scaffolds.
  • Prototyping: skip system-prompt authoring.

🚀 Problem Solved

Hand-crafting system prompts for every new agent burns time and produces inconsistent results across a codebase. The shipped templates encode proven scaffolds: ReAct's reasoning hooks, Analyst's structured-thinking prompt, Writer's stylistic levers, Chat's lightweight defaults. The demo turns the catalog into a menu so the templates can be A/B-tested in seconds.


💻 Application Overview

Interactive menu (no command-line arguments) with five modes:

Mode What it does
Compare Run one prompt across all 4 templates side-by-side, with per-run status / inference count / duration.
Chat Open a REPL with the Chat template (concise, two-sentence default).
Writer Open a REPL with the Writer template.
Analyst Open a REPL with the Analyst template.
ReAct Open a REPL with the ReAct template (reasoning + acting loop).
Quit Exit.

✨ Key Features

  • AgentTemplates static factory: Chat, Writer, Analyst, ReAct.
  • Typed fluent builders per template: .WithPersonality, .WithTone, .WithContentType, etc.
  • AgentExecutionResult with Status, InferenceCount, Duration for observability.
  • Single model load at startup; every template shares it.

🧠 Model

  • qwen3.5:4b (current Qwen 3.5 dense, ~3 GB VRAM, vision + tools capable).

🛠️ Getting Started

📋 Prerequisites

  • .NET 8.0 or later

▶️ Running the Application

git clone https://github.com/LM-Kit/lm-kit-net-samples
cd lm-kit-net-samples/console_net/ai-agents/agent-templates/agent_templates_showcase
dotnet run

Pick a mode from the menu.

Share