dalabase
v0.0.2
Published
[](https://www.npmjs.com/package/dalabase) [](http
Readme
dalabase
AI Stack for AI Engineers
AI Stack simplifies the creation and management of AI agents using the Langbase SDK.
Install
npm install dalabase
pnpm install dalabaseUsage
Full documentation is available at Langbase SDK.
First, set up your environment variables by creating a .env file in your project root:
LANGBASE_API_KEY=your_api_key_hereReplace your_api_key_here with your actual Langbase API key.
Then, use the package in your project:
import {
createAgent,
runAgent,
createMemory,
uploadDocument,
retrieveMemory,
} from 'dalabase';
const agentConfig = {
name: 'MyAgent',
description: 'An AI agent for processing data',
// Add other configuration details as needed
};
async function main() {
// Create an agent
const agent = await createAgent(agentConfig);
// Run the agent
const response = await runAgent(agent.name, [
{ role: 'user', content: 'Your input here' },
]);
console.log('Agent response:', response);
// Create a memory
const memory = await createMemory({
name: 'knowledge-base',
description: 'A memory for storing documents',
});
// Upload a document to memory
await uploadDocument('knowledge-base', {
contentType: 'application/pdf',
documentName: 'example-doc.pdf',
document: fs.readFileSync('path/to/document.pdf'),
meta: {
author: 'Author Name',
url: 'https://example.com/document.pdf',
},
});
// Retrieve information from memory
const results = await retrieveMemory('knowledge-base', 'Your query here');
console.log('Memory retrieval results:', results);
}
main();Changelog
KEY: 📦 NEW, 👌 IMPROVE, 🐛 FIX, 📖 DOC, 🚀 RELEASE, and 🤖 TEST
I use Emoji-log, you should try it and simplify your git commits.





