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

# Run an agent

> Creates a new session and starts execution of the specified agent



## OpenAPI

````yaml POST /run-agent/{agent_id}
openapi: 3.0.0
info:
  title: Finic AI API
  version: 1.0.0
  description: API for running Finic AI agents
servers:
  - url: https://api.finic.ai
security: []
paths:
  /run-agent/{agent_id}:
    post:
      summary: Run an agent with specified parameters
      description: Creates a new session and starts execution of the specified agent
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the agent to run
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: Bearer token for authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - browser_id
                - agent_input
              properties:
                browser_id:
                  type: string
                  description: The ID of the browser instance to use
                agent_input:
                  type: object
                  description: Input parameters for the agent
                max_retries:
                  type: integer
                  description: Maximum number of retry attempts
                  default: 0
      responses:
        '200':
          description: Successfully started agent execution
          content:
            application/json:
              schema:
                type: object
                properties:
                  session_id:
                    type: string
                    description: The unique identifier for the created session
        '401':
          description: Unauthorized - Invalid or missing authentication token
        '500':
          description: Internal server error
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````