Skip to main content
POST
/
api
/
v2
/
projects
/
{projectKey}
/
agent-graphs
Create new agent graph
curl --request POST \
  --url https://app.launchdarkly.com/api/v2/projects/{projectKey}/agent-graphs \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'LD-API-Version: <ld-api-version>' \
  --data '
{
  "maintainerId": "507f1f77bcf86cd799439011",
  "rootConfigKey": "rootConfigKey",
  "name": "name",
  "maintainerTeamKey": "example-team-key",
  "edges": [
    {
      "sourceConfig": "sourceConfig",
      "targetConfig": "targetConfig",
      "handoff": "{}",
      "key": "key"
    },
    {
      "sourceConfig": "sourceConfig",
      "targetConfig": "targetConfig",
      "handoff": "{}",
      "key": "key"
    }
  ],
  "description": "description",
  "key": "key"
}
'
{
  "createdAt": 0,
  "_maintainer": {
    "kind": "kind"
  },
  "_access": {
    "allowed": [
      {
        "reason": {
          "role_name": "role_name",
          "notActions": [
            null,
            null
          ],
          "notResources": [
            "notResources",
            "notResources"
          ],
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "actions": [
            "*"
          ]
        },
        "action": "action"
      },
      {
        "reason": {
          "role_name": "role_name",
          "notActions": [
            null,
            null
          ],
          "notResources": [
            "notResources",
            "notResources"
          ],
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "actions": [
            "*"
          ]
        },
        "action": "action"
      }
    ],
    "denied": [
      {
        "reason": {
          "role_name": "role_name",
          "notActions": [
            null,
            null
          ],
          "notResources": [
            "notResources",
            "notResources"
          ],
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "actions": [
            "*"
          ]
        },
        "action": "action"
      },
      {
        "reason": {
          "role_name": "role_name",
          "notActions": [
            null,
            null
          ],
          "notResources": [
            "notResources",
            "notResources"
          ],
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "actions": [
            "*"
          ]
        },
        "action": "action"
      }
    ]
  },
  "rootConfigKey": "rootConfigKey",
  "name": "name",
  "edges": [
    {
      "sourceConfig": "sourceConfig",
      "targetConfig": "targetConfig",
      "handoff": "{}",
      "key": "key"
    },
    {
      "sourceConfig": "sourceConfig",
      "targetConfig": "targetConfig",
      "handoff": "{}",
      "key": "key"
    }
  ],
  "description": "description",
  "key": "key",
  "updatedAt": 6
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Headers

LD-API-Version
enum<string>
required

Version of the endpoint.

Available options:
beta

Path Parameters

projectKey
string
required

Body

application/json

Agent graph object to create

Request body for creating an agent graph

key
string
required

A unique key for the agent graph

name
string
required

A human-readable name for the agent graph

description
string

A description of the agent graph

maintainerId
string

The ID of the member who maintains this agent graph

Example:

"507f1f77bcf86cd799439011"

maintainerTeamKey
string

The key of the team that maintains this agent graph

Example:

"example-team-key"

rootConfigKey
string

The AI Config key of the root node. A missing root implies a newly created graph with metadata only.

edges
object[]

The edges in the graph. If edges or rootConfigKey is present, both must be present.

Response

Agent graph created

An agent graph representing a directed graph of AI Configs

key
string
required

A unique key for the agent graph

name
string
required

A human-readable name for the agent graph

createdAt
integer<int64>
required
updatedAt
integer<int64>
required
_access
object
Example:
{
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
}
]
}
description
string

A description of the agent graph

_maintainer
object
Example:
{ "kind": "kind" }
rootConfigKey
string

The AI Config key of the root node

edges
object[]

The edges in the graph