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

# Create Agent Trigger

> Create a Mage trigger for an existing agent.
Used for agents that were created when Mage was down,
or old agents that don't have triggers yet.



## OpenAPI

````yaml /api-reference/openapi.json post /api/pipelines/agents/triggers
openapi: 3.1.0
info:
  title: apowerb API
  description: REST API of the apowerb agentic framework (open-source edition).
  version: 0.1.2
  license:
    name: MIT
    url: https://github.com/apowerb/apowerb/blob/main/LICENSE
servers:
  - url: https://api.example.com
    description: Your apowerb instance
  - url: http://localhost:8000
    description: Local stack
security: []
paths:
  /api/pipelines/agents/triggers:
    post:
      tags:
        - scheduler
      summary: Create Agent Trigger
      description: |-
        Create a Mage trigger for an existing agent.
        Used for agents that were created when Mage was down,
        or old agents that don't have triggers yet.
      operationId: create_agent_trigger_api_pipelines_agents_triggers_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTriggerRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateTriggerRequest:
      properties:
        agent_id:
          type: string
          title: Agent Id
        agent_name:
          type: string
          title: Agent Name
        agent_model:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Model
        agent_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Description
      type: object
      required:
        - agent_id
        - agent_name
      title: CreateTriggerRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

## Related topics

- [Create Agent](/api-reference/agents/create-agent.md)
- [Quickstart](/quickstart.md)
- [Schedule Agent Run Endpoint](/api-reference/adk/schedule-agent-run-endpoint.md)
- [Scheduler](/guides/scheduler.md)
- [Schedule automatic refresh of a dashboard via an agent](/api-reference/dashboard-refresh/schedule-automatic-refresh-of-a-dashboard-via-an-agent.md)
