Generate Agent Configuration
POST/api/agents/generate
This endpoint generates an agent configuration based on a provided description. 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 agent's purpose and functionality.
Responses
- 200
- 400
- 403
- 405
- 500
Successfully generated agent configuration.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
agentDetails
object
The name of the generated 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 description.
- 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
error
object
Detailed error message indicating authentication failure.
{
"error": {
"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"
}