企业协作 Agent 设计:会议纪要、任务分配和进度跟进的自动化
企业协作 Agent 设计会议纪要、任务分配和进度跟进的自动化一、每周开 5 个会4 个都在确认上次说的那件事做了没企业协作最耗时的不是干活而是同步信息。一个 10 人团队每周花费在任务进度对齐会议纪要整理跨部门信息同步上的时间保守估计在 20-30 人时。更讽刺的是这些活动本身不产生任何直接产出。企业协作 Agent 的目标不是取代人的决策而是接管信息搬运这类重复劳动。设计企业协作 Agent 面临三个核心挑战信息源分散IM 聊天记录、邮件、项目管理工具各有一套数据、上下文理解难那个需求指的是哪个需求需要回溯对话历史、以及自动化边界模糊Agent 能自动分配任务吗还是只能提醒。这些决定了架构必须在智能和可控之间找到平衡。二、协作 Agent 的多源信息融合架构核心设计是感知-理解-行动三层结构这个架构的关键是意图理解层——不能简单地把聊天记录扔给 LLM要先用规则和 NER 模型做结构化抽取再用 LLM 做语义理解和推理。分两步走可以大幅降低幻觉率。三、Go 实现协作 Agent 核心编排package collab import ( context fmt strings regexp time ) // MessageSource 消息来源 type MessageSource string const ( SourceIM MessageSource im SourceEmail MessageSource email SourceProject MessageSource project SourceCalendar MessageSource calendar ) // RawEvent 原始事件来自各信息源 type RawEvent struct { Source MessageSource json:source Content string json:content Sender string json:sender Channel string json:channel // 群聊ID/项目ID Timestamp time.Time json:timestamp EventID string json:event_id } // IntentType 意图类型 type IntentType string const ( IntentMeeting IntentType meeting // 会议相关 IntentTask IntentType task // 任务相关 IntentDecision IntentType decision // 决策相关 IntentQuestion IntentType question // 提问相关 IntentOther IntentType other // 其他 ) // ParsedIntent 解析后的意图 type ParsedIntent struct { Type IntentType json:type Confidence float64 json:confidence // 0-1 Entities IntentEntities json:entities } // IntentEntities 意图实体 type IntentEntities struct { Participants []string json:participants,omitempty Deadline *time.Time json:deadline,omitempty Subject string json:subject,omitempty ActionItems []string json:action_items,omitempty } // Action 可执行动作 type Action struct { Type string json:type // create_meeting_note, create_task, send_reminder Description string json:description Parameters map[string]interface{} json:parameters AutoExecute bool json:auto_execute // 是否自动执行 Confidence float64 json:confidence } // CollaborationAgent 企业协作 Agent type CollaborationAgent struct { intentParser IntentParser actionPlanner ActionPlanner } // IntentParser 意图解析器接口 type IntentParser interface { Parse(ctx context.Context, event *RawEvent) (*ParsedIntent, error) } // ActionPlanner 动作规划器接口 type ActionPlanner interface { Plan(ctx context.Context, intent *ParsedIntent, event *RawEvent) ([]*Action, error) } // NewCollaborationAgent 创建协作 Agent func NewCollaborationAgent(parser IntentParser, planner ActionPlanner) *CollaborationAgent { return CollaborationAgent{ intentParser: parser, actionPlanner: planner, } } // Process 处理原始事件的主流程 func (ca *CollaborationAgent) Process( ctx context.Context, event *RawEvent, ) ([]*Action, error) { // 1. 去重检查是否已处理过相同事件 if ca.isDuplicate(event) { return nil, fmt.Errorf(事件重复: %s, event.EventID) } // 2. 意图解析 intent, err : ca.intentParser.Parse(ctx, event) if err ! nil { return nil, fmt.Errorf(意图解析失败: %w, err) } if intent.Type IntentOther || intent.Confidence 0.6 { // 低置信度的意图不自动处理 return nil, nil } // 3. 动作规划 actions, err : ca.actionPlanner.Plan(ctx, intent, event) if err ! nil { return nil, fmt.Errorf(动作规划失败: %w, err) } // 4. 置信度过滤 var executable []*Action for _, action : range actions { if action.AutoExecute action.Confidence 0.8 { executable append(executable, action) } else if action.Confidence 0.6 { // 低置信度动作标记为待确认 action.AutoExecute false executable append(executable, action) } } return executable, nil } func (ca *CollaborationAgent) isDuplicate(event *RawEvent) bool { // 实际项目通过 Redis 的去重 key 实现 return false } // RuleBasedIntentParser 基于规则的意图解析器替代 LLM 的基础场景 type RuleBasedIntentParser struct { meetingKeywords []*regexp.Regexp taskKeywords []*regexp.Regexp decisionKeywords []*regexp.Regexp deadlinePattern *regexp.Regexp mentionPattern *regexp.Regexp } // NewRuleBasedParser 创建规则解析器 func NewRuleBasedParser() *RuleBasedIntentParser { return RuleBasedIntentParser{ meetingKeywords: []*regexp.Regexp{ regexp.MustCompile((开会|会议|讨论|周会|站会|评审|同步)), regexp.MustCompile((明天|下周|今天|下午)\s*(几点|什么时间|有空)), }, taskKeywords: []*regexp.Regexp{ regexp.MustCompile((做一下|处理|负责|跟进|修复|实现)), regexp.MustCompile((DDL|截止|deadline|这周|本周内)), }, decisionKeywords: []*regexp.Regexp{ regexp.MustCompile((决定了|确定了|定了|最终方案|结论是)), }, deadlinePattern: regexp.MustCompile( (\d{4}[-/]\d{1,2}[-/]\d{1,2})|(周[一二三四五六日])|(明天|后天|下周), ), mentionPattern: regexp.MustCompile((\w)), } } // Parse 解析意图 func (p *RuleBasedIntentParser) Parse( ctx context.Context, event *RawEvent, ) (*ParsedIntent, error) { text : event.Content intent : ParsedIntent{ Type: IntentOther, Confidence: 0.3, } // 会议意图匹配 for _, pattern : range p.meetingKeywords { if pattern.MatchString(text) { intent.Type IntentMeeting intent.Confidence 0.75 break } } // 任务意图匹配 for _, pattern : range p.taskKeywords { if pattern.MatchString(text) { intent.Type IntentTask intent.Confidence 0.7 break } } // 决策意图匹配 for _, pattern : range p.decisionKeywords { if pattern.MatchString(text) { intent.Type IntentDecision intent.Confidence 0.8 break } } // 提取实体 mentions : p.mentionPattern.FindAllStringSubmatch(text, -1) for _, m : range mentions { if len(m) 1 { intent.Entities.Participants append( intent.Entities.Participants, m[1], ) } } // 提取截止时间 deadlineMatch : p.deadlinePattern.FindString(text) if deadlineMatch ! { deadline : time.Now().Add(24 * time.Hour) // 简化默认明天 intent.Entities.Deadline deadline } // 提取主题第一句话 sentences : strings.Split(text, 。) if len(sentences) 0 { intent.Entities.Subject strings.TrimSpace(sentences[0]) } return intent, nil } // Plan 根据意图生成动作 func (p *RuleBasedIntentParser) Plan( ctx context.Context, intent *ParsedIntent, event *RawEvent, ) ([]*Action, error) { var actions []*Action switch intent.Type { case IntentMeeting: actions append(actions, Action{ Type: create_meeting_note, Description: fmt.Sprintf(创建会议纪要: %s, intent.Entities.Subject), Parameters: map[string]interface{}{ subject: intent.Entities.Subject, participants: intent.Entities.Participants, source: event.Channel, timestamp: event.Timestamp, }, AutoExecute: true, Confidence: 0.85, }) case IntentTask: if intent.Entities.Deadline ! nil { actions append(actions, Action{ Type: create_task, Description: fmt.Sprintf(创建任务: %s, intent.Entities.Subject), Parameters: map[string]interface{}{ title: intent.Entities.Subject, assignee: intent.Entities.Participants, deadline: intent.Entities.Deadline, source: event.Content, }, AutoExecute: false, // 任务创建需要人工确认 Confidence: 0.7, }) } } return actions, nil }四、边界分析与 Trade-offs自动化程度的控制有些动作可以全自动如生成会议纪要和待办列表有些必须人工确认如直接分配任务给某人。这个自动化程度的判断比技术实现本身更难。一个实用判断标准如果出错会导致团队内部误解 ≥ 30 分钟就需要人工确认。信息过载 vs 信息遗漏Agent 如果对每条消息都触发动作团队会被提醒淹死。需要引入上下文重要性打分——只对包含 提及、关键词命中、或由管理者发送的消息做处理。普通闲聊不计入。跨平台数据一致性一条任务在飞书群里口头分配了但没同步到 Jira——这是企业协作最常见的信息断裂。Agent 的价值就是做这个数据的自动搬运。但需要处理冲突Jira 里已经有一个类似任务时是合并还是去重建议默认去重相似度 80% 时提醒用户不作为新任务创建。隐私边界敏感度企业聊天记录里可能包含薪资、人事变动等敏感信息。Agent 的消息采集必须做频道白名单只监听公开项目群和指定讨论组不监听一对一私聊和 HR 群。五、总结企业协作 Agent 的核心价值是信息搬运自动化——把聊天记录里的决议变成会议纪要把口头分配的任务变成 Jira Ticket把零散的消息变成结构化的周报。技术实现上意图识别要多路协同规则 NER LLM按置信度分级自动化处理。工程上最容易被忽略的是去重和冲突处理——信息源有天然冗余Agent 需要能识别同一条任务在三个群里被讨论而不是创建三个重复 Ticket。