BaseAI — The Web AI Framework. The easiest way to build serverless autonomous AI agents with memory. Start building local-first, agentic pipes, tools, and memor
BaseAI — The Web AI Framework. The easiest way to build serverless autonomous AI agents with memory. Start building local-first, agentic pipes, tools, and memor
BaseAI is now archived in the favor of Langbase AI Primitives. The more we built BaseAI the more we realized frameworks are a bad idea in AI engineering. This space is moving fast and frameworks become blockers. Instead you should be using AI primitives, like memory, pipes, agents that work with any language as APIs and with TypeScript and Python SDKs. You can use any coding agent, like CommandCode to make your own AI framework with these AI primitives. BaseAI is a great example how.
BaseAI
BaseAI is the AI framework for building serverless and composable AI agents with memory and tools. It allows you to develop AI agent pipes on your local machine with integrated agentic tools and memory (RAG). Visit our BaseAI.dev/learn guide to start with BaseAI.
Please check BaseAI.dev/docs and BaseAI.dev/learn to get started with full documentation.
BaseAI is a TypeScript-first framework. To create a new BaseAI project, run the following command in your project:
npx baseai@latest initThis command will create a baseai directory in your project. This is what the directory structure looks like:
ROOT (of your app)
├── baseai
| ├── baseai.config.ts
| ├── memory
| ├── pipes
| └── tools
├── .env (your env file)
└── package.jsonCopy the following in your .env file and add appropriate LLM API keys:
…Pipe is your custom-built AI agent as an API. It's the fastest way to ship AI features/apps. Let's create a new pipe:
npx baseai@latest pipeIt will ask you for the name, description, and other details of the pipe step-by-step. Once done, a pipe will be created inside the /baseai/pipes directory. You can now edit the system prompt, change model params, and more. Here is what a pipe code looks like:
…Let's create a new index.ts file in your project root. Now we need to do the following:
Here is what the code looks like:
…Make sure to install and import dotenv at the top if you are using Node.js:
import 'dotenv/config';To run the pipe locally, you need to start the BaseAI server. Run the following command in your terminal:
npx baseai@latest devNow, run the index.ts file in your terminal:
npx tsx index.tsYou should see the following output in your terminal:
Stream started.
Langbase Studio is your AI development playground. Experiment in real-time with real data, store messages, and version prompts to move from prototype to production seamlessly.
Key Features:
- **Collaborate**: Invite team members to build AI together.
- **Inclusive Teams**: Engage all stakeholders—R&D, engineering, product, and marketing—in a shared space. It’s like GitHub combined with Google Docs for AI development.
Stream ended.[!TIP] You can also run RAG locally with BaseAI. Check out the memory agent quickstart guide for more details.
We welcome contributions to BaseAI. Please see our Contributing Guide for more information.
The following are the original authors of BaseAI:
Ahmad Awais (@MrAhmadAwais)
Ashar Irfan (@MrAsharIrfan)
Saqib Ameen (@SaqibAmeen)
Ahmad Bilal (@AhmadBilalDev)
If you've found a security vulnerability in BaseAI, please report it privately by emailing [email protected]. Please do not open a public issue. For more details on Langbase security and how to report, visit this link.
Learn more by clicking and browsing our website, docs, and a free /learn AI course on building AI agents, with agentic tools, and agentic memory.
No open issues yet, or sync has not completed.