AI chatbot & agent SDK

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.

3 memory types ReAct planning MCP & tools Agent Skills 100% on-device
Persistent memory · New

Semantic, episodic and procedural memory with auto-extraction and consolidation.

Agentic reasoning · New

ReAct, Chain-of-Thought, and Tree-of-Thought planning strategies.

Function calling & MCP · Core

4 execution modes, built-in tools, and Model Context Protocol servers.

Agent skills · New

Drop-in SKILL.md files for zero-code domain expertise.

Vision & multimodal · Core

Process images in any turn with VLM-capable models.

Enterprise security · New

Tool permission policies, risk levels, and approval workflows.

100%
On-device
18
Agent templates
70+
Built-in tools
4
Orchestrators
Why LM-Kit

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.

Getting started API reference Samples repository Changelog
Capabilities

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.

MultiTurnConversation class documentation →
Conversation APIs

Choose the right pattern for your use case.

From fast Q&A to extended dialogues with memory, tools, and agentic reasoning.

Smart memories

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.

Introducing AgentMemory blog post → AgentMemory class documentation
Agentic reasoning & orchestration

Go beyond simple Q&A.

Equip chatbots with planning strategies that decompose complex tasks, and orchestration patterns that coordinate multiple specialized agents.

Multi-agent orchestration

Coordinate multiple specialized agents for complex workflows. Each orchestrator handles a different collaboration pattern with real-time streaming output.

Pipeline
Sequential agent chain. Each agent refines the output of the previous one.
Parallel
Run multiple agents concurrently and merge results.
Router
Intelligent routing to the best-fit specialist agent.
Supervisor
Supervisor delegates tasks to workers and synthesizes output.
Agent framework documentation →
Function calling & tool use

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.

Execution modes
Simple
One function call per turn with sequential execution.
Multiple
Chain multiple calls in sequence within a single turn.
Parallel
Execute independent calls concurrently for speed.
Parallel + Multiple
Combine parallel and sequential chaining.
Understanding function calling in LM-Kit.NET MCP & tools page
Agent skills

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.

Manual mode

Users activate skills via slash commands like /explain or /pros-cons.

Model-driven mode

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).

Built for developer velocity

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.

Common use cases

Where 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.

Related capabilities

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.

Templates page

Tools & function calling

70+ atomic built-in tools, custom ITool, [LMFunction] attribute binding, grammar-constrained decoding.

Tools page

Real-time streaming

Channel-based, typed token kinds. Render content, thinking, and tool-call signals in your UI as they happen.

Streaming page

Permissions & guardrails

Allow / deny / require-approval policies driven by typed tool metadata. Build a safe-chat profile in five lines.

Permissions page

Resilience

Retry, circuit breaker, timeout, fallback, bulkhead, rate limit. Polly-style policies built for agent execution.

Resilience page

Observability

OpenTelemetry GenAI semantic conventions. Trace every tool call, plan step, and delegation in your existing OTel backend.

Observability page

Install the SDK

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.

Download View pricing