# Langbase

Langbase is a serverless AI developer platform that enables developers to build, collaborate, and deploy AI agents and applications with composable AI infrastructure.

- **Category:** ai agents
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 20
- **Triggers:** 0
- **Slug:** `LANGBASE`
- **Version:** 20260316_00

## Tools

### Append Thread Messages

**Slug:** `LANGBASE_APPEND_THREAD_MESSAGES`

Tool to add new messages to an existing conversation thread. Use when continuing a chat session or adding context to a thread.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `messages` | array | Yes | Array of one or more messages to append to the thread. Each message must have at minimum a 'role' field. |
| `threadId` | string | Yes | Unique identifier of the thread to append messages to. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Check API Health

**Slug:** `LANGBASE_CHECK_HEALTH`

Tool to check the health status of the Langbase API service. Use when you need to verify API availability.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Split Content into Chunks

**Slug:** `LANGBASE_CHUNKER_SPLIT_CONTENT`

Tool to split content into smaller chunks. Use when processing large text segments to fit downstream limits.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `content` | string | Yes | The input text content to be chunked. |
| `overlap` | integer | No | Number of characters to overlap between consecutive chunks. Must be ≥256 and < chunk_size. |
| `chunk_size` | integer | No | Desired size of each chunk in characters. Must be between 1024 and 30000. Default: 1024. |
| `chunker_type` | string ("basic" | "semantic") | No | Mode for chunking. Use 'semantic' to preserve sentence boundaries; 'basic' for fixed-size splits. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Thread

**Slug:** `LANGBASE_CREATE_THREAD`

Tool to create a new conversation thread. Use when starting a fresh chat session or grouping messages into a distinct thread.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `messages` | array | No | Optional initial messages for the thread |
| `metadata` | object | No | Key-value pairs to store with the thread for organizational purposes |
| `threadId` | string | No | Custom thread identifier. If not provided, a unique ID will be generated. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Thread

**Slug:** `LANGBASE_DELETE_THREAD`

Tool to delete a thread that is no longer needed to manage conversation history. Use when you need to permanently remove a thread by its ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `threadId` | string | Yes | The unique identifier of the thread to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Thread Message

**Slug:** `LANGBASE_DELETE_THREAD_MESSAGE`

Tool to delete a specific message from a conversation thread. Use when you need to remove a message from a thread by its ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `threadId` | string | Yes | The unique identifier of the thread containing the message |
| `messageId` | string | Yes | The unique identifier of the message to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Documents in Memory

**Slug:** `LANGBASE_DOCUMENT_LIST`

Tool to list documents in a specific memory. Use when you need to fetch document metadata (and optionally vectors) from a memory after confirming its name. Supports pagination via limit and startAfter parameters.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum number of documents to return |
| `memoryName` | string | Yes | Name of the memory to list documents from |
| `startAfter` | string | No | Pagination token to start after a specific document |
| `includeVectors` | boolean | No | Whether to include vector embeddings in each document |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Pipe Details

**Slug:** `LANGBASE_GET_PIPE`

Tool to retrieve details of a specific pipe by owner and name. Use when you need to fetch configuration and settings of a particular pipe.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `pipe_name` | string | Yes | The name of the pipe to retrieve |
| `owner_login` | string | Yes | The login/username of the pipe owner |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Thread Details

**Slug:** `LANGBASE_GET_THREAD`

Tool to retrieve details of a specific conversation thread. Use when you need the full thread details by its ID after confirming its existence.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `threadId` | string | Yes | The unique identifier of the thread to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Available Models

**Slug:** `LANGBASE_LIST_MODELS`

Tool to get available AI models supported by Langbase. Use to discover text and image generation models from various providers.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Thread Messages

**Slug:** `LANGBASE_LIST_THREAD_MESSAGES`

Tool to list all messages in a conversation thread. Use after obtaining the thread ID to fetch its messages.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Number of messages to return per page. |
| `before` | string | No | Return messages created before this message ID. |
| `threadId` | string | Yes | Unique identifier of the conversation thread. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Execution Traces

**Slug:** `LANGBASE_LIST_TRACES`

Tool to get execution traces for debugging and monitoring pipe runs. Use when you need to retrieve trace logs for a specific primitive.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum number of traces to return |
| `order` | string ("asc" | "desc") | No | Order for trace results |
| `offset` | integer | No | Number of traces to skip for pagination |
| `primitiveId` | string | Yes | ID of the primitive (pipe) to get traces for |
| `primitiveName` | string | Yes | Name of the primitive (pipe) to get traces for |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Memory

**Slug:** `LANGBASE_MEMORY_CREATE`

Tool to create a new memory. Use when storing a new memory record in Langbase after confirming memory details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The name (identifier) of the memory. |
| `top_k` | integer | No | Number of chunks to return. Default 10, range 1-100. |
| `chunk_size` | integer | No | Maximum number of characters in a single chunk. Default 10000, min 1024, max 30000. |
| `description` | string | No | A short description of the memory. |
| `chunk_overlap` | integer | No | Number of characters to overlap between chunks. Default 2048, min 256, must be less than chunk_size. |
| `embedding_model` | string | No | The embedding model to use. Supported: 'openai:text-embedding-3-large', 'cohere:embed-v4.0', 'cohere:embed-multilingual-v3.0', 'cohere:embed-multilingual-light-v3.0', 'google:text-embedding-004'. Defaults to 'openai:text-embedding-3-large'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Memory

**Slug:** `LANGBASE_MEMORY_DELETE`

Tool to delete a specific memory. Use when you need to permanently remove a stored memory by its name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `memory_name` | string | Yes | Name of the memory to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Memories

**Slug:** `LANGBASE_MEMORY_LIST`

Tool to list all memory objects. Use when you need to fetch stored memories for context retrieval.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a new pipe

**Slug:** `LANGBASE_PIPE_CREATE`

Tool to create a new pipe. Use after configuring pipe parameters. Returns an array of pipe objects, each including API key and URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `json` | boolean | No | Enforce the output to be in JSON format |
| `name` | string | Yes | Name of the pipe |
| `stop` | array | No | Up to 4 sequences where the API will stop generating further tokens |
| `model` | string | No | Pipe LLM model in format 'provider:model_id' |
| `store` | boolean | No | If enabled, both prompt and completions will be stored |
| `top_p` | number | No | Nucleus sampling parameter between 0.0 and 1.0 |
| `status` | string ("public" | "private") | No | Visibility status of the pipe |
| `stream` | boolean | No | If enabled, the output will be streamed in real-time |
| `upsert` | boolean | No | Upsert pipe. If true, updates existing pipe with same name |
| `moderate` | boolean | No | If enabled, Langbase blocks flagged requests automatically |
| `max_tokens` | integer | No | Maximum number of tokens in the response |
| `description` | string | No | Short description of the pipe |
| `temperature` | number | No | Sampling temperature between 0.0 and 2.0 |
| `tool_choice` | string ("auto" | "required") | No | Controls which (if any) tool is called by the model |
| `presence_penalty` | number | No | Penalizes a word based on its occurrence in the input text |
| `frequency_penalty` | number | No | Penalizes a word based on how frequently it appears in the training data |
| `parallel_tool_calls` | boolean | No | If true, calls multiple tools in parallel |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List all pipes

**Slug:** `LANGBASE_PIPE_LIST`

Tool to list all pipes. Use after authentication to retrieve the complete list of pipes. Returns an array of pipe objects; callers must handle list iteration.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update an existing pipe

**Slug:** `LANGBASE_UPDATE_PIPE`

Tool to update an existing pipe's configuration on Langbase. Use when modifying model settings, parameters, prompts, tools, or memory. The pipe must already exist.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `json` | boolean | No | Enforce the output to be in JSON format |
| `name` | string | No | New name for the pipe |
| `stop` | array | No | Up to 4 sequences where the API will stop generating further tokens |
| `model` | string | No | Pipe LLM model in format 'provider:model_id' |
| `store` | boolean | No | If enabled, both prompt and completions will be stored |
| `tools` | array | No | List of tools to make available to the pipe |
| `top_p` | number | No | Nucleus sampling parameter between 0.0 and 1.0 |
| `memory` | array | No | List of memory objects to attach to the pipe |
| `status` | string ("public" | "private") | No | Visibility status of the pipe |
| `stream` | boolean | No | If enabled, the output will be streamed in real-time |
| `messages` | array | No | List of messages to configure the pipe's prompts |
| `moderate` | boolean | No | If enabled, Langbase blocks flagged requests automatically |
| `pipe_name` | string | Yes | Name of the pipe to update |
| `variables` | string | No | Variables for the pipe, can be an array or object |
| `max_tokens` | integer | No | Maximum number of tokens in the response |
| `description` | string | No | Short description of the pipe |
| `temperature` | number | No | Sampling temperature between 0.0 and 2.0 |
| `tool_choice` | string | No | Controls which (if any) tool is called by the model. Can be a string like 'auto' or 'required', or a structured ToolChoice object |
| `presence_penalty` | number | No | Penalizes a word based on its occurrence in the input text |
| `regenerateApiKey` | boolean | No | If true, regenerates the API key for this pipe |
| `frequency_penalty` | number | No | Penalizes a word based on how frequently it appears in the training data |
| `parallel_tool_calls` | boolean | No | If true, calls multiple tools in parallel |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Thread Metadata

**Slug:** `LANGBASE_UPDATE_THREAD`

Tool to update an existing thread's metadata. Use when you need to modify metadata fields for managing and organizing conversation threads.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `metadata` | object | No | Key-value pairs to store with the thread for organizational purposes. Each value must be a string with max length of 2048 characters. |
| `threadId` | string | Yes | The unique identifier of the thread to update |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Thread Message

**Slug:** `LANGBASE_UPDATE_THREAD_MESSAGE`

Tool to update an existing message in a conversation thread. Use when you need to modify the content or metadata of a specific message.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `content` | string | No | Updated text content of the message |
| `metadata` | object | No | Key-value pairs to store with the message. Each value must be a string with max length of 2048 characters. |
| `threadId` | string | Yes | Unique identifier of the thread containing the message |
| `messageId` | string | Yes | Unique identifier of the message to update |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
