[](https://www.npmjs.com/package/dalabase) [](http
npm install dalabase   

> AI Stack for AI Engineers
>
> AI Stack simplifies the creation and management of AI agents using the Langbase SDK.

``sh`
npm install dalabase
pnpm install dalabase

Full documentation is available at Langbase SDK.
First, set up your environment variables by creating a .env file in your project root:
`shell`
LANGBASE_API_KEY=your_api_key_here
Replace your_api_key_here with your actual Langbase API key.
Then, use the package in your project:
`javascript
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();
`

KEY: 📦 NEW, 👌 IMPROVE, 🐛 FIX, 📖 DOC, 🚀 RELEASE, and 🤖 TEST`
> _I use Emoji-log, you should try it and simplify your git commits._

- MIT © Ahmad Awais
- Code of Conduct

(follow) To stay up to date on free & open-source software
(follow) To get #OneDevMinute daily hot tips & trolls
(subscribe) To tech talks & #OneDevMinute videos
(read) In-depth & long form technical articles
(connect) On the LinkedIn profile y'all
[n]: https://NodeCLI.com?utm_source=github&utm_medium=referral&utm_campaign=ahmadawais/cli-meow-help