List Pipes langbase.pipes.list()

Retrieve a list of all your AI agent pipes on Langbase using the langbase.pipes.list() function.


Generate a User/Org API key

You will need to generate an API key to authenticate your requests. For more information, visit the User/Org API key documentation.


API reference

langbase.pipes.list()

Function Signature

langbase.pipes.list();

Usage example

Install the SDK

npm i langbase

Environment variables

Environment variables

LANGBASE_API_KEY="<USER/ORG-API-KEY>"

List pipes

List all pipes

import {Langbase} from 'langbase';

const langbase = new Langbase({
	apiKey: process.env.LANGBASE_API_KEY!,
});

async function main() {
	const pipeAgents = await langbase.pipes.list();

	console.log('Pipe agents:', pipeAgents);
}

main();

Response

  • Name
    PipeListResponse[]
    Type
    Array<object>
    Description

    An array of pipe objects returned by the langbase.pipes.list() function.

    PipeListResponse

    name: string;
    description: string;
    status: 'public' | 'private';
    owner_login: string;
    url: string;
    model: string;
    stream: boolean;
    json: boolean;
    store: boolean;
    moderate: boolean;
    top_p: number;
    max_tokens: number;
    temperature: number;
    presence_penalty: number;
    frequency_penalty: number;
    stop: string[];
    tool_choice: 'auto' | 'required' | ToolChoice;
    parallel_tool_calls: boolean;
    messages: Message[];
    variables: Variable[] | [];
    tools: ToolFunction[] | [];
    memory: Memory[] | [];
    
    • Name
      name
      Type
      string
      Description

      Name of the pipe.

    • Name
      description
      Type
      string
      Description

      Description of the AI pipe.

    • Name
      status
      Type
      'public' | 'private'
      Description

      Status of the pipe.

    • Name
      owner_login
      Type
      string
      Description

      Login of the pipe owner.

    • Name
      url
      Type
      string
      Description

      Pipe access URL.

    • Name
      model
      Type
      string
      Description

      Pipe LLM model. Combination of model provider and model id.

      Format: provider:model_id

    • Name
      stream
      Type
      boolean
      Description

      Pipe stream status. If enabled, the pipe will stream the response.

    • Name
      json
      Type
      boolean
      Description

      Pipe JSON status. If enabled, the pipe will return the response in JSON format.

    • Name
      store
      Type
      boolean
      Description

      Whether to store the prompt and completions in the database.

    • Name
      moderate
      Type
      boolean
      Description

      Whether to moderate the completions returned by the model.

    • Name
      top_p
      Type
      number
      Description

      Pipe configured top_p value.

    • Name
      max_tokens
      Type
      number
      Description

      Configured maximum tokens for the pipe.

    • Name
      temperature
      Type
      number
      Description

      Configured temperature for the pipe.

      What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random. Lower values like 0.2 will make it more focused and deterministic.

    • Name
      presence_penalty
      Type
      number
      Description

      Configured presence penalty for the pipe.

    • Name
      frequency_penalty
      Type
      number
      Description

      Configured frequency penalty for the pipe.

    • Name
      stop
      Type
      string[]
      Description

      Configured stop sequences for the pipe.

    • Name
      tool_choice
      Type
      'auto' | 'required' | ToolChoice
      Description

      Tool usage configuration.

      • Name
        'auto'
        Type
        string
        Description

        Model decides when to use tools.

      • Name
        'required'
        Type
        string
        Description

        Model must use specified tools.

      • Name
        ToolChoice
        Type
        object
        Description

        Forces use of a specific function.

        ToolChoice Object

        type: 'function';
        function: {
        	name: string;
        };
        
    • Name
      parallel_tool_calls
      Type
      boolean
      Description

      If enabled, the pipe will make parallel tool calls.

    • Name
      messages
      Type
      Array<Message>
      Description

      A messages array including the following properties. Optional if variables are provided.

      Message Object

      role: 'user' | 'assistant' | 'system'| 'tool';
      content: string | null;
      name?: string;
      tool_call_id?: string;
      tool_calls?: ToolCall[];
      

    • Name
      variables
      Type
      Array<Variable>
      Description

      A variables array including the name and value params.

      Variable Object

      name: string;
      value: string;
      

    • Name
      memory
      Type
      Array<Memory>
      Description

      An array of memories the pipe has access to.

      Memory Object

      name: string;
      

Example PipeListResponse

[
	{
		"name": "summary-agent",
		"description": "AI pipe for summarization",
		"status": "public",
		"owner_login": "user123",
		"url": "https://langbase.com/user123/summary-agent",
		"model": "openai:gpt-4o-mini",
		"stream": true,
		"json": false,
		"store": true,
		"moderate": false,
		"top_p": 1,
		"max_tokens": 1000,
		"temperature": 0.7,
		"presence_penalty": 1,
		"frequency_penalty": 1,
		"stop": [],
		"tool_choice": "auto",
		"parallel_tool_calls": true,
		"messages": [],
		"variables": [],
		"tools": [],
		"memory": []
	}
]