BotSharp

SciSharpApache-2.0活跃维护

基于 .NET 的多智能体 AI 框架,用来快速搭建对话机器人和多 Agent 协作应用,省去从零编排通信与任务分发的麻烦。

AI Multi-Agent Framework in .NET

r5.2-image-composition发布于 2025-10-17 19:39 UTC3,116star660fork同步于 2026-11-11 05:39 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/dotnetcore/BotSharp
cd BotSharp
dotnet run --project ./src/WebStarter/WebStarter.csproj -p SolutionName=BotSharp
硬件要求按 README 说明

README 未说明显存或 GPU 要求;框架运行在 .NET Core 上,支持 Windows、Linux、macOS,需 .NET 6+ SDK。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 .NET 的开源多智能体应用框架,把 LLM 接入现有业务系统

基于 .NET 的多智能体 AI 框架,用来快速搭建对话机器人和多 Agent 协作应用,省去从零编排通信与任务分发的麻烦。

核心能力

  • 内置多智能体与带状态管理的会话
  • 插件化流水线设计,LLM 提供商与 UI 可替换
  • 内置 RAG 接口与基于向量的记忆检索
  • 支持 RESTful Open API 与 WebSocket 实时通信
  • 内置 MCP 集成,可视化配置工具调用

容易踩的坑

需先安装 .NET 6+ SDK 并执行 dotnet restore,否则会因依赖报错启动失败;LLM 调用需在 appsettings.json 中配置对应提供商的 API Key 和正确的模型名;管理界面是独立仓库 BotSharp-UI,需另行克隆并用 npm install && npm run dev 启动。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本r5.2-image-composition
  1. r5.2-image-composition最新正式版2025-10-17 · 2025-10-17 19:39 UTC

    What's Changed

  2. r5.1-utility-improment2025-06-27 · 2025-06-27 14:05 UTC
    查看更新说明

    What's Changed

  3. r5.0-mcp2025-04-05 · 2025-04-05 00:32 UTC
    查看更新说明

    What's Changed

  4. r4.1-realtimev4.1-Realtime2025-03-16 · 2025-03-16 14:48 UTC
    查看更新说明

    What's Changed

  5. r4.0-sidecar2025-01-02 · 2025-01-02 22:53 UTC
    查看更新说明

    What's Changed

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    The Open Source AI Agent Application Framework

    Connect LLMs to your existing application focused on your business

    Discord QQ群聊 Apache 2.0 NuGet build Documentation Status

    "Conversation as a platform (CaaP) is the future, so it's perfect that we're already offering the whole toolkits to our .NET developers using the BotSharp AI BOT Platform Builder to build a CaaP. It opens up as much learning power as possible for your own robots and precisely control every step of the AI processing pipeline."

    BotSharp is an open source machine learning framework for AI Bot platform builder. This project involves natural language understanding, computer vision and audio processing technologies, and aims to promote the development and application of intelligent robot assistants in information systems. Out-of-the-box machine learning algorithms allow ordinary programmers to develop artificial intelligence applications faster and easier.

    It's written in C# running on .Net Core that is full cross-platform framework, the plug-in and pipeline flow execution design is adopted to completely decouple the plug-ins. C# is a enterprise grade programming language which is widely used to code business logic in information management related system. More friendly to corporate developers. BotSharp adopts machine learning algorithm in C# directly. That will facilitate the feature of the typed language C#, and be more easier when refactoring code in system scope.

    BotSharp is in accordance with components principle strictly, decouples every part that is needed in the platform builder. So you can choose different UI/UX, or pick up a different LLM providers. They are all modularized based on unified interfaces. BotSharp provides an advanced Agent abstraction layer to efficiently manage complex application scenarios in enterprises, allowing enterprise developers to efficiently integrate AI into business systems.

    Some Features

    • Built-in multi-agents and conversation with state management.
    • Support multiple LLM Planning approaches to handle different tasks from simple to complex.
    • Built-in RAG related interfaces, Memory based vector searching.
    • Support multiple AI platforms (ChatGPT 3.5/ 4o/ o1, Gemini 2, LLaMA 3, Claude Sonnet 3.5,DeepSeek V3, HuggingFace).
    • Allow multiple agents with different responsibilities cooperate to complete complex tasks.
    • Build, test, evaluate and audit your LLM agent in one place.
    • Build-in BotSharp UI written in SvelteKit.
    • Abstract standard Rich Content data structure. Integrate with popular message channels like Facebook Messenger, Slack and Telegram.
    • Provide RESTful Open API and WebSocket real-time communication.
    • Built-in MCP Integration: Visual management of MCP, enabling large model calls to Tools. Supports mainstream services like mcp.so

    Quick Started

    1. Run backend service
     PS D:\> git clone https://github.com/dotnetcore/BotSharp
     PS D:\> cd BotSharp
     # For Windows
     PS D:\BotSharp\> dotnet run --project .\src\WebStarter\WebStarter.csproj -p SolutionName=BotSharp
     # For Linux
     $ dotnet run --project ./src/WebStarter/WebStarter.csproj -p SolutionName=BotSharp
    
    1. Run Admin UI project, reference to BotSharp UI.
    PS D:\> git clone https://github.com/SciSharp/BotSharp-UI
    PS D:\> cd BotSharp-UI
    PS D:\> npm install
    PS D:\> npm run dev
    

    Access http://localhost:5015/

    Online Demo with UI

    Core Modules

    The core module is mainly composed of abstraction and framework function implementation, combined with some common tools.

    • Plugin Loader
    • Hooking
    • Authentication
    • Agent Profile
    • Conversation & State
    • Routing & Planning
    • Templating
    • File Repository
    • Caching
    • Rich Content
    • LLM Provider

    Plugins

    BotSharp uses component design, the kernel is kept to a minimum, and business functions are implemented by external components. The modular design also allows contributors to better participate. Below are the built-in plugins:

    Data Storages
    LLMs
    • BotSharp.Plugin.Planner
    • BotSharp.Plugin.AzureOpenAI
    • BotSharp.Plugin.OpenAI
    • BotSharp.Plugin.AnthropicAI
    • BotSharp.Plugin.DeepSeekAI
    • BotSharp.Plugin.GoogleAI
    • BotSharp.Plugin.MetaAI
    • BotSharp.Plugin.HuggingFace
    • BotSharp.Plugin.LLamaSharp
    • BotSharp.Plugin.SemanticKernel
    • BotSharp.Plugin.SparkDesk
    Messaging / Channel
    • BotSharp.OpenAPI
    • BotSharp.Plugin.ChatHub
    • BotSharp.Plugin.MetaMessenger
    • BotSharp.Plugin.Twilio
    • BotSharp.Plugin.TelegramBots
    • BotSharp.Plugin.WeChat
    RAGs
    • BotSharp.Plugin.KnowledgeBase
    • BotSharp.Plugin.Qdrant
    Visions
    • BotSharp.Plugin.PaddleSharp
    Tools
    • BotSharp.Plugin.Dashboard
    • BotSharp.Plugin.RoutingSpeeder
    • BotSharp.Plugin.AudioHandler
    • BotSharp.Plugin.ChartHandler
    • BotSharp.Plugin.EmailHandler
    • BotSharp.Plugin.ExcelHandler
    • BotSharp.Plugin.FileHandler
    • BotSharp.Plugin.ImageHandler
    • BotSharp.Plugin.HttpHandler
    • BotSharp.Plugin.SqlDriver
    • BotSharp.Plugin.WebDriver
    • BotSharp.Plugin.PythonInterpreter
    UIs
    • BotSharp.Plugin.ChatbotUI

    Roadmap

    • A2A
    • MCP
    • Realtime
    • Computer Use
    • Browser Use
    • Database Assistant
    • Code Interpreter
    • Conversation Management
    • Multi-Agent Routing
    • Knowledge Base

    FAQ

    General Questions

    What is BotSharp? BotSharp is an open-source .NET machine learning framework for building AI Bot platforms. It provides out-of-the-box components for natural language understanding, computer vision, and audio processing, enabling enterprise developers to integrate AI into business systems efficiently.

    What .NET versions are supported? BotSharp runs on .NET Core, which is fully cross-platform. It supports .NET 6+ and works on Windows, Linux, and macOS.

    Is BotSharp free to use? Yes, BotSharp is licensed under Apache 2.0, allowing free use in both personal and commercial projects.

    LLM Provider Configuration

    Which LLM providers are supported? BotSharp supports multiple AI platforms including ChatGPT (3.5/4o/o1), Gemini 2, LLaMA 3, Claude Sonnet 3.5, DeepSeek V3, HuggingFace, and more through its modular plugin system.

    How do I configure a custom LLM provider? Create a plugin that implements the LLM provider interface, or use one of the built-in plugins like BotSharp.Plugin.OpenAI or BotSharp.Plugin.AnthropicAI. Configure the API keys in your appsettings.json.

    Agent Development

    How do I create a custom agent? Define an agent profile with its responsibilities, then implement the required hooks and plugins. BotSharp's advanced Agent abstraction layer handles the complex orchestration automatically.

    Can multiple agents cooperate on a task? Yes, BotSharp supports multi-agent scenarios where agents with different responsibilities can cooperate to complete complex tasks. The routing and planning system handles agent coordination.

    MCP Integration

    What is MCP and how does BotSharp support it? MCP (Model Context Protocol) enables large model calls to external tools. BotSharp has built-in MCP integration with visual management capabilities, supporting mainstream services like mcp.so.

    Deployment

    How do I deploy BotSharp in production? Run the backend service using dotnet run and deploy it behind a reverse proxy (Nginx/IIS). The Admin UI (built with SvelteKit) can be deployed separately. See the documentation for detailed deployment guides.

    Can I use BotSharp without the UI? Yes, BotSharp provides RESTful Open API and WebSocket real-time communication. You can integrate it directly with your own frontend or messaging channels.

    Troubleshooting

    BotSharp fails to start with dependency errors Ensure you have .NET 6+ SDK installed and all NuGet packages are restored. Run dotnet restore before dotnet run.

    LLM calls are timing out Check your API key configuration in appsettings.json, verify network connectivity to the LLM provider, and ensure the model name is correct.

    Documents

    Read the docs: https://botsharp.readthedocs.io?wt.mc_id=AI-MVP-5005183

    New documentation website: https://botsharp.verdure-hiro.cn

    If you feel that this project is helpful to you, please Star the project, we would be very grateful.

    Member project of SciSharp STACK which is the .NET based ecosystem of open-source software for mathematics, science, and engineering.