Create an agent
Creates an agent. For normal user-created custom agents, set connectionProvider to native. Use cursorCloud for Cursor Cloud, devin for Devin, and selfHosted only for external wrappers/webhooks. Native custom-agent instructions and workspace skills are configured through the native settings endpoint.
/agentsAuthorizationOAuth2 access token · headerrequiredapi:writeAuthorizationBearer token (JWT) · headerrequiredfieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
compactfullLT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
fullapplication/jsonavatarConfigobjectGenerated avatar configuration JSON.
connectionProviderstringOptional agent connection provider to initialize. Use native for normal user-created custom agents running on Leadtime internal agent engine, cursorCloud for Cursor Cloud, devin for Devin, and selfHosted for external wrappers/webhooks.
selfHostedclaudeManagedcursorClouddevingeminiManagedgeminiAgentRuntimenativenamestringrequiredAgent display name.
nativeConfigobjectOptional native custom-agent config for connectionProvider=native. Instructions and selected workspace skills can also be configured later through /agents/{id}/native.
roleIdstringRole id to assign. Defaults to the workspace Agent role.
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions