Create a Pipe Agent
This example demonstrates how to create a private pipe in Langbase.
Create Pipe Example
Create Pipe Example
import 'dotenv/config';
import {Langbase} from 'langbase';
const langbase = new Langbase({
apiKey: process.env.LANGBASE_API_KEY!,
});
async function main() {
const response = await langbase.pipes.create({
name: 'summary-agent',
status: 'private',
messages: [{
role: 'system',
content: 'You are a helpful assistant that helps user to summarize text.',
}]
});
console.log(response);
}
main();