返回 MCP 目录
public公开dns本地运行

语义工作台

语义工作台是一款多功能工具,旨在帮助开发者快速构建和集成智能助手原型。它提供了一个统一的界面,支持与多个助手进行对话、配置设置以及展示各种行为。工作台由三个主要组件构成:工作台服务(后端)、工作台应用(前端)和助手服务(支持多种编程语言)。通过RESTful API,助手可以灵活地与工作台集成,适用于各种开发环境。工作台设计为与任何代理框架、语言或平台无关,便于实验、开发、测试和测量代理行为和工作流程。开发者可以使用GitHub Codespaces进行开箱即用的开发环境,或通过本地开发环境进行配置。工作台还支持从命令行启动,并提供了详细的开发指南和示例代码,帮助开发者快速上手和扩展功能。

article

README

Semantic Workbench

Semantic Workbench is a versatile tool designed to help prototype intelligent assistants quickly. It supports the creation of new assistants or the integration of existing ones, all within a cohesive interface. The workbench provides a user-friendly UI for creating conversations with one or more assistants, configuring settings, and exposing various behaviors.

The Semantic Workbench is composed of three main components:

  • Workbench Service (Python): The backend service that handles core functionalities.
  • Workbench App (React/Typescript): The frontend web user interface for interacting with workbench and assistants.
  • Assistant Services (Python, C#, etc.): any number of assistant services that implement the service protocols/APIs, developed using any framework and programming language of your choice.

Designed to be agnostic of any agent framework, language, or platform, the Semantic Workbench facilitates experimentation, development, testing, and measurement of agent behaviors and workflows. Assistants integrate with the workbench via a RESTful API, allowing for flexibility and broad applicability in various development environments.

Semantic Workbench architecture

Workbench interface examples

Configured dashboard example

Prospector Assistant example

Message debug inspection

Mermaid graph example

ABC music example

Quick start (Recommended) - GitHub Codespaces for turn-key development environment

GitHub Codespaces provides a cloud-based development environment for your repository. It allows you to develop, build, and test your code in a consistent environment, without needing to install dependencies or configure your local machine. It works with any system with a web browser and internet connection, including Windows, MacOS, Linux, Chromebooks, tablets, and mobile devices.

See the GitHub Codespaces / devcontainer README for more information on how to set up and use GitHub Codespaces with Semantic Workbench.

Local development environment

See the setup guide on how to configure your dev environment. Or if you have Docker installed you can use dev containers with VS Code which will function similarly to Codespaces.

Using VS Code

Codespaces will is configured to use semantic-workbench.code-workspace, if you are working locally that is recommended over opening the repo root. This ensures that all project configurations, such as tools, formatters, and linters, are correctly applied in VS Code. This avoids issues like incorrect error reporting and non-functional tools.

Workspace files allow us to manage multiple projects within a monorepo more effectively. Each project can use its own virtual environment (venv), maintaining isolation and avoiding dependency conflicts. Multi-root workspaces (*.code-workspace files) can point to multiple projects, each configured with its own Python interpreter, ensuring seamless functionality of Python tools and extensions.

Start the app and service

  • Use VS Code > Run and Debug (Ctrl/Cmd+Shift+D) > semantic-workbench to start the project
  • Open your browser and navigate to https://127.0.0.1:4000
    • You may receive a warning about the app not being secure; click Advanced and Proceed to localhost to continue
  • You can now interact with the app and service in the browser

Start an assistant service:

  • Launch an example an example assistant service:
    • No llm api keys needed
      • Use VS Code > Run and Debug (Ctrl/Cmd+Shift+D) > examples: python-01-echo-bot to start the example assistant that echos your messages. This is a good base to understand the basics of building your own assistant.
    • Bring your own llm api keys
      • Use VS Code > Run and Debug (Ctrl/Cmd+Shift+D) > examples: python-02-simple-chatbot to start the example chatbot assistant. Either set your keys in your .env file or after creating the assistant as described below, select it and provide the keys in the configuration page.

Open the Workbench and create an Assistant

Open the app in your browser at https://localhost:4000. When you first log into the Semantic Workbench, follow these steps to get started:

  1. Create an Assistant: On the dashboard, click the New Assistant button. Select a template from the available assistant services, provide a name, and click Save.

  2. Start a Conversation: On the dashboard, click the New Conversation button. Provide a title for the conversation and click Save.

  3. Add the Assistant: In the conversation window, click the conversation canvas icon and add your assistant to the conversation from the conversation canvas. Now you can converse with your assistant using the message box at the bottom of the conversation window.

    Open Conversation Canvas

    Open Canvas

Expected: You get a response from your assistant!

Note that the workbench provides capabilities that not all examples use, for example providing attachments. See the Semantic Workbench for more details.

Developing your own assistants

To develop new assistants and connect existing ones, see the Assistant Development Guide or any check out one of the examples.

  • Python example 1: a simple assistant echoing text back.
  • Python example 2: a simple chatbot implementing metaprompt guardrails and content moderation.
  • Python example 3: an extension of the simple chatbot that supports configuration against additional llms.
  • .NET example 1: a simple agent with echo and support for a basic /say command.
  • .NET example 2: a simple assistants showcasing Azure AI Content Safety integration and some workbench features like Mermaid graphs.
  • .NET example 3: a functional chatbot implementing metaprompt guardrails and content moderation.

Starting the workbench from the command line

Refreshing Dev Environment

  • Use the tools\reset-service-data.sh or tools\reset-service-data.sh script to reset all service data. You can also delete ~/workbench-service/.data or specific files if you know which one(s).
  • From repo root, run make clean install.
    • This will perform a git clean and run installs in all sub-directories
  • Or a faster option if you just want to install semantic workbench related stuff:
    • From repo root, run make clean
    • From ~/workbench-app, run make install
    • From ~/workbench-service, run make install

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Please see the detailed contributing guide for more information on how you can get involved.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端