Skip to main content
POST
Create Assistant

Body

application/json

Payload for creating an assistant.

graph_id
string
required

The ID of the graph the assistant should use. The graph ID is normally set in your langgraph.json configuration.

assistant_id
string<uuid>

The ID of the assistant. If not provided, a random UUID will be generated.

config
Config · object

Configuration to use for the graph. Useful when graph is configurable and you want to create different assistants based on different configurations.

context
Context · object

Static context added to the assistant.

metadata
Metadata · object

Metadata to add to assistant.

if_exists
enum<string>
default:raise

How to handle duplicate creation. Must be either 'raise' (raise error if duplicate), or 'do_nothing' (return existing assistant).

Available options:
raise,
do_nothing
name
string

The name of the assistant. Defaults to 'Untitled'.

description
string | null

The description of the assistant. Defaults to null.

Response

Success

assistant_id
string<uuid>
required

The ID of the assistant.

graph_id
string
required

The ID of the graph.

config
Config · object
required

The assistant config.

created_at
string<date-time>
required

The time the assistant was created.

updated_at
string<date-time>
required

The last time the assistant was updated.

metadata
Metadata · object
required

The assistant metadata.

context
Context · object

Static context added to the assistant.

version
integer

The version of the assistant

name
string

The name of the assistant

description
string | null

The description of the assistant