作者:iFwu
Multi-Agent 是指多个 LLM Agent 协作完成任务的系统架构,已是业界成熟概念。Sub-Agent 是其中最常见的模式:一个 Agent 启动并指导另一个 Agent 执行子任务。
现有讨论主要集中在运行时的协作模式(编排、路由、并行执行等),但很少涉及 AI 编写指令时的问题:当一个 Agent 需要为另一个 Agent 编写指令时,如何避免角色混淆和视角串位。
元指令:指导 Agent 如何编写给另一个 Agent 执行的指令。
| { | |
| "profiles": [ | |
| { | |
| "name": "custom", | |
| "selected": true, | |
| "virtual_hid_keyboard": { | |
| "caps_lock_delay_milliseconds": 300, | |
| "keyboard_type": "ansi" | |
| }, | |
| "complex_modifications": { |
I hereby claim:
To claim this, I am signing this object:
| import {Number} from "ts-toolbelt" | |
| type Even_<a extends string> = { | |
| 0: true, | |
| 1: false, | |
| 2: Even_<Number.Minus<a, "2">> | |
| }[a extends "0" ? 0 : a extends "1" ? 1 : 2] | |
| type Even<a extends number> = a extends unknown ? Even_<Number.NumberOf<a>> : never | |
| type AssertEven<a extends any[]> = Even<a["length"]> extends true ? a : unknown |
| const transTo = (target) => ({ | |
| target, | |
| actions: sendParent({ type: 'TODO_STATUS_UPDATE', value: target }), | |
| }); | |
| const todoStatusMachine = Machine({ | |
| id: 'TodoStatus', | |
| states: { | |
| Active: { | |
| on: { |
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| Todo& | |
| State | |
| Active* | |
| Completed | |
| Todos& | |
| Filter State | |
| all -> Filter All | |
| active -> Filter Active | |
| completed -> Filter Completed | |
| Filter All* | |
| Filter Active | |
| Filter Completed |
| const { promisifyAll, promisify } = require('bluebird'); | |
| const request = promisify(require('request')); | |
| promisifyAll(request, { multiArgs: true }); | |
| const cheerio = require('cheerio'); | |
| module.exports.handler = async function(req, resp, context) { | |
| const articleTitle = req.queries.articleTitle; | |
| console.log(articleTitle); | |
| const commentId = req.queries.commentId; | |
| const commentAnchor = commentId ? `#comment-${commentId}` : ''; |