aiconfig-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.
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 edgesget-agent-graph-- inspect a graph's structure and edgeslist-agent-graphs-- browse existing graphs in the project
Optional MCP tools:
update-agent-graph-- modify edges, root config, or descriptiondelete-agent-graph-- permanently remove a graphget-ai-config-- inspect individual AI Configs that serve as nodescreate-ai-config-- create new AI Configs to use as graph nodes
Core Concepts
What Are Agent Graphs?
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
When to Use Agent Graphs
| 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 |
Graph Structure
[Root Config] --edge--> [Config A] --edge--> [Config C]
\--edge--> [Config B]
Each edge has:
key-- unique identifier for the edgesourceConfig-- the AI Config key that routes FROMtargetConfig-- the AI Config key that routes TOhandoff(optional) -- data/instructions passed during the transition
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
Workflow
Step 1: Design the Graph
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
list-agent-graphsto avoid duplicates - Check existing AI Configs with
get-ai-configto see what nodes already exist
Step 2: Ensure Nodes Exist
Each node in the graph must be an existing AI Config. If configs don't exist yet:
- Use
create-ai-configto create each agent config - Set up variations with appropriate models and prompts for each agent's role
- Verify each config exists with
get-ai-config
Step 3: Create the Graph
Use create-agent-graph with:
projectKey-- the project containing the AI Configskey-- unique identifier for the graphname-- human-readable display namedescription(optional) -- explain the graph's purposerootConfigKey-- the entry-point AI Config keyedges-- array of connections between configs
{
"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
- Use
get-agent-graphto confirm the graph was created with the correct structure - 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
Edge Cases
| Situation | Action |
|---|---|
| Config doesn't exist yet | Create it first with create-ai-config before referencing in a graph |
| 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 update-agent-graph — provide the complete new edge list |
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
More from launchdarkly/agent-skills
onboarding
Onboard a project to LaunchDarkly: kickoff roadmap, resumable log, explore repo, MCP, companion flag skills, nested SDK install (detect/plan/apply), first flag. Use when adding LaunchDarkly, setting up or integrating feature flags in a project, SDK integration, or 'onboard me'.
607launchdarkly-flag-discovery
Audit your LaunchDarkly feature flags to understand the landscape, find stale or launched flags, and assess removal readiness. Use when the user asks about flag debt, stale flags, cleanup candidates, flag health, or wants to understand their flag inventory.
606launchdarkly-flag-cleanup
Safely remove a feature flag from code while preserving production behavior. Use when the user wants to remove a flag from code, delete flag references, or create a PR that hardcodes the winning variation after a rollout is complete.
606launchdarkly-flag-create
Create and configure LaunchDarkly feature flags in a way that fits the existing codebase. Use when the user wants to create a new flag, wrap code in a flag, add a feature toggle, or set up an experiment. Guides exploration of existing patterns before creating.
588launchdarkly-flag-targeting
Control LaunchDarkly feature flag targeting including toggling flags on/off, percentage rollouts, targeting rules, individual targets, and copying flag configurations between environments. Use when the user wants to change who sees a flag, roll out to a percentage, add targeting rules, or promote config between environments.
586aiconfig-tools
Give your AI agents capabilities through tools (function calling). Helps you identify what your AI needs to do, create tool definitions, and attach them to AI Config variations.
538