> ## 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 Summary

> Per-task rollup derived from the event log via the ``task_summary`` view.

Workspace-scoped: the row must belong to the caller's workspace and
the agent must match, or we return 404 (same shape as other task
endpoints — no information leak).



## OpenAPI

````yaml /api-reference/openapi.json get /v1/agents/{agent_id}/tasks/{task_id}/summary
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}/summary:
    get:
      tags:
        - v1
        - protected
        - agent-tasks
      summary: Get Task Summary
      description: >-
        Per-task rollup derived from the event log via the ``task_summary``
        view.


        Workspace-scoped: the row must belong to the caller's workspace and

        the agent must match, or we return 404 (same shape as other task

        endpoints — no information leak).
      operationId: get_task_summary_v1_agents__agent_id__tasks__task_id__summary_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
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskSummary'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    TaskSummary:
      description: |-
        Headline rollup for a single task, derived from the event log.

        Backed by the ``task_summary`` Postgres view. Stable contract — when
        the view's implementation moves to a materialized view or projection
        table, this shape stays the same. Per-tool breakdowns and per-artifact
        lists are deliberately not here; they live in their own endpoints so
        this stays small and additive.
      properties:
        agent_id:
          format: uuid
          title: Agent Id
          type: string
        cost_usd:
          default: 0
          title: Cost Usd
          type: number
        delegations_completed:
          default: 0
          title: Delegations Completed
          type: integer
        delegations_failed:
          default: 0
          title: Delegations Failed
          type: integer
        delegations_started:
          default: 0
          title: Delegations Started
          type: integer
        duration_ms:
          anyOf:
            - type: number
            - type: 'null'
          title: Duration Ms
        ended_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Ended At
        final_response:
          anyOf:
            - type: string
            - type: 'null'
          title: Final Response
        iterations:
          default: 0
          title: Iterations
          type: integer
        last_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Error
        llm_calls:
          default: 0
          title: Llm Calls
          type: integer
        llm_calls_failed:
          default: 0
          title: Llm Calls Failed
          type: integer
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
        status:
          title: Status
          type: string
        task_id:
          format: uuid
          title: Task Id
          type: string
        tools_called:
          default: 0
          title: Tools Called
          type: integer
        tools_failed:
          default: 0
          title: Tools Failed
          type: integer
        workspace_id:
          title: Workspace Id
          type: string
      required:
        - task_id
        - agent_id
        - workspace_id
        - status
      title: TaskSummary
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      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

````