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

# Add Knowledge Urls

> Add knowledge base URLs to an existing agent.

**PHASE 3 MIGRATION**: Now scrapes websites locally and adds to knowledge base.

This endpoint:
- Fetches content from the provided URLs
- Extracts text from HTML
- Chunks and embeds the content locally
- Stores in local FAISS vector index
- Makes web content immediately searchable for RAG

Example:
```json
{
  "urls": [
    "https://company.com/about",
    "https://docs.company.com/api-guide"
  ]
}
```

Supports:
- HTTP/HTTPS URLs
- HTML content extraction
- Concurrent fetching (up to 3 URLs at once)
- Automatic chunking and embedding



## OpenAPI

````yaml https://api.mrassistant.ai/openapi.json post /agents/{agent_id}/knowledge/urls
openapi: 3.1.0
info:
  title: Backend - Multilingual Voice Agent System
  description: FastAPI backend for multilingual voice agents with tool use
  version: 1.0.0
servers: []
security: []
paths:
  /agents/{agent_id}/knowledge/urls:
    post:
      tags:
        - agent-knowledge
      summary: Add Knowledge Urls
      description: >-
        Add knowledge base URLs to an existing agent.


        **PHASE 3 MIGRATION**: Now scrapes websites locally and adds to
        knowledge base.


        This endpoint:

        - Fetches content from the provided URLs

        - Extracts text from HTML

        - Chunks and embeds the content locally

        - Stores in local FAISS vector index

        - Makes web content immediately searchable for RAG


        Example:

        ```json

        {
          "urls": [
            "https://company.com/about",
            "https://docs.company.com/api-guide"
          ]
        }

        ```


        Supports:

        - HTTP/HTTPS URLs

        - HTML content extraction

        - Concurrent fetching (up to 3 URLs at once)

        - Automatic chunking and embedding
      operationId: add_knowledge_urls_agents__agent_id__knowledge_urls_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddKnowledgeUrlsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddKnowledgeUrlsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AddKnowledgeUrlsRequest:
      properties:
        urls:
          items:
            type: string
          type: array
          minItems: 1
          title: Urls
          description: List of URLs to add to knowledge base
      type: object
      required:
        - urls
      title: AddKnowledgeUrlsRequest
      description: Request to add knowledge base URLs to an agent.
    AddKnowledgeUrlsResponse:
      properties:
        agent_id:
          type: string
          title: Agent Id
        urls_added:
          type: integer
          title: Urls Added
        task_id:
          type: string
          title: Task Id
        message:
          type: string
          title: Message
      type: object
      required:
        - agent_id
        - urls_added
        - task_id
        - message
      title: AddKnowledgeUrlsResponse
      description: Response from adding knowledge URLs.
    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

````