Skip to main content

Edit Existing Agent

PUT 

/api/agents/edit

This endpoint updates an existing agent with the provided configuration. The request must include a valid API key and user ID.

Request

Header Parameters

    x-api-key stringrequired

    API key to authorize the request.

    userId stringrequired

    ID of the user making the request.

Body

required

    agentId stringrequired

    The unique identifier of the agent to update.

    rootAgentName stringrequired

    The name of the agent.

    displayprompt stringrequired

    User-facing prompt template with parameter placeholders.

    inputparameters object

    Parameters that can be passed to the agent.

    goal stringrequired

    The primary goal of the agent.

    description stringrequired

    Detailed description of what the agent does.

    stepsBreakdown

    object[]

    required

  • Array [

  • type string

    Type of step (rag, compile, or structure).

    prompt string

    Detailed instructions for this step.

    agentname string

    Name of the agent handling this step.

    content

    object

    query string

    Instructions for this step.

    response stringnullable

    Response from this step.

    external string

    External source used for this step.

  • ]

Responses

Successfully updated the agent.

Schema

    message object

    Response message containing the updated agent details.

Loading...