发布于 2026-01-06 6 阅读
0

端到端 GitHub 工作流程:代理(CrewAI)、用户界面(CopilotKit)、自动化(Composio)

端到端 GitHub 工作流程:代理(CrewAI)、用户界面(CopilotKit)、自动化(Composio)

太长不看

在本文中,您将学习如何构建一个可用于生产的 MCP 服务器,该服务器可以自动分析 GitHub 存储库、创建 Notion 数据库并安排错误审查会议。

我们将涵盖以下内容:

  • 了解 MCP 协议及其生态系统
  • 使用 CrewAI 构建用于 GitHub 分析的多智能体系统
  • 通过 Composio 平台集成 GitHub、Notion 和 Google Calendar 工具
  • 创建一个 MCP 服务器,将 AI 工作流程作为标准化工具公开。
  • 使用 CopilotKit AG-UI 连接和测试您的 MCP 服务器——CopilotKit AG-UI 是用于 MCP 服务器交互和工作流执行的完整前端界面。

我们将使用:CrewAI进行多智能体编排,Composio进行工具集成,以及Nebius LLM 模型进行智能分析。

然后,您可以将 MCP 服务器连接到CopilotKit AG-UI,这是一个功能强大的 CopilotKit 前端界面,用于实时测试和与 MCP 服务器交互。

模型上下文协议(MCP)

MCP 是一种开源、轻量级的协议,它规范了 AI 应用连接外部数据源、工具和服务的方式。与需要为每个服务进行自定义实现的传统 API 集成不同,MCP 为 AI 代理提供了一个统一的接口,使其能够与任何兼容 MCP 的工具或数据源进行交互。

MCP协议支持三种核心交互类型:

  • 工具:人工智能代理可以执行操作(例如创建日历事件或获取 GitHub 数据)
  • 资源:人工智能代理可以访问动态内容(例如文件系统或数据库)。
  • 提示:人工智能代理可以使用模板化的交互方式来实现一致的行为。

以下是我们将如何使用 MCP 的预览


AG-UI是什么

AG-UI(代理-用户交互协议)是由 CopilotKit 开发的一种开放、轻量级的协议,它通过标准的 HTTP 或 WebSocket 连接传输单个 JSON 事件序列。这些事件包括消息、工具调用、状态更新和生命周期信号,它们可以在代理后端和前端界面之间无缝流动,从而保持完美的实时同步。

图1

虽然人工智能生态系统主要侧重于后端自动化,用户交互有限,但 AG-UI 通过在代理和界面之间建立一致的契约来弥合这一差距,消除了自定义 WebSocket 格式和文本解析技巧。

借助 AG-UI,组件可以互换;您可以将 CopilotKit 的 React 组件与任何 AG-UI 源一起使用,无需更改 UI 即可在云端和本地模型之间切换,并通过单一界面协调专用代理。这使得构建协作式 AI 体验更加快捷可靠。

请查看 CopilotKit 的综合指南,了解如何使用 AG-UI 协议向任何 AG2 代理添加前端,以获取实际实现示例。

星 AG-UI ⭐️

为什么选择 MCP + CrewAI + Composio + CopilotKit?

构建能够与现实世界工具交互的人工智能代理一直以来都非常复杂且分散。每次集成都需要自定义代码、身份验证处理和错误管理。我们的技术栈通过结合以下几点解决了这个问题:

  1. MCP协议:标准化人工智能工具通信
  2. CrewAI:多智能体协调和工作流编排
  3. Composio:为 3 种工具提供可用于生产环境的集成
  4. Nebius LLMs:智能决策与分析
  5. CopilotKit AG-UI:一个可用于生产环境的代理-用户交互协议,它通过统一的事件流实现 AI 代理和用户之间的实时协作,并提供工具编排、共享状态管理和直观的聊天式交互等功能。点击此处了解更多信息。

通过这种组合,我们将构建一个人工智能工作流,它可以分析 GitHub 代码库、管理 Notion 数据库,并在必要时创建日历会议。所有这些操作都将通过 CopilotKit AG-UI 完成,并支持实时进度流和标准化的 MCP 协议通信,从而展示 CopilotKit 的代理-用户交互协议如何通过简洁优雅的用户界面,使复杂的人工智能工作流变得易于操作。

构建 MCP 服务器后端

在本节中,我们将构建我们的 GitHub 分析后端,其中我们将有一个系统,该系统将使用三个专门的 AI 代理按顺序工作,以分析存储库并自动执行错误分类工作流程。

第一步:项目结构和依赖关系

首先,让我们建立项目结构,以确保它是模块化的且易于维护的。

快速入门:从我们的GitHub 存储库克隆完整的实现,其中包含所有代码文件、配置模板和设置说明。

克隆仓库并导航到项目目录:

git clone https://github.com/Taofiqq/crewai-composio-mcp-server.git
cd crewai-composio-mcp-server
Enter fullscreen mode Exit fullscreen mode

使用 pip 安装依赖项:

pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

复制环境模板并配置您的 API 密钥:

cp .env.example .env
Enter fullscreen mode Exit fullscreen mode

然后,.env使用所需的 API 密钥配置您的文件:

COMPOSIO_API_KEY=your-composio-api-key
NEBIUS_API_KEY=your-nebius-api-key
TARGET_REPOSITORY=vercel/next-learn
DEFAULT_ATTENDEE_EMAIL=your-email@gmail.com
Enter fullscreen mode Exit fullscreen mode

最终的目录结构应该如下所示:

crewai-composio-mcp-server/
├── agents/                
│   ├── __init__.py
│   ├── github_agent.py   
│   ├── notion_agent.py    
│   └── calendar_agent.py  
├── tasks/                  
│   ├── __init__.py
│   ├── github_tasks.py    
│   ├── notion_tasks.py   
│   └── calendar_tasks.py 
├── workflow/              
│   ├── __init__.py
│   ├── github_workflow.py      
│   ├── notion_workflow.py       
│   ├── calendar_workflow.py    
│   └── full_orchestrator.py    
├── config/                 
│   ├── __init__.py
│   └── settings.py        
├── tools/                  
│   ├── __init__.py
│   └── composio_setup.py  
├── llm/                    
│   ├── __init__.py
│   └── nebius_client.py   
├── mcp_server_wrapper.py   
├── main.py                
├── requirements.txt       
├── .env.example           
├── .gitignore            
└── README.md             
Enter fullscreen mode Exit fullscreen mode

步骤 2:配置和环境设置

在本节中,我们将创建一个配置文件settings.py,集中管理所有 API 密钥、模型设置和工作流参数。这种方法可以确保凭证管理的安全,并使系统易于配置。

# config/settings.py
import os
from dotenv import load_dotenv

load_dotenv()

class Settings:
    # API Keys
    COMPOSIO_API_KEY = os.getenv("COMPOSIO_API_KEY")
    NEBIUS_API_KEY = os.getenv("NEBIUS_API_KEY")

    # Nebius LLM Configuration
    NEBIUS_MODEL = os.getenv("NEBIUS_MODEL", "meta-llama/Meta-Llama-3.1-8B-Instruct")
    NEBIUS_BASE_URL = os.getenv("NEBIUS_BASE_URL", "https://api.studio.nebius.ai/v1/")

    # Project Configuration
    TARGET_REPOSITORY = os.getenv("TARGET_REPOSITORY", "vercel/next-learn")
    DEFAULT_ATTENDEE_EMAIL = os.getenv("DEFAULT_ATTENDEE_EMAIL", "abumahfuz21@gmail.com")

    # Workflow Settings
    BUG_LABEL = "bug"
    MEETING_DURATION_MINUTES = 30
    ENTITY_ID = "default"

settings = Settings()
Enter fullscreen mode Exit fullscreen mode

创建.env包含所需 API 密钥的文件:

# .env
COMPOSIO_API_KEY=your_composio_api_key_here
NEBIUS_API_KEY=your_nebius_api_key_here
NEBIUS_MODEL=meta-llama/Meta-Llama-3.1-8B-Instruct
TARGET_REPOSITORY=vercel/next-learn
DEFAULT_ATTENDEE_EMAIL=your-email@gmail.com
Enter fullscreen mode Exit fullscreen mode

步骤 3:Composio 工具集成设置

Composio 为 GitHub、Notion、Google Calendar 和 250 多种其他工具提供生产就绪的集成。在本用例中,我们将使用 GitHub、Notion 和 Google Calendar 这三个工具。让我们来设置工具管理系统:

# tools/composio_setup.py
from composio_crewai import ComposioToolSet, App, Action
from config.settings import settings

class ComposioTools:
    def __init__(self):
        self.toolset = ComposioToolSet()
        self.entity_id = settings.ENTITY_ID

    def get_github_tools(self):
        """Get GitHub-specific tools for repository analysis."""
        return self.toolset.get_tools(apps=[App.GITHUB], entity_id=self.entity_id)

    def get_notion_tools(self):
        """Get Notion-specific tools for database management."""
        return self.toolset.get_tools(apps=[App.NOTION], entity_id=self.entity_id)

    def get_calendar_tools(self):
        """Get Google Calendar tools for meeting scheduling."""
        return self.toolset.get_tools(apps=[App.GOOGLECALENDAR], entity_id=self.entity_id)

    def get_specific_actions(self, actions):
        """Get specific Composio actions for targeted functionality."""
        return self.toolset.get_tools(actions=actions, entity_id=self.entity_id)

# Initialize global tools instance
composio_tools = ComposioTools()
Enter fullscreen mode Exit fullscreen mode

运行test_composio_setup.py克隆仓库中的文件,以验证设置是否正确。

图2

步骤 4:Nebius LLM 客户端设置

在本节中,我们将配置 LLM 客户端以进行智能分析和决策:

# llm/nebius_client.py
import openai
from typing import Dict, Any
import logging
from config.settings import settings

class NebiusClient:
    """Wrapper class for Nebius LLM integration with CrewAI"""

    def __init__(self):
        self.client = openai.OpenAI(
            api_key=settings.NEBIUS_API_KEY, 
            base_url=settings.NEBIUS_BASE_URL
        )
        self.model = settings.NEBIUS_MODEL

    def analyze_labels(self, labels: list) -> Dict[str, Any]:
        """Analyze GitHub issue/PR labels to determine if action is needed"""
        labels_str = ", ".join(labels) if labels else "no labels"

        prompt = f"""
        Analyze these GitHub issue/PR labels: {labels_str}

        Determine:
        1. Is this a bug? (yes/no)
        2. Priority level (low/medium/high/critical)  
        3. Should we schedule a meeting? (yes/no)
        4. Meeting urgency (within 24h/within week/no urgency)

        Respond with ONLY a JSON object.
        """

        response = self.client.chat.completions.create(
            model=self.model,
            messages=[
                {"role": "system", "content": "You are a GitHub issue analyzer. Respond only with valid JSON."},
                {"role": "user", "content": prompt}
            ],
            max_tokens=200,
            temperature=0.1
        )

        return json.loads(response.choices[0].message.content.strip())

# Global instance
nebius_client = NebiusClient()
Enter fullscreen mode Exit fullscreen mode

运行test_nebius_client.py克隆仓库中的文件进行测试:

图3

第五步:构建专业的 CrewAI 代理

现在我们来创建三个专业代理人。每个代理人都有特定的角色和工具集:

GitHub Agent - 代码库分析工具

GitHub Agent 会连接到提供的 GitHub 仓库,并获取所有问题和拉取请求。它会读取每个条目,提取标题、标签以及负责处理这些问题的人员等重要信息。您可以将其视为一个智能数据收集器,它收集 GitHub 项目中发生的一切,并将其整理以便进行分析。

# agents/github_agent.py

from crewai import Agent, LLM
from composio_crewai import Action
from tools.composio_setup import composio_tools
from config.settings import settings

class GitHubAgentBuilder:
    def __init__(self):
        self.tools = self._get_github_tools()

    def _get_github_tools(self):
        """Get specific GitHub tools needed for our workflow"""
        github_actions = [
            Action.GITHUB_ISSUES_LIST_FOR_REPO,
            Action.GITHUB_LIST_PULL_REQUESTS,
        ]
        return composio_tools.get_specific_actions(github_actions)
Enter fullscreen mode Exit fullscreen mode

Notion Agent - 数据库管理工具

Notion Agent 会获取 GitHub 数据,并在您的 Notion 工作区中创建一个结构化的数据库。它会自动创建包含正确列(例如“标题”、“缺陷状态”、“负责人”)的表格,并将所有 GitHub 信息填充到这些表格中。

# agents/notion_agent.py
from crewai import Agent, LLM
from composio_crewai import Action
from tools.composio_setup import composio_tools
from config.settings import settings

class NotionAgentBuilder:
    def __init__(self):
        self.tools = self._get_notion_tools()

    def _get_notion_tools(self):
        """Get specific Notion tools for database operations"""
        notion_actions = [
            Action.NOTION_SEARCH_NOTION_PAGE,
            Action.NOTION_CREATE_DATABASE,
            Action.NOTION_INSERT_ROW_DATABASE,
        ]
        return composio_tools.get_specific_actions(notion_actions)

Enter fullscreen mode Exit fullscreen mode

日历代理 - 会议协调工具

日历代理是一个智能会议安排工具。它会遍历所有 GitHub 数据,查找标记为“bug”或关键问题的条目,并自动创建日历会议来讨论这些问题。它会发送包含所有相关 GitHub 上下文信息的会议邀请,以便您的团队清楚地了解需要讨论的内容和时间。

# agents/calendar_agent.py
from crewai import Agent, LLM
from composio_crewai import Action
from tools.composio_setup import composio_tools
from config.settings import settings

class CalendarAgentBuilder:
    def __init__(self):
        self.tools = self._get_calendar_tools()

    def _get_calendar_tools(self):
        """Get specific Google Calendar tools for meeting scheduling"""
        calendar_actions = [Action.GOOGLECALENDAR_CREATE_EVENT]
        return composio_tools.get_specific_actions(calendar_actions)
Enter fullscreen mode Exit fullscreen mode

步骤 6:定义代理任务和工作流程

我们创建的每个代理都需要特定的任务来定义其职责。

我们先来创建 GitHub 任务。这些任务会一步一步地告诉 GitHub Agent 该做什么。首先,它会从代码仓库中获取所有最新的问题,例如错误报告和功能请求。然后,它会获取所有拉取请求,也就是开发者想要合并的代码更改。最后,它会综合分析所有内容,找出哪些条目被标记为错误或需要紧急处理:

# tasks/github_tasks.py
from crewai import Task
from agents.github_agent import github_agent
from config.settings import settings

class GitHubTasks:
    @staticmethod
    def fetch_issues_task() -> Task:
        return Task(
            description=f"""
            Fetch the most recent GitHub issues from the {settings.TARGET_REPOSITORY} repository.

            Requirements:
            1. Get at least 10 recent issues (open or closed)
            2. Extract: title, number, state, labels, assignees, created date, author
            3. Focus on issues that might need attention (bugs, critical issues)
            4. Return data in structured format
            """,
Enter fullscreen mode Exit fullscreen mode

接下来,我们将创建 Notion 任务。

这些任务会引导 Notion Agent 创建并填充数据库。首先,它会搜索您的 Notion 工作区,找到合适的页面来创建数据库。然后,它会创建一个名为“GitHub Issues & PRs”的新数据库,并设置正确的列和结构。最后,它会获取所有 GitHub 数据,并将其整齐地整理成数据库中的行:

# tasks/notion_tasks.py

from crewai import Task
from agents.notion_agent import notion_agent
from config.settings import settings
import logging

# Set up logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

class NotionTasks:
    """Container class for Notion-related tasks"""

    @staticmethod
    def search_parent_pages_task() -> Task:
        """Task to search for available parent pages in Notion workspace"""

        task = Task(
            description=f"""
            Search for available pages in the Notion workspace to find a parent page for database creation.

            Requirements:
            1. Use NOTION_SEARCH_NOTION_PAGE to search for pages in the workspace
            2. Find any available page that can serve as a parent for database creation
            3. Extract the page ID from the search results
            4. Choose the first available page from the results

            IMPORTANT: Use the exact action name NOTION_SEARCH_NOTION_PAGE

            Focus on finding any page that can be used as a parent for the GitHub database.
            """,
Enter fullscreen mode Exit fullscreen mode

最后,我们将创建日历任务。

这些任务帮助日历代理自动安排缺陷会议。首先,它会扫描所有 GitHub 数据,检测哪些条目被标记为缺陷或关键问题。然后,它会为每个缺陷创建日历会议,并提前 24 小时安排会议。最后,它会发送包含所有缺陷详细信息的会议邀请,以便每个人都知道将要讨论的内容:

# tasks/calendar_tasks.py
"""
Calendar-specific tasks for bug meeting scheduling
Sends meeting invitations ONLY to abumahfuz21@gmail.com when bugs are detected
"""

from crewai import Task
from agents.calendar_agent import calendar_agent
from config.settings import settings
import logging

# Set up logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

class CalendarTasks:
    """Container class for Calendar-related bug meeting tasks"""

    @staticmethod
    def detect_bugs_task() -> Task:
        """Task to analyze GitHub data and identify bug-labeled items"""

        task = Task(
            description=f"""
            Analyze the GitHub issues and pull requests data to identify items labeled with '{settings.BUG_LABEL}' or similar critical labels.

            Requirements:
            1. Review all GitHub issues and PRs provided in the context
            2. Identify items specifically labeled with '{settings.BUG_LABEL}', 'critical', 'urgent', or 'security'
            3. Extract key information for each bug:
Enter fullscreen mode Exit fullscreen mode

步骤 7:多代理工作流编排

现在让我们创建完整的流程协调器,以协调所有三个代理:

# workflow/full_orchestrator.py
from crewai import Crew, Process
from agents.github_agent import github_agent
from agents.notion_agent import notion_agent  
from agents.calendar_agent import calendar_agent
from tasks.github_tasks import GitHubTasks
from tasks.notion_tasks import NotionTasks
from tasks.calendar_tasks import CalendarTasks
from config.settings import settings
import logging
from datetime import datetime

class FullGitHubNotionCalendarOrchestrator:
    """Complete GitHub + Notion + Calendar workflow orchestrator"""

    def __init__(self):
        self.github_agent = github_agent
        self.notion_agent = notion_agent
        self.calendar_agent = calendar_agent
        self.tasks = self._setup_tasks()
        self.crew = self._create_crew()

    def _setup_tasks(self):
        """Setup tasks with proper context linking for complete data flow"""

        # Create all task instances
        github_tasks = GitHubTasks()
        notion_tasks = NotionTasks()
        calendar_tasks = CalendarTasks()
Enter fullscreen mode Exit fullscreen mode

这里是代理和任务连接​​的地方。它协调所有三个代理以完美的顺序协同工作。这就像一个项目经理,将任务分配给不同的团队成员,并确保每个人的工作都能顺利传递给下一个需要的人。协调器确保 GitHub 代理在 Notion 代理开始整理数据之前完成数据收集,而日历代理只有在收集到前几个步骤中的所有错误信息后才会安排会议。

运行test_orchestrator.py脚本文件以测试编排器工作流:

图4

图5

图6

图片7

图8

步骤 8:创建 MCP 服务器包装器

现在我们将创建 MCP 服务器,它将我们的多智能体工作流以标准化工具的形式公开,供任何 MCP 客户端使用。MCP 服务器将充当桥梁,接收我们的 CrewAI 工作流,并通过模型上下文协议 (MCP) 使其可用。

主要 CLI 入口点:

# main.py
import argparse
import sys
from datetime import datetime
from workflow.full_orchestrator import run_complete_workflow
from config.settings import settings
import logging

def main():
    parser = argparse.ArgumentParser(description="Analyze GitHub repository and create Notion database")
    parser.add_argument("--repo", type=str, help='GitHub repository in format "owner/repo"', default=None)
    args = parser.parse_args()
Enter fullscreen mode Exit fullscreen mode

MCP 服务器实施

现在创建 MCP 服务器包装器,将我们的工作流程公开为标准化工具:

# mcp_server_wrapper.py
"""
MCP Server Wrapper for CrewAI + Composio + Nebius Backend
Exposes GitHub analysis workflows as MCP tools via SSE transport
"""

import asyncio
import logging
from typing import Any, Dict, List
from datetime import datetime
import json

# MCP imports - using FastMCP for easier setup
from mcp.server.fastmcp import FastMCP
from mcp.types import Tool, TextContent

# Your existing workflow imports
from workflow.full_orchestrator import run_complete_workflow
from workflow.github_workflow import run_github_workflow
from workflow.notion_workflow import run_notion_workflow_with_data
from workflow.calendar_workflow import run_calendar_bug_workflow_with_data
from config.settings import settings

# Set up logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("github-analysis-mcp-server")

# Create FastMCP Server
mcp = FastMCP("github-analysis-backend")

@mcp.tool()
async def analyze_github_repository(
    repository: str, meeting_recipient: str = settings.DEFAULT_ATTENDEE_EMAIL
) -> str:
    """
    Complete GitHub repository analysis with Notion database creation and bug meeting scheduling.
Enter fullscreen mode Exit fullscreen mode

我们可以通过运行以下命令来测试这一点python mcp_server_wrapper.py。这将在端口 8000 上启动服务器:

图片9

您还可以运行以下命令来测试 mcp 服务器,npx @modelcontextprotocol/inspector以查看所有工具和工作流程:

(venv) npx @modelcontextprotocol/inspector
Starting MCP inspector...
⚙️ Proxy server listening on port 6277
🔍 MCP Inspector is up and running at http://127.0.0.1:6274 🚀
New SSE connection. NOTE: The sse transport is deprecated and has been replaced by streamable-http
Query parameters: [Object: null prototype] {
  url: 'http://localhost:8000/sse',
  transportType: 'sse'
}
SSE transport: url=http://localhost:8000/sse, headers=Accept
Connected to SSE transport
Connected MCP client to backing server transport
Created client transport
Created server transport
Set up MCP proxy

Enter fullscreen mode Exit fullscreen mode

打开此网址http://127.0.0.1:6274,您应该能够更准确地测试这些工具和工作流程。

与 CopilotKit AG-UI 集成

AG-UI 是一种开放协议,它支持 AI 代理和用户之间通过标准 HTTP 协议使用统一的事件流进行实时协作。在我们的项目中,AG-UI 将实现用户与我们基于 MCP 的 GitHub 分析代理之间的无缝协作。用户不仅可以触发自动化的代码库分析,还可以实时查看代理获取 GitHub 数据、创建 Notion 数据库和安排会议等操作的进度。

步骤 1:创建 AG-UI 应用程序

我们将使用 CopilotKit 的 AG-UI CLI 来引导我们的 GitHub 分析前端:

npx create-ag-ui-app my-github-analyzer
Enter fullscreen mode Exit fullscreen mode

这将启动与 AG-UI 的交互式设置过程:

图片10

配置提示

安装过程中,您会看到几个配置提示:

1. 选择客户端框架

当系统提示“您想使用哪个客户端?”时,请选择:

> CopilotKit/Next.js
Enter fullscreen mode Exit fullscreen mode

2. 选择人工智能集成方法

当被问及“您将如何与人工智能互动?”时,请选择:


> MCP
Enter fullscreen mode Exit fullscreen mode

这是因为我们的后端使用了模型上下文协议。

3. 部署选项

当系统提示“使用 Copilot Cloud 部署?”时,请选择:


> No
Enter fullscreen mode Exit fullscreen mode

我们将使用本地 API 密钥进行开发。

  1. API密钥配置

CLI 会提示您输入 OpenAI API 密钥:

你可以选择:

  • 立即输入您的 API 密钥,或
  • 留空,稍后进行配置。.env.local

图片12

然后它会提示你回答几个问题,然后就完成了,你就可以开始使用了:

图片13

步骤 2:启动 MCP 服务器后端

在另一个终端中,使用以下命令启动 MCP 服务器后端:


python mcp_server_wrapper.py
Enter fullscreen mode Exit fullscreen mode

您的MCP服务器现在应该正在运行http://localhost:8000/sse并准备好接受连接。

步骤 3:在 CopilotKit UI 中配置 MCP 服务器

使用以下命令启动前端服务器:

npm run dev
Enter fullscreen mode Exit fullscreen mode

这应该会在本地主机的 3000 端口启动:/

图片15

现在添加MCP服务器的URL -http://localhost:8000/sse

第四步:探索可用工具

添加 MCP 服务器后,您可以测试 MCP 服务器中是否有可用工具:

MCP 服务器已成功连接到 CopilotKit AG-UI,现在您可以测试完整的 GitHub 分析流程。尝试以下命令,查看工具的实际运行情况:

  • 检查工作流程状态 - 验证服务器运行状况和配置
  • 分析 Facebook/React - 运行完整的分析工作流程(2-5 分钟)
  • 获取 microsoft/vscode 的 GitHub 数据 - 仅获取存储库数据
  • 安排缺陷分析结果会议 - 创建日历事件

AG-UI 界面将显示 MCP 工具执行时的实时进度,并为每个阶段提供可视化指示器:GitHub 数据收集、Notion 数据库创建和会议安排。

结论

在本指南中,我们构建了一个完整的 GitHub 分析流程,该流程结合了 MCP 服务器、CrewAI 多代理工作流和 Composio 的工具集成。该系统可自动分析代码库、创建 Notion 数据库并安排缺陷审查会议,所有这些功能都可通过 CopilotKit AG-UI 的前端界面访问。

最棒的是,所有操作都遵循标准协议,因此您可以轻松地将此系统适配到不同的工具中,或根据您的特定需求进行扩展。克隆代码库,设置您的 API 密钥,即可开始实验。

希望本指南能帮助您更轻松地将人工智能代理集成到您现有的应用程序中。

在Twitter上关注 CopilotKit  并打个招呼,如果你想开发一些很酷的东西,请加入 Discord 社区。

文章来源:https://dev.to/copilotkit/end-to-end-github-workflow-agents-crewai-ui-copilotkit-automation-composio-36aa