Generate Agent Edit
POST/api/agents/generate-edit
This endpoint generates an updated agent configuration based on a description of desired changes and the current agent configuration. The request must include a valid API key and user ID.
Request
Header Parameters
API key to authorize the request.
ID of the user making the request.
- application/json
Body
required
A detailed description of the changes to be made to the agent.
currentAgent
object
required
The current configuration of the agent to be modified.
The name of the agent.
User-facing prompt template with parameter placeholders.
Parameters that can be passed to the agent.
The primary goal of the agent.
Detailed description of what the agent does.
Responses
- 200
- 400
- 403
- 405
- 500
Successfully generated updated agent configuration.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
agentDetails
object
The name of the updated agent.
User-facing prompt template with parameter placeholders.
The primary goal of the agent.
Detailed description of what the agent does.
stepsBreakdown
object[]
The type of step (rag, compile, or structure).
Detailed instructions for this step.
{
"agentDetails": {
"rootAgentName": "string",
"displayPrompt": "string",
"goal": "string",
"description": "string",
"stepsBreakdown": [
{
"type": "string",
"prompt": "string"
}
]
}
}
Invalid request body or missing required fields.
- application/json
- Schema
- Example (from schema)
Schema
Error message indicating the issue with the request.
{
"message": "string"
}
Invalid API key or authentication failed.
- application/json
- Schema
- Example (from schema)
Schema
Detailed error message indicating authentication failure.
{
"message": "string"
}
Method not allowed.
- application/json
- Schema
- Example (from schema)
Schema
Error message indicating that the method is not allowed.
{
"message": "string"
}
Internal server error or error from language model service.
- application/json
- Schema
- Example (from schema)
Schema
Error message indicating an internal server error.
{
"message": "string"
}