Create a new custom agent
POST/ai/agents
Creates a CUSTOM AgentCore agent. AgentId must be the value returned by GET /ai/agents?action=upload-script, and the zip package must already be uploaded to that presigned URL. Required body fields: AgentId, AgentName, ModelId, Description, PythonVersion, EntryPoint, AgentType (CUSTOM). The API writes CREATING metadata, grants the caller owner access, and triggers asynchronous AgentCore runtime creation. Poll GET /ai/agents/{id} for AgentStatus READY or CREATE_FAILED. Caller must have a valid role_id and AICore enabled. AgentName must be 3-48 alphanumeric and underscore characters starting with a letter (IPV-1004; hyphens are not allowed). Duplicate AgentName returns IPV-1018.
Request
Responses
- 200
- 400
- 500
Agent metadata created and asynchronous AgentCore creation triggered.
Response Headers
Validation or authorization failure. Body is {"Message": " -
Response Headers
Backend failure. Body is {"Message": " -