LangStream Documentation
Langstream.aiLangStream GitHub RepoChangelog
  • LangStream Documentation
  • ❤️Langstream.ai
  • ⭐LangStream GitHub Repo
  • 📜Changelog
  • about
    • What is LangStream?
    • License
  • Get Started
  • installation
    • LangStream CLI
    • Docker
    • Minikube (mini-langstream)
    • Kubernetes
    • Build and install from source
  • Building Applications
    • Vector Databases
    • Application structure
      • Pipelines
      • Instances
      • Configuration
      • Topics
      • Assets
      • Secrets
      • YAML templating
      • Error Handling
      • Stateful agents
      • .langstreamignore
    • Sample App
    • Develop, test and deploy
    • Application Lifecycle
    • Expression Language
    • API Gateways
      • Websocket
      • HTTP
      • Message filtering
      • Gateway authentication
    • API Reference
      • Agents
      • Resources
      • Assets
  • LangStream CLI
    • CLI Commands
    • CLI Configuration
    • Web interface
  • Integrations
    • Large Language Models (LLMs)
      • OpenAI
      • Hugging Face
      • Google Vertex AI
      • Amazon Bedrock
      • Ollama
    • Data storage
      • Astra Vector DB
      • Astra
      • Cassandra
      • Pinecone
      • Milvus
      • Solr
      • JDBC
      • OpenSearch
    • Integrations
      • Apache Kafka Connect
      • Apache Camel
    • LangServe
  • Pipeline Agents
    • Agent Messaging
    • Builtin agents
      • Input & Output
        • webcrawler-source
        • s3-source
        • azure-blob-storage-source
        • sink
        • vector-db-sink
        • camel-source
      • AI Agents
        • ai-chat-completions
        • ai-text-completions
        • compute-ai-embeddings
        • flare-controller
      • Text Processors
        • document-to-json
        • language-detector
        • query
        • query-vector-db
        • re-rank
        • text-normaliser
        • text-extractor
        • text-splitter
        • http-request
      • Data Transform
        • cast
        • compute
        • drop
        • drop-fields
        • merge-key-value
        • unwrap-key-value
      • Flow control
        • dispatch
        • timer-source
        • trigger-event
    • Custom Agents
      • Python sink
      • Python source
      • Python processor
      • Python service
    • Agent Developer Guide
      • Agent Types
      • Agent Creation
      • Configuration and Testing
      • Environment variables
  • Messaging
    • Messaging
      • Apache Pulsar
      • Apache Kafka
      • Pravega.io
  • Patterns
    • RAG pattern
    • FLARE pattern
  • Examples
    • LangServe chatbot
    • LlamaIndex Cassandra sink
Powered by GitBook
On this page
  • Usage
  • apps
  • configure
  • docker run
  • gateway
  • profiles
  • tenants
Edit on GitHub
  1. LangStream CLI

CLI Commands

PreviousAssetsNextCLI Configuration

Last updated 1 year ago

Use the CLI to manage your control plane, deploy applications, and interact with an application's gateway.

To install the CLI, see .

To configure the CLI, see .

Usage

langstream <command> <subcommand> --argument="value"

  • DEPRECATED

apps

Subcommand
Description
Arguments and Example

list

List all applications

Example: langstream apps list

get

Get application status

Example: langstream apps get "some-app-id" -o: optional output format, supported values are “json”, “yaml”, “raw”. Default is “raw”.

delete

Remove an application

Example: langstream apps delete “some-app-id”

deploy

Deploy a new application

Example: langstream apps deploy my-app-id --app “./my-app-files” --i “./instances.yaml” --s “./secrets.yaml”

download

Download LangStream application code

Example: langstream apps download myapp -o /myfile.zip

update

Update an existing application

Example: langstream apps update my-app-id --app “./my-app-files” --i “./instances.yaml” --s “./secrets.yaml”

logs

Get application logs

Example: langstream apps logs my-app-id -f “some-app-worker, another-app-worker”

ui

Start the UI for the application

Example: langstream apps ui my-app-id --port="8092" (if set to 0, a random port will be used)

configure

Subcommand
Description
Arguments and Example

tenant

Tenant name

Example: langstream configure tenant “a-tenant”

webServiceUrl

Control plane URL

Example: langstream configure webServiceUrl http://localhost:8090

apiGatewayUrl

Gateway api URL

Example: langstream configure apiGatewayUrl http://localhost:8091

token

Authentication token

Currently not used, held for future feature.

docker run

docker run is a command with no subcommands, so this table has arguments that are passed to the docker run command.

Arguments
Description
Example

--application, -app

Application directory path

Example: --application="./app-files" Path where the application files are located. Required.

--instance, -i

Instance file path

Example: --instance="./instance.yaml" Optional; path to the instance file.

--start-broker

Start the broker

Example: --start-broker="true" Should the broker be started? Default: true.

--start-s3

Start the S3 service

Example: --start-s3="true" Should the S3 service be started? Default: true.

--start-webservices

Start LangStream web services

Example: --start-webservices="true" Should LangStream web services be started? Default: true.

--start-database

Start Vector-JDBC database

Example: --start-database="true" Should LangStream vector database be started? Default: true.

--start-ui

Start local UI

Example: --start-ui="true" Should LangStream apps UI be started? Default: true.

--only-agent

Run only one agent

Example: --only-agent="AgentID" ID of a single agent to run (optional).

--secrets, -s

Secrets file path

Example: --secrets="./secrets.yaml" Optional; path to the secrets file.

--memory

Memory for Docker

Example: --memory="4G" Memory allocated to the Docker container.

--cpus

CPU for Docker

Example: --cpus="2" CPU cores allocated to the Docker container.

--docker-args

Additional Docker arguments

Example: --docker-args "--add-host=example.com:192.168.1.10"

--docker-command

Command to run Docker

Example: --docker-command="docker-compose"

--ui-port, -up

Port for the local webserver and UI. If 0, a random port is used.

Example: --ui-port="8092"

gateway

Subcommand
Description
Arguments and Example

chat

Produce and consume messages from gateway in a chat-like fashion

Example: langstream gateway chat my-app-id -cg “some-gateway-id” -pg “another-gateway-id” -p “key=value” -c “some-credentials”

--connect-timeout: Connect timeout in seconds.

consume

Consume messages from a gateway

Example: langstream gateway consume my-app-id “some-gateway-id” -p “key=value” -c “some-credentials” --position “latest”

--connect-timeout: Connect timeout in seconds.

produce

Produce messages to a gateway

Example: langstream gateway produce my-app-id “some-gateway-id” -p “key=value” -c “some-credentials” -v “some-message” -k “some-key” --header “key=value”

--connect-timeout: Connect timeout in seconds.

profiles

Subcommand
Description
Arguments and Example

create

Create a new profile

Example: langstream profiles create my-profile --set-current

--web-service-url: webServiceUrl of the profile (REQUIRED)

--api-gateway-url: apiGatewayUrl of the profile

--tenant: tenant of the profile

--token: token of the profile

update

Update an existing profile

Example: langstream profiles update my-profile --set-current

--web-service-url: webServiceUrl of the profile

--api-gateway-url: apiGatewayUrl of the profile --tenant: tenant of the profile --token: token of the profile

delete

Delete an existing profile

Example: langstream profiles delete my-profile

get-current

Get current profile

Example: langstream profiles get-current

get

Get a profile configuration

Example: langstream profiles get my-profile -o=json

import

Import profile from file or inline json

Example: langstream profiles import my-profile -f file.json --file, -f: create profile from JSON file --inline, -i: create profile with inline JSON. Can also use --inline 'base64:xxxx' for base64-encoded JSON --update, -u: allow the profile to be updated, --update=true

list

List profiles

Example: langstream profiles list -o=json

set-current

Set a profile as the current profile

Example: langstream profiles set-current my-profile

tenants

Directive
Description
Arguments and Example

create

Create a tenant

Example: langstream tenants create "a-tenant"

delete

Remove a tenant

Example: langstream tenants delete "a-tenant"

get

Get tenant configuration

Example: langstream tenants get "a-tenant"

list

List all tenants

Example: langstream tenants list

max-total-resource-units

Integer defining the maximum resources the tenant can use. Can be null.

Example: langstream tenants create "a-tenant" --max-total-resource-units=10

put

Save a tenant

Example: langstream tenants put "a-tenant"

update

Update an existing tenant

Example: langstream tenants update "a-tenant"

Configuration is deprecated. Use instead.

See the for resource unit values.

Installation
Configuration
apps
configure
docker run
gateway
profiles
tenants
langstream profiles
source