v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
AI Configs

Update agent graph

Edit an existing agent graph.

The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.

If the update includes rootConfigKey or edges, both must be present and will be treated as full replacements.

patch/api/v2/projects/{projectKey}/agent-graphs/{graphKey}

Path parameters

projectKeystring required
graphKeystring required

Headers

LD-API-Version'beta' required

Version of the endpoint.

Request body

namestring

A human-readable name for the agent graph

descriptionstring

A description of the agent graph

maintainerIdstring

The ID of the member who maintains this agent graph. Pass an empty string to remove maintainer.

maintainerTeamKeystring

The key of the team that maintains this agent graph. Pass an empty string to remove maintainer.

rootConfigKeystring

The AI Config key of the root node. If present, edges must also be present.

Example request

{
  "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"
}

Response

Agent graph updated

keystring required

A unique key for the agent graph

namestring required

A human-readable name for the agent graph

descriptionstring

A description of the agent graph

rootConfigKeystring

The AI Config key of the root node

createdAtinteger required
updatedAtinteger required

Example response

{
  "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
}