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

# List directory contents

> List files and subdirectories at the given path. Path is sandboxed to the .polpo/ directory and the project working directory.



## OpenAPI

````yaml /agent-openapi.json get /api/v1/files/list
openapi: 3.1.0
info:
  title: Polpo API
  version: 1.0.0
  description: >-
    REST API for Polpo — an AI agent that manages teams of AI coding agents.
    Manage tasks, missions, agents, playbooks, skills, and approvals. For
    conversational interaction, use the OpenAI-compatible POST
    /v1/chat/completions endpoint.
servers:
  - url: http://localhost:3890
    description: Local development
security:
  - bearerAuth: []
paths:
  /api/v1/files/list:
    get:
      tags:
        - Files
      summary: List directory contents
      description: >-
        List files and subdirectories at the given path. Path is sandboxed to
        the .polpo/ directory and the project working directory.
      parameters:
        - schema:
            type: string
            description: Directory path to list. Defaults to the project root.
            example: .polpo/output
          required: false
          description: Directory path to list. Defaults to the project root.
          name: path
          in: query
      responses:
        '200':
          description: Directory listing
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  data:
                    nullable: true
                required:
                  - ok
        '400':
          description: Invalid or disallowed path
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: string
                required:
                  - ok
                  - error
        '404':
          description: Path not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: string
                required:
                  - ok
                  - error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key passed as a Bearer token. Configure via the apiKeys field in
        polpo.json or the POLPO_API_KEY environment variable.

````