MinAI - Về trang chủ
Dự án
12/1360 phút
Đang tải...

Capstone Project - AI Operations Agent

Xây dựng AI Operations Agent hoàn chỉnh với tools, memory, và voice interface

🏆 Capstone Project - AI Operations Agent

0

🎯 Mục tiêu bài học

TB5 min

Sau bài học này, bạn sẽ:

✅ Xây dựng AI Operations Agent hoàn chỉnh

✅ Tích hợp 5+ working tools (DB, KB, Task, Notify, Voice)

✅ Implement Telegram Bot interface (text + voice)

✅ Setup Memory (Buffer + Entity) cho Agent

✅ Thêm Error Handling và Analytics tracking

✅ Hoàn thành capstone project với documentation

Tổng hợp toàn bộ kiến thức: build một AI Operations Agent có khả năng quản lý tasks, truy vấn data, và tương tác qua voice.

1

🔍 Project Overview

TB5 min
Diagram
Đang vẽ diagram...
Project Requirements

Core Agent

  • AI Agent with GPT-4o, reasoning capabilities
  • Memory: Buffer (10 msgs) + Entity memory
  • Planning: Break complex tasks into steps
  • Error handling and retry logic

Tools (minimum 5)

  1. Database query tool (read-only SQL)
  2. Knowledge base search (RAG)
  3. Task creation (Trello/Notion)
  4. Notification (Slack + Email)
  5. Voice I/O (STT + TTS)

Interfaces

  • Telegram bot (text + voice)
  • Slack bot (text only)
  • Webhook API for integrations

Admin Dashboard

  • Query logs in Google Sheets
  • Usage metrics tracking
  • Feedback collection

Checkpoint

Project cần đáp ứng những requirements nào? Hãy liệt kê 5 tools bắt buộc.

2

🏗️ Architecture

TB5 min
Diagram
Đang vẽ diagram...

Checkpoint

Hãy mô tả architecture của AI Operations Agent. Data flow từ input đến output như thế nào?

3

🤖 Workflow 1: Agent Core

TB5 min
JavaScript
1// Agent System Prompt
2const systemPrompt = `
3You are an AI Operations Agent. You help the team manage operations efficiently.
4
5Your capabilities:
61. **Query Data**: Search database for metrics, reports, customer info
72. **Knowledge Base**: Search internal docs for policies, procedures
83. **Task Management**: Create, update tasks in project management tool
94. **Notifications**: Send alerts via Slack or email
105. **Voice**: Understand voice commands, respond with voice
11
12Rules:
13- Be concise and action-oriented
14- Always confirm before creating tasks or sending notifications
15- Cite sources when answering from knowledge base
16- Track what you do for audit purposes
17- Communicate in Vietnamese unless asked otherwise
18`;

Checkpoint

System prompt cho Operations Agent cần chứa những gì? Rules nào quan trọng nhất?

4

📱 Workflow 2: Telegram Bot Interface

TB5 min
Diagram
Đang vẽ diagram...

Checkpoint

Telegram Bot cần xử lý những loại input nào? Các commands cơ bản cần implement là gì?

5

🛠️ Workflow 3: Tool Implementations

TB5 min
JavaScript
1// Tool 1: Database Query
2const dbTool = {
3 name: "query_database",
4 description: "Query business database. Can get sales, customers, orders data.",
5 execute: async (query) => {
6 const sql = await textToSQL(query);
7 return await executeSQL(sql);
8 }
9};
10
11// Tool 2: Knowledge Base
12const kbTool = {
13 name: "search_knowledge_base",
14 description: "Search company docs, policies, procedures, FAQs.",
15 execute: async (query) => {
16 return await vectorStoreSearch(query, topK=5);
17 }
18};
19
20// Tool 3: Task Management
21const taskTool = {
22 name: "manage_tasks",
23 description: "Create, list, or update tasks. Actions: create, list, update.",
24 execute: async (action, params) => {
25 return await trelloAPI(action, params);
26 }
27};
28
29// Tool 4: Notifications
30const notifyTool = {
31 name: "send_notification",
32 description: "Send Slack message or email notification.",
33 execute: async (channel, message) => {
34 return await sendNotification(channel, message);
35 }
36};

Checkpoint

Mỗi tool cần implement những gì? Tool descriptions có đủ chi tiết cho Agent sử dụng không?

6

📊 Workflow 4: Analytics Dashboard

TB5 min
JavaScript
1// Log every interaction
2const logEntry = {
3 timestamp: new Date().toISOString(),
4 userId: $json.userId,
5 platform: $json.platform, // telegram, slack, webhook
6 inputType: $json.inputType, // text, voice
7 query: $json.query,
8 intent: $json.detectedIntent,
9 toolsUsed: $json.toolsUsed,
10 responseTime: $json.processingMs,
11 answerLength: $json.response.length,
12 confidence: $json.confidence,
13 feedback: "pending"
14};
15
16// Save to Google Sheets: "Agent Analytics"

Checkpoint

Analytics Dashboard track những metrics nào? Tại sao cần log mọi interaction?

7

🧪 Testing Scenarios

TB5 min
ScenarioInputExpected
Data query"Doanh thu tháng này bao nhiêu?"SQL query, formatted result
Knowledge"Chính sách nghỉ phép thế nào?"Answer from KB with citation
Task"Tạo task review code cho Mai, due Friday"Trello card created, confirmed
Notify"Gửi Slack cho team về meeting 3pm"Slack message sent
Voice[Voice: "Tóm tắt email hôm nay"]Voice response with summary
Multi-step"Check sales, create report, send to team"3 tools used sequentially

Checkpoint

Bạn đã test được bao nhiêu scenarios? Agent có xử lý đúng multi-step tasks không?

8

📋 Evaluation & Submission

TB5 min
Grading Rubric
CriteriaPoints
Agent core with reasoning20
5+ working tools25
Telegram bot (text + voice)20
Memory (buffer + entity)10
Error handling10
Analytics tracking10
Documentation5
Total100
Nộp bài
  1. Export tất cả workflows (JSON)
  2. Screenshots: conversations, tool usage, analytics
  3. README: setup guide, architecture diagram
  4. Test report: 10 scenarios tested
  5. (Optional) Demo video 5 min

Checkpoint

Bạn đã hoàn thành được bao nhiêu điểm theo rubric? Những phần nào cần cải thiện?

🎉 Chúc mừng!

Bạn đã hoàn thành khóa học n8n Advanced Agents! Bạn đã nắm vững cách xây dựng AI Agents nâng cao với tools, memory, planning, voice interface, và đã hoàn thành capstone project AI Operations Agent.

🚀 Bài tiếp theo

Quay lại: n8n Automation Pathway →