> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentarea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Task Events

> Get paginated task execution events for the specified task from database.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/agents/{agent_id}/tasks/{task_id}/events
openapi: 3.1.0
info:
  description: >-
    Modular and extensible framework for building AI agents. This API requires
    JWT Bearer token authentication for most endpoints. Include your JWT token
    in the Authorization header. Public endpoints include /, /health, /docs,
    /redoc, and /openapi.json.
  title: AgentArea API
  version: 0.1.0
servers: []
security:
  - bearer: []
paths:
  /v1/agents/{agent_id}/tasks/{task_id}/events:
    get:
      tags:
        - v1
        - protected
        - agent-tasks
      summary: Get Task Events
      description: >-
        Get paginated task execution events for the specified task from
        database.
      operationId: get_task_events_v1_agents__agent_id__tasks__task_id__events_get
      parameters:
        - in: path
          name: agent_id
          required: true
          schema:
            format: uuid
            title: Agent Id
            type: string
        - in: path
          name: task_id
          required: true
          schema:
            format: uuid
            title: Task Id
            type: string
        - description: Page number
          in: query
          name: page
          required: false
          schema:
            default: 1
            description: Page number
            minimum: 1
            title: Page
            type: integer
        - description: Number of events per page
          in: query
          name: page_size
          required: false
          schema:
            default: 50
            description: Number of events per page
            maximum: 100
            minimum: 1
            title: Page Size
            type: integer
        - description: Filter by event type
          in: query
          name: event_type
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by event type
            title: Event Type
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskEventResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    TaskEventResponse:
      description: Response model for paginated task events.
      properties:
        events:
          items:
            $ref: '#/components/schemas/TaskEvent'
          title: Events
          type: array
        has_next:
          title: Has Next
          type: boolean
        page:
          title: Page
          type: integer
        page_size:
          title: Page Size
          type: integer
        total:
          title: Total
          type: integer
      required:
        - events
        - total
        - page
        - page_size
        - has_next
      title: TaskEventResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    TaskEvent:
      description: Model for task execution events.
      properties:
        agent_id:
          title: Agent Id
          type: string
        event_type:
          title: Event Type
          type: string
        execution_id:
          title: Execution Id
          type: string
        id:
          title: Id
          type: string
        message:
          title: Message
          type: string
        metadata:
          additionalProperties: true
          default: {}
          title: Metadata
          type: object
        task_id:
          title: Task Id
          type: string
        timestamp:
          title: Timestamp
          type: string
      required:
        - id
        - task_id
        - agent_id
        - execution_id
        - timestamp
        - event_type
        - message
      title: TaskEvent
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: JWT Bearer token for authentication
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````