Agent Control

Create new agent graph

POST
/api/v2/projects/{projectKey}/agent-graphs

Create a new agent graph within the given project.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string

Header Parameters

LD-API-Version*"beta"

Version of the endpoint.

Value in

  • "beta"

Request Body

application/json

Agent graph object to create

Request body for creating an agent graph

key*string

A unique key for the agent graph

name*string

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

maintainerTeamKey?string

The key of the team that maintains this agent graph

rootConfigKey?string

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

edges?array<>

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

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/projects/string/agent-graphs" \  -H "LD-API-Version: beta" \  -H "Content-Type: application/json" \  -d '{    "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",  "_site": {    "href": "href",    "type": "type"  },  "name": "name",  "edges": [    {      "sourceConfig": "sourceConfig",      "targetConfig": "targetConfig",      "handoff": "{}",      "key": "key"    },    {      "sourceConfig": "sourceConfig",      "targetConfig": "targetConfig",      "handoff": "{}",      "key": "key"    }  ],  "description": "description",  "key": "key",  "updatedAt": 6}