For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
      • POSTAdd AI models to the restricted list
      • POSTCreate a prompt snippet
      • POSTCreate agent optimization
      • POSTCreate agent optimization result
      • POSTCreate AI Config variation
      • POSTCreate an AI model config
      • POSTCreate an AI tool
      • POSTCreate new agent graph
      • POSTCreate new AI Config
      • DELDelete a prompt snippet
      • DELDelete agent graph
      • DELDelete AI Config
      • DELDelete AI Config variation
      • DELDelete AI tool
      • DELDelete an agent optimization
      • DELDelete an AI model config
      • GETGet a prompt snippet
      • GETGet agent graph
      • GETGet AI Config
      • GETGet AI Config metrics
      • GETGet AI Config metrics by variation
      • GETGet AI Config quick stats
      • GETGet AI Config variation
      • GETGet AI model config
      • GETGet AI tool
      • GETGet an agent optimization
      • GETList agent graphs
      • GETList agent optimization results for a run
      • GETList agent optimization runs
      • GETList agent optimization runs
      • GETList agent optimizations
      • GETList AI Configs
      • GETList AI model configs
      • GETList AI tool references
      • GETList AI tool versions
      • GETList AI tools
      • GETList all agent optimization results across versions
      • GETList prompt snippet references
      • GETList prompt snippet versions
      • GETList prompt snippets
      • DELRemove AI models from the restricted list
      • GETShow an AI Config's targeting
      • PATCHUpdate a prompt snippet
      • PATCHUpdate agent graph
      • PATCHUpdate AI Config
      • PATCHUpdate AI Config targeting
      • PATCHUpdate AI Config variation
      • PATCHUpdate AI tool
      • PATCHUpdate an agent optimization
      • PATCHUpdate an agent optimization result
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewAI Configs

Create new agent graph

POST
/api/v2/projects/:projectKey/agent-graphs
POST
/api/v2/projects/:projectKey/agent-graphs
$curl -X POST https://app.launchdarkly.com/api/v2/projects/projectKey/agent-graphs \
> -H "LD-API-Version: beta" \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "key": "key",
> "name": "name",
> "description": "description",
> "maintainerId": "507f1f77bcf86cd799439011",
> "maintainerTeamKey": "example-team-key",
> "rootConfigKey": "rootConfigKey",
> "edges": [
> {
> "key": "key",
> "sourceConfig": "sourceConfig",
> "targetConfig": "targetConfig",
> "handoff": "{}"
> },
> {
> "key": "key",
> "sourceConfig": "sourceConfig",
> "targetConfig": "targetConfig",
> "handoff": "{}"
> }
> ]
>}'
1{
2 "key": "key",
3 "name": "name",
4 "createdAt": 0,
5 "updatedAt": 6,
6 "_access": {
7 "denied": [
8 {
9 "action": "action",
10 "reason": {
11 "effect": "allow",
12 "resources": [
13 "proj/*:env/*;qa_*:/flag/*"
14 ],
15 "notResources": [
16 "notResources",
17 "notResources"
18 ],
19 "actions": [
20 "*"
21 ],
22 "notActions": [
23 "string",
24 "string"
25 ],
26 "role_name": "role_name"
27 }
28 },
29 {
30 "action": "action",
31 "reason": {
32 "effect": "allow",
33 "resources": [
34 "proj/*:env/*;qa_*:/flag/*"
35 ],
36 "notResources": [
37 "notResources",
38 "notResources"
39 ],
40 "actions": [
41 "*"
42 ],
43 "notActions": [
44 "string",
45 "string"
46 ],
47 "role_name": "role_name"
48 }
49 }
50 ],
51 "allowed": [
52 {
53 "action": "action",
54 "reason": {
55 "effect": "allow",
56 "resources": [
57 "proj/*:env/*;qa_*:/flag/*"
58 ],
59 "notResources": [
60 "notResources",
61 "notResources"
62 ],
63 "actions": [
64 "*"
65 ],
66 "notActions": [
67 "string",
68 "string"
69 ],
70 "role_name": "role_name"
71 }
72 },
73 {
74 "action": "action",
75 "reason": {
76 "effect": "allow",
77 "resources": [
78 "proj/*:env/*;qa_*:/flag/*"
79 ],
80 "notResources": [
81 "notResources",
82 "notResources"
83 ],
84 "actions": [
85 "*"
86 ],
87 "notActions": [
88 "string",
89 "string"
90 ],
91 "role_name": "role_name"
92 }
93 }
94 ]
95 },
96 "description": "description",
97 "_maintainer": {
98 "_id": "string",
99 "email": "string",
100 "role": "string",
101 "kind": "kind"
102 },
103 "rootConfigKey": "rootConfigKey",
104 "edges": [
105 {
106 "key": "key",
107 "sourceConfig": "sourceConfig",
108 "targetConfig": "targetConfig",
109 "handoff": "{}"
110 },
111 {
112 "key": "key",
113 "sourceConfig": "sourceConfig",
114 "targetConfig": "targetConfig",
115 "handoff": "{}"
116 }
117 ]
118}
Create a new agent graph within the given project.
Was this page helpful?
Previous

Create new AI Config

Next
Built with

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequired

Headers

LD-API-VersionenumRequired
Version of the endpoint.
Allowed values:

Request

Agent graph object to create
keystringRequired
A unique key for the agent graph
namestringRequired

A human-readable name for the agent graph

descriptionstringOptional
A description of the agent graph
maintainerIdstringOptional
The ID of the member who maintains this agent graph
maintainerTeamKeystringOptional
The key of the team that maintains this agent graph
rootConfigKeystringOptional
The AI Config key of the root node. A missing root implies a newly created graph with metadata only.
edgeslist of objectsOptional
The edges in the graph. If edges or rootConfigKey is present, both must be present.

Response

Agent graph created
keystring
A unique key for the agent graph
namestring

A human-readable name for the agent graph

createdAtlong
updatedAtlong
_accessobject
descriptionstring
A description of the agent graph
_maintainerobject
rootConfigKeystring
The AI Config key of the root node
edgeslist of objects
The edges in the graph

Errors

400
Bad Request Error
403
Forbidden Error
413
Content Too Large Error
500
Internal Server Error