Agent

Create agent thread

Creates a new conversation thread/session for an AI agent. The thread maintains state across multiple messages.

post/project/{projectId}/agents/threads

Request

  • Base URL
    https://api.takeshape.io
  • Auth
    HTTP bearer

Path parameters

projectIdstring uuid required
Example:550e8400-e29b-41d4-a716-446655440000

The unique identifier for a project

Request body

agentNamestring required

The name of the agent to create a thread for

Example request

{
  "agentName": "my-agent"
}

Response

Thread created successfully

idstring required

The unique session/thread ID

agentNamestring required

The name of the agent

status'created' | 'started' | 'suspended' | 'done' required

The status of the agent thread

schemaIdstring required

The schema ID associated with the thread

schemaHashstring required

The schema hash for version tracking

createdAtstring required

ISO timestamp when the thread was created

updatedAtstring required

ISO timestamp when the thread was last updated

durationnumber

Duration of the thread in milliseconds, only set when status is done

Example response

{
  "id": "01234567-89ab-cdef-0123-456789abcdef",
  "agentName": "my-agent",
  "status": "created",
  "createdAt": "2024-01-01T12:00:00Z",
  "updatedAt": "2024-01-01T12:05:00Z",
  "lastMessageOutput": {
    "data": {
      "references": [
        {
          "_tid": "01234567-89ab-cdef-0123-456789abcdef"
        }
      ]
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.