AgentService
Agents
Create a new agent
Creates a new agent in the workspace
post/v1/workspaces/{workspaceId}/agents
Path parameters
workspaceIdstring required
Example:workspace_01HXKD2E5NQM3T9AYWCF133E3Q
Workspace ID.
Request body
Example request
{
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"defaultVariation": {
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"agentId": "agent_01HXKD2E5NQM3T9AYWCFMGWT9Y",
"spec": {
"modelConfig": {
"modelId": "claude/opus-4.6"
}
}
}
}Response
OK
Example response
{
"metadata": {
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
},
"info": {
"createdBy": {
"metadata": {
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
}
}
}
}