Agent Graphs

作者 launchdarkly2fc544d3140fApache-2.026 个星标收录于 2026年10月8日更新于 2026年10月8日仓库昨天更新

Create and manage agent graphs — directed graphs of configs connected by edges with handoff logic. Use when building multi-agent workflows where configs route to each other.

仅含说明AI & Agents
AI 生成的概览

指导在 LaunchDarkly 中创建和管理代理图:由配置作为节点、通过路由边和交接逻辑连接的有向图。

功能
该技能引导设计代理图拓扑、确认所需的配置节点已存在,并使用根配置和边创建图。内容涵盖边的字段,如 key、sourceConfig、targetConfig 以及可选的 handoff 数据,并说明如何验证路由与结构。它还列出配置缺失、循环路由和单节点图等边界情况,并提示应避免的做法。
适用场景
适用于在 LaunchDarkly 中构建多个代理相互路由的工作流,例如分流到专家的路由、升级链或流水线处理。它用于设计、创建、检查和更新这类图。
运行要求
需要在环境中配置远程托管的 LaunchDarkly MCP 服务器,并提供 create-agent-graph、get-agent-graph、list-agent-graphs 等工具,以及可选的 update-agent-graph、delete-agent-graph、get-ai-config 和 create-ai-config。该技能不附带脚本,仅为说明性指令。

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 config nodes.

Prerequisites

This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.

Required MCP tools:

  • create-agent-graph -- create a new graph with nodes and edges
  • get-agent-graph -- inspect a graph's structure and edges
  • list-agent-graphs -- browse existing graphs in the project

Optional MCP tools:

  • update-agent-graph -- modify edges, root config, or description
  • delete-agent-graph -- permanently remove a graph
  • get-ai-config -- inspect individual configs that serve as nodes
  • create-ai-config -- create new configs to use as graph nodes

Core Concepts

What Are Agent Graphs?

An agent graph is a directed graph where:

  • Nodes are 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

When to Use Agent Graphs

ScenarioExample
Multi-step workflowsTriage agent -> Specialist agent -> Summary agent
Routing by intentRouter agent decides which specialist handles the request
Escalation chainsL1 support -> L2 support -> Human handoff
Pipeline processingExtract -> Transform -> Validate -> Store

Graph Structure

[Root Config] --edge--> [Config A] --edge--> [Config C]                  \--edge--> [Config B]

Each edge has:

  • key -- unique identifier for the edge
  • sourceConfig -- the config key that routes FROM
  • targetConfig -- the config key that routes TO
  • handoff (optional) -- data/instructions passed during the transition

Core Principles

  1. Design Before Building: Map out nodes and edges on paper/whiteboard first
  2. One Agent, One Job: Each node should have a clear, focused responsibility
  3. Root Config Is the Router: The entry point should understand how to dispatch
  4. Handoff Data Matters: Define what context flows between agents
  5. Verify the Full Path: Test that routing works end-to-end

Workflow

Step 1: Design the Graph

Before creating anything:

  1. Identify the agents (configs) needed — each is a graph node
  2. Map the routing: which agent hands off to which?
  3. Define handoff data: what context does each edge carry?
  4. Identify the root config: which agent receives initial input?
  5. Check existing graphs with list-agent-graphs to avoid duplicates
  6. Check existing configs with get-ai-config to see what nodes already exist

Step 2: Ensure Nodes Exist

Each node in the graph must be an existing config. If configs don't exist yet:

  1. Use create-ai-config to create each agent config
  2. Set up variations with appropriate models and prompts for each agent's role
  3. Verify each config exists with get-ai-config

Step 3: Create the Graph

Use create-agent-graph with:

  • projectKey -- the project containing the configs
  • key -- unique identifier for the graph
  • name -- human-readable display name
  • description (optional) -- explain the graph's purpose
  • rootConfigKey -- the entry-point config key
  • edges -- array of connections between configs
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

  1. Use get-agent-graph to confirm the graph was created with the correct structure
  2. Verify edges connect the right source and target configs
  3. Check that the root config key matches the intended entry point
  4. 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

Edge Cases

SituationAction
Config doesn't exist yetCreate it first with create-ai-config before referencing in a graph
Circular routingAllowed but warn user — ensure there's a termination condition in the agent logic
Single-node graphValid but unusual — consider if a graph is actually needed
Updating edgesUse update-agent-graph — provide the complete new edge list

What NOT to Do

  • Don't create a graph before the 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

Other Resources

To learn more, read Agent graphs.

来源与署名

来源:launchdarkly/ai-tooling位于skills/agentcontrol/agent-graphs提交2fc544d

许可证: Apache-2.0

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架