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

# Get AI agent plan

> Retrieves agent planning context. Fetch a specific plan by planId, or the newest active plan for a conversation.




## OpenAPI

````yaml /openapi/ai-brain.yaml get /brain/plans
openapi: 3.1.0
info:
  title: Connie AI & Brain API
  version: 1.0.0
  description: >
    API for the AI & Brain module â€” the orchestration layer powering all AI
    features: the main conversational AI (Brain), AI chat conversations, browser
    automation tasks, agent identity management, and AI usage tracking.

    The Brain is the core AI engine. It accepts messages, orchestrates tool
    calls via Temporal workflows, and streams responses back. It powers the AI
    copilot across the entire product.
servers:
  - url: https://connie.ai/api
    description: Production
security:
  - cookieAuth: []
tags:
  - name: Brain
    description: Core AI engine â€” conversation, streaming, and workflow orchestration
  - name: Brain Plans
    description: Agent planning context (goal, steps, status)
  - name: AI Chat
    description: Persistent conversation and message management
  - name: AI Chat Attachments
    description: File uploads for AI context
  - name: Browser Tasks
    description: AI-driven browser automation tasks
  - name: Artifacts
    description: KB, table, and workflow artifacts attached to conversations
  - name: Agent Identities
    description: Named AI agent configuration and tool assignments
  - name: AI Cache
    description: FAQ response caching
  - name: AI Usage
    description: Token usage statistics
paths:
  /brain/plans:
    get:
      tags:
        - Brain Plans
      summary: Get AI agent plan
      description: >
        Retrieves agent planning context. Fetch a specific plan by planId, or
        the newest active plan for a conversation.
      operationId: getBrainPlan
      parameters:
        - name: planId
          in: query
          schema:
            type: string
          description: Specific plan ID
        - name: conversationId
          in: query
          schema:
            type: string
          description: Fetch newest active plan for this conversation
      responses:
        '200':
          description: Agent plan
          content:
            application/json:
              schema:
                type: object
                properties:
                  plan:
                    $ref: '#/components/schemas/AgentPlan'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    AgentPlan:
      type: object
      properties:
        id:
          type: string
        goal:
          type: string
        status:
          type: string
          enum:
            - active
            - completed
            - cancelled
            - failed
        totalSteps:
          type: integer
        currentStep:
          type: integer
        toolsToUse:
          type: array
          items:
            type: string
        steps:
          type: array
          items:
            type: object
            properties:
              stepNumber:
                type: integer
              description:
                type: string
              status:
                type: string
              result:
                type: string
                nullable: true
              error:
                type: string
                nullable: true
              startedAt:
                type: string
                format: date-time
                nullable: true
              completedAt:
                type: string
                format: date-time
                nullable: true
        summary:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: session

````

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