Semantic, episodic and procedural memory with auto-extraction and consolidation.
Build intelligent chatbots that remember, reason and act.
The complete .NET SDK for chatbot agents. Multi-turn conversations with persistent memory, agentic reasoning, function calling, MCP integration, vision, and agent skills. Run Qwen, Gemma, DeepSeek, GLM, GPT-OSS and more 100% on-device with zero cloud dependency.
ReAct, Chain-of-Thought, and Tree-of-Thought planning strategies.
4 execution modes, built-in tools, and Model Context Protocol servers.
Drop-in SKILL.md files for zero-code domain expertise.
Process images in any turn with VLM-capable models.
Tool permission policies, risk levels, and approval workflows.
On-device
Agent templates
Built-in tools
Orchestrators
From simple chat to agentic assistants.
Building chatbots that maintain context, remember users, reason through problems, and take action has traditionally required stitching together multiple cloud services. LM-Kit unifies all of this into a single, on-device .NET SDK.
Conversation
MultiTurnConversation
Full conversation context with history, tools, memory, vision, MCP, and skills in a single API.
Memory
AgentMemory
Three memory types with automatic extraction, consolidation, and multi-user isolation.
Framework
Agent framework
Planning strategies, orchestrators, skills, resilience policies, and observability built in.
Everything you need to build chatbot agents.
A complete SDK covering conversations, memory, reasoning, tools, skills, vision, and enterprise security.
Context
Multi-turn context
Maintain conversation history across exchanges. The model references past turns for coherent, contextual responses.
Memory Enhanced
RAG-backed memory
Semantic, episodic, and procedural memory with automatic extraction, consolidation, and multi-user isolation.
Tools
Function calling & MCP
4 execution modes, [LMFunction] attributes, ITool interface, built-in tools, and Model Context Protocol servers.
Skills New
Agent skills
Drop-in SKILL.md files for zero-code domain expertise. Manual slash commands or model-driven activation.
Reasoning New
Agentic reasoning
ReAct, Chain-of-Thought, Tree-of-Thought, and Plan-and-Execute planning strategies for complex tasks.
Vision
Vision & multimodal
Process images alongside text at any turn with VLM-capable models. Build visual assistants that analyze and describe.
UX
Streaming & structured output
Real-time token streaming for responsive UX. Constrain responses to valid JSON schemas with grammar enforcement.
Security Enhanced
On-device & secure
All inference runs locally. Tool permission policies with risk levels, approval workflows, and category-based access control.
Choose the right pattern for your use case.
From fast Q&A to extended dialogues with memory, tools, and agentic reasoning.
SingleTurnConversation
Single-turn conversation
Fast question-answer interactions without history retention. Optimized for stateless queries, classification tasks, and one-shot completions.
MultiTurnConversation
Multi-turn conversation
Extended dialogues with full history tracking, memory, function calling, vision, and agent skills. The foundation for chatbot agents.
Agents that remember what matters.
Transform stateless chatbots into assistants that evolve with each interaction. Memory is RAG-backed, KV-cache aware, and designed for production multi-user deployments.
AgentMemory integrates with MultiTurnConversation to store and recall semantic, episodic, and procedural knowledge across sessions. Memory is KV-cache aware, injecting only missing context to keep outputs grounded without repetition.
Enable automatic memory extraction and the system learns from every conversation turn. Facts, events, and procedures are classified, deduplicated, and stored without manual intervention. Over time, memory consolidation merges similar entries into concise summaries.
Type 01 · Facts & knowledge
Semantic memory
Store facts, definitions, and general knowledge. User preferences, product details, domain expertise.
Type 02 · Events & interactions
Episodic memory
Remember specific events and interactions. User history, support tickets, conversation milestones.
Type 03 · How-to & workflows
Procedural memory
Retain learned procedures and workflows. Remember how users like things done.
Capability New
Auto-extraction
LLM-based extraction classifies and stores memories automatically from every conversation turn.
Capability New
Consolidation
Merge semantically similar memories into concise summaries using LLM-powered clustering.
Capability New
Multi-user isolation
UserScopedMemory namespaces data by user ID. Scoped retrieval and per-user cleanup.
Capability
KV-cache aware recall
Memory injection is optimized for the model's key-value cache. Only missing context is added.
Capability New
Time-decay scoring
Exponential decay ensures recent memories rank higher. Configurable half-life and eviction policies.
Capability
Serialize & restore
Persist memory to disk and reload across sessions. Share memory states between agents.
Go beyond simple Q&A.
Equip chatbots with planning strategies that decompose complex tasks, and orchestration patterns that coordinate multiple specialized agents.
Reasoning New
Planning strategies
Give chatbots the ability to think step-by-step before acting. Select the planning strategy that fits your task complexity.
Production New
Enterprise resilience
Production-grade reliability with built-in resilience policies and full observability via OpenTelemetry.
Coordinate multiple specialized agents for complex workflows. Each orchestrator handles a different collaboration pattern with real-time streaming output.
Sequential agent chain. Each agent refines the output of the previous one.
Run multiple agents concurrently and merge results.
Intelligent routing to the best-fit specialist agent.
Supervisor delegates tasks to workers and synthesizes output.
Let chatbots call your code.
Connect to external services via MCP, and use 70+ built-in tools across 8 categories. See the dedicated Tools & Function Calling page and MCP page for complete coverage.
Attribute
[LMFunction] attribute
Decorate C# methods with [LMFunction] to expose them as callable tools. The SDK generates JSON Schema automatically from method signatures and XML documentation.
Interface & MCP
ITool, built-in tools & MCP
Use 70+ atomic built-in tools (file system, HTTP, web search, database, PDF), implement ITool for custom tools, or connect MCP servers for external tool catalogs.
One function call per turn with sequential execution.
Chain multiple calls in sequence within a single turn.
Execute independent calls concurrently for speed.
Combine parallel and sequential chaining.
Zero-code domain expertise.
Give chatbots domain expertise without writing code. Drop a SKILL.md file and your agent gains new capabilities instantly.
Agent Skills are reusable instruction files that teach your chatbot how to handle specific domains or tasks. Define a skill once, share it across agents and projects.
Users activate skills via slash commands like /explain or /pros-cons.
The model autonomously discovers and activates the right skill via function calling.
Skills support progressive loading, keyword and semantic matching, and multiple sources (filesystem, URLs, GitHub repositories).
A single, unified API. No boilerplate.
No rework when switching models. Five lines to a working chatbot agent. Four examples cover the common patterns: multi-turn chat, memory, tool calling, agent + ReAct.
Runnable samples for every chatbot capability.
Clone, build, and learn.
Console
Multi-turn chat
Interactive chatbot with context retention, model selection, and response regeneration.
View sampleConsole
Persistent session
Save and restore conversation state to disk. Resume sessions across app restarts.
View sampleConsole
Chat with tools
Function calling in action. Register C# methods and let the model invoke them.
View sampleConsole
Chat with vision
Process images alongside text using VLMs. Build visual assistants.
View sampleAgent
Research assistant
ReAct planning with web search. The agent reasons, searches, and synthesizes answers.
View sampleAgent
Persistent memory
Long-term memory across sessions with auto-extraction and recall.
View sampleAgent
Skill-based assistant
Agent Skills from SKILL.md files. Zero-code domain expertise with slash commands.
View sampleConsole
RAG chatbot
Chat with eBooks, PDFs, and documents using retrieval-augmented generation.
View sampleMAUI app
Chat playground
Full-featured chat UI with model switching, history management, and settings.
View samplePlugs into the .NET ecosystem you already use.
Microsoft
Semantic Kernel
Use LM-Kit models as the LLM backend for Semantic Kernel plugins, planners, and agents.
Learn moreMicrosoft
Microsoft.Extensions.AI
Drop-in IChatClient and IEmbeddingGenerator implementation. Compatible with the middleware pipeline.
Learn moreOpen standard
Model Context Protocol
Connect to any MCP server (stdio and SSE transports). Full spec support with sampling, roots, elicitation, and subscriptions.
Learn moreWhere chatbot agents ship value.
Customer support
Customer support
Deploy chatbots that handle complex queries, remember customer history, call your ticketing APIs, and route to specialists when needed.
Healthcare
Healthcare companions
Build virtual assistants for patient triage, scheduling, and follow-ups with HIPAA-compliant on-device processing.
Education
Educational tutors
Create intelligent tutoring systems that adapt to student level, remember progress, and use skills for different subjects.
E-commerce
E-commerce assistants
Power product discovery, order tracking, and personalized recommendations with memory and function calling.
Legal
Legal & compliance
Build document Q&A systems for contracts, policies, and regulations. RAG over your knowledge base, on-premises.
Knowledge
Enterprise knowledge
Deploy agentic chatbots that answer questions from internal wikis, search the web, and orchestrate multi-step research tasks.
Take chatbots to production.
Each chatbot capability has a dedicated deep-dive page. Pick what fits your build.
Agent templates
Eighteen specialised templates ship in the SDK: Chat, Assistant, QA, Tutor, ReAct, Research, Code, Debugger, Reviewer, and more.
Tools & function calling
70+ atomic built-in tools, custom ITool, [LMFunction] attribute binding, grammar-constrained decoding.
Real-time streaming
Channel-based, typed token kinds. Render content, thinking, and tool-call signals in your UI as they happen.
Permissions & guardrails
Allow / deny / require-approval policies driven by typed tool metadata. Build a safe-chat profile in five lines.
Resilience
Retry, circuit breaker, timeout, fallback, bulkhead, rate limit. Polly-style policies built for agent execution.
Observability
OpenTelemetry GenAI semantic conventions. Trace every tool call, plan step, and delegation in your existing OTel backend.
Build it. Read it. Try it.
Working console demos on GitHub, step-by-step how-to guides on the docs site, and the API reference for the classes used on this page.
Multi-turn chat
Console demo: history-aware chatbot with streaming.
Open on GitHub → DemoMulti-turn chat with persistent session
Console demo: save and resume conversation state.
Open on GitHub → How-to guideBuild a conversational assistant with memory
End-to-end: chat + memory + RAG + tools.
Read the guide →Start building chatbot agents today.
From simple multi-turn chat to agentic assistants with memory, reasoning, and tools. Get started in minutes with our SDK.