Assets
Assets are external resources handled by LangStream at deployment time. You don't want to deal with creating Kafka topics or vector database tables every time you change your application, so LangStream allows you to automate the behavior of assets at deployment, update, and deletion.
The LangStream deployer creates resources during the app-setup
job. If the job completes, the deployer creates another job called runtime-deployer
which creates the agent CRDs. When runtime-deployer
completes successfully, the application status changes to DEPLOYED. (If you get the ERROR_DEPLOYING status instead, check the logs with langstream apps logs <my-app-id>).
For example, when you initialize an Astra DB database, you might want to also create a keyspace and a table to save time. To do this, add the astra-keyspace and cassandra-table as assets to your pipeline.yaml:
Notice this pipeline is using datasource
type AstraDatasource
. The assets behavior described here is currently only available for AstraDatasource and CassandraDataSource.
Other commands available for assets include creating indexes within your tables, and truncating tables, as below.
For more on how AstraDatasource, CassandraDataSource, and LangStream assets interact at application deployment, see Data storage.
Configuration
Last updated