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

# Get Data from Builder's Knowledge Base

> Fetch semantic search results from the builder's knowledge base for data analysis. This would allow your AI actions to leverage relevant structured data from the knowledge base based on filtering criteria.



## OpenAPI

````yaml /api-reference/v1/v1.1.0_openapi.json post /action/get_data_from_builder_knowledge_base
openapi: 3.0.0
info:
  version: 1.1.0
  title: AI Actions - Get Data
  description: API specifications for 'Get Data' category AI actions.
  license:
    name: MIT
servers:
  - url: https://api-lr.agent.ai/v1
security:
  - bearerAuth: []
paths:
  /action/get_data_from_builder_knowledge_base:
    post:
      tags:
        - Business & Financial Data
      summary: Get Data from Builder's Knowledge Base
      description: >-
        Fetch semantic search results from the builder's knowledge base for data
        analysis. This would allow your AI actions to leverage relevant
        structured data from the knowledge base based on filtering criteria.
      operationId: getDataFromBuilderKnowledgeBase
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: >-
                    Enter the search query to retrieve relevant knowledge base
                    entries, such as 'best sales strategies'.
                  default: '{{user_input}}'
                builder_knowledge_bases_list:
                  type: string
                  description: >-
                    Select which knowledge base to use for the search. For
                    example, choose 'Product Docs' or 'Marketing Tips'.
                max_documents_count:
                  type: string
                  description: >-
                    Specify the maximum number of document chunks to return,
                    such as '5' or '10'.
                  default: '10'
                score_cutoff:
                  type: string
                  description: >-
                    Set the score threshold for search relevance, such as '0.2'
                    for broader results or '0.7' for more precise matches.
                  default: '0.2'
                output_variable_name:
                  type: string
                  description: >-
                    Assign a variable name to store the knowledge base results,
                    like 'kb_results' or 'search_output'.
                  default: knowledge_base_results
                  pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
              required:
                - query
                - builder_knowledge_bases_list
                - max_documents_count
                - score_cutoff
                - output_variable_name
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '401':
          description: Unauthorized - invalid or missing bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
components:
  schemas:
    ActionResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
          description: HTTP status code of the action response
        response:
          type: object
          description: Response data from the action
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from your account
        ([https://agent.ai/user/integrations#api](https://agent.ai/user/integrations#api))

````