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

# Attention: Create Kbsource

> Add text content to the Attention knowledge base. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Add text content to the Attention knowledge base.

> [!NOTE]
>
> Tool ID: `attention_create_kbsource`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'attention_create_kbsource',
  {
    "title": "VP of Engineering"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute attention_create_kbsource --input '{
  "title": "VP of Engineering"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": {
      "type": "example",
      "id": "id_123",
      "attributes": {
        "title": "VP of Engineering",
        "source_type": "manual",
        "content": "Example message"
      }
    }
  }
}
```

Use `deepline describe attention_create_kbsource --json` for the latest machine-readable contract.

## Input reference

Creates a new knowledge base source with inline content. Automatically triggers indexing for vector search. For file uploads, use the upload endpoint instead.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.title` | `string` | Yes | — | Title of the KB source Maximum length: 500. |
| `payload.content` | `string` | No | — | Content of the source (required for manual entries) Maximum length: 524288. |
| `payload.format` | `"text/markdown" \| "text/html" \| "text/plain"` | No | `"text/markdown"` | Content format (defaults to text/markdown). For PDF files, use the upload endpoint instead. Allowed: `text/markdown`, `text/html`, `text/plain`. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Creates a new knowledge base source with inline content. Automatically triggers indexing for vector search. For file uploads, use the upload endpoint instead.",
    "properties": {
      "title": {
        "type": "string",
        "description": "Title of the KB source",
        "maxLength": 500
      },
      "content": {
        "type": "string",
        "description": "Content of the source (required for manual entries)",
        "maxLength": 524288
      },
      "format": {
        "type": "string",
        "description": "Content format (defaults to text/markdown). For PDF files, use the upload endpoint instead.",
        "default": "text/markdown",
        "enum": [
          "text/markdown",
          "text/html",
          "text/plain"
        ]
      }
    },
    "required": [
      "title"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.data` | `object` | No | — | — |
| `result.data.data.type` | `string` | No | — | Resource type |
| `result.data.data.id` | `string` | No | — | Unique identifier of the KB source |
| `result.data.data.attributes` | `object` | No | — | — |
| `result.data.data.attributes.title` | `string` | No | — | Title of the KB source |
| `result.data.data.attributes.source_type` | `"manual" \| "upload"` | No | — | Type of source: manual (inline content) or upload (S3 file) Allowed: `manual`, `upload`. |
| `result.data.data.attributes.content` | `string` | No | — | Content of the source (present on get, absent on list) |
| `result.data.data.attributes.format` | `string` | No | — | Content format (e.g. text/markdown, application/pdf, text/html, text/plain) |
| `result.data.data.attributes.status` | `"pending" \| "uploading" \| "indexing" \| "indexed" \| "failed"` | No | — | Processing status of the source Allowed: `pending`, `uploading`, `indexing`, `indexed`, `failed`. |
| `result.data.data.attributes.file_size` | `integer` | No | — | File size in bytes |
| `result.data.data.attributes.chunk_count` | `integer` | No | — | Number of indexed chunks |
| `result.data.data.attributes.created_at` | `string` | No | — | Creation timestamp Format: `date-time`. |
| `result.data.data.attributes.updated_at` | `string` | No | — | Last update timestamp Format: `date-time`. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "Resource type"
              },
              "id": {
                "type": "string",
                "description": "Unique identifier of the KB source"
              },
              "attributes": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title of the KB source"
                  },
                  "source_type": {
                    "type": "string",
                    "description": "Type of source: manual (inline content) or upload (S3 file)",
                    "enum": [
                      "manual",
                      "upload"
                    ]
                  },
                  "content": {
                    "type": "string",
                    "description": "Content of the source (present on get, absent on list)"
                  },
                  "format": {
                    "type": "string",
                    "description": "Content format (e.g. text/markdown, application/pdf, text/html, text/plain)"
                  },
                  "status": {
                    "type": "string",
                    "description": "Processing status of the source",
                    "enum": [
                      "pending",
                      "uploading",
                      "indexing",
                      "indexed",
                      "failed"
                    ]
                  },
                  "file_size": {
                    "type": "integer",
                    "description": "File size in bytes"
                  },
                  "chunk_count": {
                    "type": "integer",
                    "description": "Number of indexed chunks"
                  },
                  "created_at": {
                    "type": "string",
                    "description": "Creation timestamp",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "description": "Last update timestamp",
                    "format": "date-time"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Attention provider guide](https://deepline.com/docs/providers/attention/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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