aiconfig-agent-graphs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI Config Agent Graphs
AI Config Agent Graphs
You're using a skill that will guide you through creating and managing agent graphs in LaunchDarkly. Your job is to design the graph topology, create it with the right edges and handoffs, and verify the routing between AI Config nodes.
你正在使用一项技能,它将引导你在LaunchDarkly中创建和管理Agent图。你的任务是设计图拓扑结构,使用正确的边和切换逻辑创建图,并验证AI Config节点之间的路由。
Prerequisites
前提条件
This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.
Required MCP tools:
- -- create a new graph with nodes and edges
create-agent-graph - -- inspect a graph's structure and edges
get-agent-graph - -- browse existing graphs in the project
list-agent-graphs
Optional MCP tools:
- -- modify edges, root config, or description
update-agent-graph - -- permanently remove a graph
delete-agent-graph - -- inspect individual AI Configs that serve as nodes
get-ai-config - -- create new AI Configs to use as graph nodes
create-ai-config
此技能要求在你的环境中配置远程托管的LaunchDarkly MCP服务器。
必需的MCP工具:
- —— 创建包含节点和边的新图
create-agent-graph - —— 检查图的结构和边
get-agent-graph - —— 浏览项目中现有的图
list-agent-graphs
可选的MCP工具:
- —— 修改边、根Config或描述
update-agent-graph - —— 永久删除图
delete-agent-graph - —— 检查作为节点的单个AI Config
get-ai-config - —— 创建用作图节点的新AI Config
create-ai-config
Core Concepts
核心概念
What Are Agent Graphs?
什么是Agent图?
An agent graph is a directed graph where:
- Nodes are AI Configs (each config is an agent with its own model, prompt, and tools)
- Edges define routing between configs (source -> target)
- Handoff data on edges controls how context is passed between agents
- Root config is the entry point — the first agent that receives user input
Agent图是一种有向图,其中:
- 节点是AI Config(每个Config都是一个拥有自己模型、提示词和工具的Agent)
- 边定义了Config之间的路由(源 -> 目标)
- 边上的切换数据控制Agent之间的上下文传递方式
- 根Config是入口点——第一个接收用户输入的Agent
When to Use Agent Graphs
何时使用Agent图
| Scenario | Example |
|---|---|
| Multi-step workflows | Triage agent -> Specialist agent -> Summary agent |
| Routing by intent | Router agent decides which specialist handles the request |
| Escalation chains | L1 support -> L2 support -> Human handoff |
| Pipeline processing | Extract -> Transform -> Validate -> Store |
| 场景 | 示例 |
|---|---|
| 多步骤工作流 | 分诊Agent -> 专家Agent -> 总结Agent |
| 按意图路由 | 路由Agent决定由哪位专家处理请求 |
| 升级链 | L1支持 -> L2支持 -> 人工交接 |
| 流水线处理 | 提取 -> 转换 -> 验证 -> 存储 |
Graph Structure
图结构
[Root Config] --edge--> [Config A] --edge--> [Config C]
\--edge--> [Config B]Each edge has:
- -- unique identifier for the edge
key - -- the AI Config key that routes FROM
sourceConfig - -- the AI Config key that routes TO
targetConfig - (optional) -- data/instructions passed during the transition
handoff
[Root Config] --edge--> [Config A] --edge--> [Config C]
\--edge--> [Config B]每条边包含:
- —— 边的唯一标识符
key - —— 路由发起方的AI Config键
sourceConfig - —— 路由接收方的AI Config键
targetConfig - (可选)—— 转换过程中传递的数据/指令
handoff
Core Principles
核心原则
- Design Before Building: Map out nodes and edges on paper/whiteboard first
- One Agent, One Job: Each node should have a clear, focused responsibility
- Root Config Is the Router: The entry point should understand how to dispatch
- Handoff Data Matters: Define what context flows between agents
- Verify the Full Path: Test that routing works end-to-end
- 先设计再构建:先在纸上/白板上规划节点和边
- 一个Agent,一个任务:每个节点应承担明确、专注的职责
- 根Config是路由器:入口点应了解如何调度请求
- 切换数据很重要:定义Agent之间传递的上下文内容
- 验证完整路径:测试端到端路由是否正常工作
Workflow
工作流
Step 1: Design the Graph
步骤1:设计图
Before creating anything:
- Identify the agents (AI Configs) needed — each is a graph node
- Map the routing: which agent hands off to which?
- Define handoff data: what context does each edge carry?
- Identify the root config: which agent receives initial input?
- Check existing graphs with to avoid duplicates
list-agent-graphs - Check existing AI Configs with to see what nodes already exist
get-ai-config
在创建任何内容之前:
- 确定所需的Agent(AI Config)——每个都是图的节点
- 规划路由:哪个Agent切换到哪个Agent?
- 定义切换数据:每条边携带什么上下文?
- 确定根Config:哪个Agent接收初始输入?
- 使用检查现有图,避免重复
list-agent-graphs - 使用检查现有AI Config,了解已存在的节点
get-ai-config
Step 2: Ensure Nodes Exist
步骤2:确保节点存在
Each node in the graph must be an existing AI Config. If configs don't exist yet:
- Use to create each agent config
create-ai-config - Set up variations with appropriate models and prompts for each agent's role
- Verify each config exists with
get-ai-config
图中的每个节点必须是已存在的AI Config。如果Config尚未存在:
- 使用创建每个Agent的Config
create-ai-config - 为每个Agent的角色设置合适的模型和提示词变体
- 使用验证每个Config是否存在
get-ai-config
Step 3: Create the Graph
步骤3:创建图
Use with:
create-agent-graph- -- the project containing the AI Configs
projectKey - -- unique identifier for the graph
key - -- human-readable display name
name - (optional) -- explain the graph's purpose
description - -- the entry-point AI Config key
rootConfigKey - -- array of connections between configs
edges
json
{
"projectKey": "my-project",
"key": "support-triage-graph",
"name": "Customer Support Triage",
"description": "Routes customer queries to the appropriate specialist agent",
"rootConfigKey": "triage-agent",
"edges": [
{
"key": "triage-to-billing",
"sourceConfig": "triage-agent",
"targetConfig": "billing-specialist",
"handoff": {"category": "billing", "priority": "normal"}
},
{
"key": "triage-to-technical",
"sourceConfig": "triage-agent",
"targetConfig": "technical-specialist",
"handoff": {"category": "technical", "priority": "normal"}
}
]
}使用工具,需提供:
create-agent-graph- —— 包含AI Config的项目
projectKey - —— 图的唯一标识符
key - —— 人类可读的显示名称
name - (可选)—— 说明图的用途
description - —— 作为入口点的AI Config键
rootConfigKey - —— Config之间的连接数组
edges
json
{
"projectKey": "my-project",
"key": "support-triage-graph",
"name": "Customer Support Triage",
"description": "Routes customer queries to the appropriate specialist agent",
"rootConfigKey": "triage-agent",
"edges": [
{
"key": "triage-to-billing",
"sourceConfig": "triage-agent",
"targetConfig": "billing-specialist",
"handoff": {"category": "billing", "priority": "normal"}
},
{
"key": "triage-to-technical",
"sourceConfig": "triage-agent",
"targetConfig": "technical-specialist",
"handoff": {"category": "technical", "priority": "normal"}
}
]
}Step 4: Verify
步骤4:验证
- Use to confirm the graph was created with the correct structure
get-agent-graph - Verify edges connect the right source and target configs
- Check that the root config key matches the intended entry point
- Confirm handoff data is present on edges that need it
Report results:
- Graph created with N nodes and M edges
- Root config set correctly
- All edges verified
- 使用确认图已按正确结构创建
get-agent-graph - 验证边连接了正确的源和目标Config
- 检查根Config键是否与预期的入口点匹配
- 确认需要切换数据的边上已包含该数据
报告结果:
- 已创建包含N个节点和M条边的图
- 根Config设置正确
- 所有边已验证
Edge Cases
边缘情况
| Situation | Action |
|---|---|
| Config doesn't exist yet | Create it first with |
| Circular routing | Allowed but warn user — ensure there's a termination condition in the agent logic |
| Single-node graph | Valid but unusual — consider if a graph is actually needed |
| Updating edges | Use |
| 情况 | 操作 |
|---|---|
| Config尚未存在 | 在图中引用之前,先使用 |
| 循环路由 | 允许但需警告用户——确保Agent逻辑中有终止条件 |
| 单节点图 | 有效但不常见——考虑是否真的需要使用图 |
| 更新边 | 使用 |
What NOT to Do
注意事项
- Don't create a graph before the AI Config nodes exist
- Don't forget handoff data when agents need context from predecessors
- Don't create overly complex graphs — start simple and add nodes as needed
- Don't delete a graph without understanding if it's actively used in agent workflows
- 不要在AI Config节点存在之前创建图
- 当Agent需要从上游获取上下文时,不要忘记设置切换数据
- 不要创建过于复杂的图——从简单开始,根据需要添加节点
- 在删除图之前,要了解它是否正被Agent工作流使用