Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

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.

POST/agents
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Query parameters
fieldsToReturnstring

Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.

responseShapestring

Advanced 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.

Allowed:compactfull
Header parameters
LT-Response-Shapestring

Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:full
Request body
requiredapplication/json
avatarConfigobject

Generated avatar configuration JSON.

connectionProviderstring

Optional 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.

Allowed:selfHostedclaudeManagedcursorClouddevingeminiManagedgeminiAgentRuntimenative
namestringrequired

Agent display name.

nativeConfigobject

Optional native custom-agent config for connectionProvider=native. Instructions and selected workspace skills can also be configured later through /agents/{id}/native.

roleIdstring

Role id to assign. Defaults to the workspace Agent role.

Responses
201
401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://leadtime.app/api/public/agents" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "avatarConfig": {},
  "connectionProvider": "selfHosted",
  "name": "Company Manager",
  "nativeConfig": {},
  "roleId": "string"
}'
Response
No example response.