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

# List Agent Runs

> List agent runs for an organization with optional user filtering.

Returns a paginated list of agent runs for the specified organization.
Optionally filter by user_id to get only agent runs initiated by a specific user.
Results are ordered by creation date (newest first).

Rate limit: 60 requests per 30 seconds.



## OpenAPI

````yaml api-reference/openapi3.json get /v1/organizations/{org_id}/agent/runs
openapi: 3.1.0
info:
  title: Developer API
  description: API for application developers
  version: 1.0.0
servers:
  - url: https://api.codegen.com
    description: Codegen API
security: []
paths:
  /v1/organizations/{org_id}/agent/runs:
    get:
      tags:
        - agents
        - agents
        - agents
      summary: List Agent Runs
      description: >-
        List agent runs for an organization with optional user filtering.


        Returns a paginated list of agent runs for the specified organization.

        Optionally filter by user_id to get only agent runs initiated by a
        specific user.

        Results are ordered by creation date (newest first).


        Rate limit: 60 requests per 30 seconds.
      operationId: list_agent_runs_v1_organizations__org_id__agent_runs_get
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: integer
            title: Org Id
        - name: user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: Filter by user ID who initiated the agent runs
            title: User Id
          description: Filter by user ID who initiated the agent runs
        - name: source_type
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/ApiAgentRunSourceType'
              - type: 'null'
            description: Filter by source type of the agent runs
            title: Source Type
          description: Filter by source type of the agent runs
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 100
            title: Limit
        - name: authorization
          in: header
          required: false
          schema:
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page_AgentRunResponse_'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionsErrorResponse'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIRateLimitErrorResponse'
          description: Too Many Requests
components:
  schemas:
    ApiAgentRunSourceType:
      type: string
      enum:
        - LOCAL
        - SLACK
        - GITHUB
        - GITHUB_CHECK_SUITE
        - GITHUB_PR_REVIEW
        - LINEAR
        - API
        - CHAT
        - JIRA
        - CLICKUP
        - MONDAY
        - SETUP_COMMANDS
      title: ApiAgentRunSourceType
    Page_AgentRunResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/AgentRunResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        size:
          type: integer
          title: Size
        pages:
          type: integer
          title: Pages
      type: object
      required:
        - items
        - total
        - page
        - size
        - pages
      title: Page[AgentRunResponse]
    PermissionsErrorResponse:
      properties:
        message:
          type: string
          title: Message
          default: You do not have access to this organization.
        status_code:
          type: integer
          title: Status Code
          default: 403
      type: object
      title: PermissionsErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    APIRateLimitErrorResponse:
      properties:
        message:
          type: string
          title: Message
          default: Rate limit exceeded. Please try again later.
        status_code:
          type: integer
          title: Status Code
          default: 429
      type: object
      title: APIRateLimitErrorResponse
    AgentRunResponse:
      properties:
        id:
          type: integer
          title: Id
        organization_id:
          type: integer
          title: Organization Id
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        web_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Web Url
        result:
          anyOf:
            - type: string
            - type: 'null'
          title: Result
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        source_type:
          anyOf:
            - $ref: '#/components/schemas/ApiAgentRunSourceType'
            - type: 'null'
        github_pull_requests:
          anyOf:
            - items:
                $ref: '#/components/schemas/GithubPullRequestResponse'
              type: array
            - type: 'null'
          title: Github Pull Requests
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - id
        - organization_id
      title: AgentRunResponse
      description: Represents an agent run in API responses
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    GithubPullRequestResponse:
      properties:
        id:
          type: integer
          title: Id
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        created_at:
          type: string
          title: Created At
        head_branch_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Head Branch Name
      type: object
      required:
        - id
        - created_at
      title: GithubPullRequestResponse

````