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

# Observe agent completion

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Authenticate with a platform Bearer credential or full-access workspace key permitted to edit this app. Scoped workspace keys are not accepted. Shares 60 reads or 6 mutations per minute per credential. Responses include request and rate-limit headers; 429 includes Retry-After. Observe the persisted run and its terminal outcome without polling. The connection lasts at most 20 minutes. Disconnect stops observation only; it never cancels the run. Reconnect to recover its current state. The stream does not expose model reasoning or repository source snapshots.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/apps/{app_id}/imported/agent-runs/{run_id}/events
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/imported/agent-runs/{run_id}/events:
    get:
      summary: Observe agent completion
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Authenticate with a platform Bearer credential or full-access workspace
        key permitted to edit this app. Scoped workspace keys are not accepted.
        Shares 60 reads or 6 mutations per minute per credential. Responses
        include request and rate-limit headers; 429 includes Retry-After.
        Observe the persisted run and its terminal outcome without polling. The
        connection lasts at most 20 minutes. Disconnect stops observation only;
        it never cancels the run. Reconnect to recover its current state. The
        stream does not expose model reasoning or repository source snapshots.
      operationId: observe_run_api_apps__app_id__imported_agent_runs__run_id__events_get
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-f0-9]{24}$
            description: The run identifier returned by launch.
            examples:
              - 6820f3a4e7b91d003c45a1f3
            title: Run Id
          description: The run identifier returned by launch.
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-f0-9]{24}$
            description: The imported app whose connected repository the agent may read.
            examples:
              - 6820f3a4e7b91d003c45a1f1
            title: App Id
          description: The imported app whose connected repository the agent may read.
      responses:
        '200':
          description: >-
            SSE run objects followed by terminal state, or a sanitized
            observation error. Heartbeats are comments.
          content:
            text/event-stream:
              schema:
                type: string
              example: |+
                event: run
                data: {"id":"6820f3a4e7b91d003c45a1f3","status":"queued"}

        '400':
          description: 'invalid_cursor: The cursor does not match this query.'
          content:
            application/json:
              examples:
                invalid_cursor:
                  summary: invalid_cursor
                  value:
                    error:
                      code: invalid_cursor
                      message: The cursor does not match this query.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '401':
          description: 'unauthenticated: Sign in with Bearer credentials.'
          content:
            application/json:
              examples:
                unauthenticated:
                  summary: unauthenticated
                  value:
                    error:
                      code: unauthenticated
                      message: Sign in with Bearer credentials.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '403':
          description: >-
            forbidden or access_revoked: App, credential or repository access
            denied.
          content:
            application/json:
              examples:
                forbidden:
                  summary: forbidden
                  value:
                    error:
                      code: forbidden
                      message: App or repository access denied.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '404':
          description: >-
            not_found: The app, deployment or run was not found or the developer
            preview is disabled.
          content:
            application/json:
              examples:
                not_found:
                  summary: not_found
                  value:
                    error:
                      code: not_found
                      message: Agent run not found.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '409':
          description: >-
            idempotency_conflict, deployment_disabled, repository_changed,
            review_unavailable or publication_unavailable: The request conflicts
            with the current resource.
          content:
            application/json:
              examples:
                idempotency_conflict:
                  summary: idempotency_conflict
                  value:
                    error:
                      code: idempotency_conflict
                      message: Use a new Idempotency-Key for different input.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '422':
          description: >-
            invalid_request or review_too_large: Invalid request, or the
            rendered review exceeds the 60,000-byte publication limit.
          content:
            application/json:
              examples:
                invalid_request:
                  summary: invalid_request
                  value:
                    error:
                      code: invalid_request
                      message: The agent manifest is invalid.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '429':
          description: 'rate_limited: Retry after Retry-After seconds.'
          content:
            application/json:
              examples:
                rate_limited:
                  summary: rate_limited
                  value:
                    error:
                      code: rate_limited
                      message: Too many agent requests.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
        '503':
          description: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - read_only
        - WorkspaceApiKeyAuth:
            - read_only
        - WorkspaceApiKeyBearerAuth:
            - read_only
components:
  schemas:
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.