{"id":19815863,"url":"https://github.com/CommandCodeAI/BaseAI","last_synced_at":"2026-04-02T03:53:07.520Z","repository":{"id":257807438,"uuid":"865062553","full_name":"CommandCodeAI/BaseAI","owner":"CommandCodeAI","description":"BaseAI — The Web AI Framework. The easiest way to build serverless autonomous AI agents with memory. Start building local-first, agentic pipes, tools, and memory. Deploy serverless with one command.","archived":false,"fork":false,"pushed_at":"2026-02-17T19:35:59.000Z","size":4060,"stargazers_count":1197,"open_issues_count":10,"forks_count":106,"subscribers_count":13,"default_branch":"main","last_synced_at":"2026-02-18T00:53:23.899Z","etag":null,"topics":["ai","anthropic","artificial-intelligence","baseai","cohere","firewor","gemini","grok","groq","langbase","mistral","openai","perplexity","togetherai","xai"],"latest_commit_sha":null,"homepage":"https://BaseAI.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CommandCodeAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-29T22:05:49.000Z","updated_at":"2026-02-17T19:34:17.000Z","dependencies_parsed_at":"2024-10-02T20:43:07.127Z","dependency_job_id":"342692f9-7dc4-422c-a98b-bbdefc137e70","html_url":"https://github.com/CommandCodeAI/BaseAI","commit_stats":null,"previous_names":["langbaseinc/baseai","commandcodeai/baseai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CommandCodeAI/BaseAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommandCodeAI%2FBaseAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommandCodeAI%2FBaseAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommandCodeAI%2FBaseAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommandCodeAI%2FBaseAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CommandCodeAI","download_url":"https://codeload.github.com/CommandCodeAI/BaseAI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CommandCodeAI%2FBaseAI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","artificial-intelligence","baseai","cohere","firewor","gemini","grok","groq","langbase","mistral","openai","perplexity","togetherai","xai"],"created_at":"2024-11-12T10:07:33.409Z","updated_at":"2026-04-02T03:53:07.472Z","avatar_url":"https://github.com/CommandCodeAI.png","language":"TypeScript","funding_links":[],"categories":["Openai","Cloud \u0026 DevOps"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://baseai.dev\"\u003e\n      \u003cimg src=\"https://github.com/user-attachments/assets/6d447930-e347-4ce3-908f-0d6d676c517e\"\u003e\n    \u003ch1 align=\"center\"\u003eBaseAI\u003c/h1\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca aria-label=\"NPM version\" href=\"https://www.npmjs.com/package/baseai\"\u003e\u003cimg alt=\"\" src=\"https://img.shields.io/npm/v/@baseai/core?style=for-the-badge\u0026logo=https%3A%2F%2Fraw.githubusercontent.com%2FLangbaseInc%2Fdocs-images%2Frefs%2Fheads%2Fmain%2Fbaseai%2Fbaseai-icon.png\u0026logoColor=%23000\u0026labelColor=%23000\u0026color=%2318181B\"\u003e\u003c/a\u003e\n  \u003ca aria-label=\"License\" href=\"https://github.com/langbaseinc/baseai\"\u003e\u003cimg alt=\"license\" src=\"https://img.shields.io/npm/l/@baseai/core?style=for-the-badge\u0026logoColor=%23000\u0026labelColor=%23000\u0026color=%2318181B\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Getting Started\n\nBaseAI 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](https://baseai.dev/learn) guide to start with BaseAI.\n\n### Documentation (recommended)\n\nPlease check [BaseAI.dev/docs](https://baseai.dev/docs) and [BaseAI.dev/learn](https://baseai.dev/learn) to get started with full documentation.\n\n\n### 1. Initialize a new BaseAI project\n\nBaseAI is a TypeScript-first framework. To create a new BaseAI project, run the following command in your project:\n\n```bash\nnpx baseai@latest init\n```\n\nThis command will create a `baseai` directory in your project. This is what the directory structure looks like:\n\n```\nROOT (of your app)\n├── baseai\n|  ├── baseai.config.ts\n|  ├── memory\n|  ├── pipes\n|  └── tools\n├── .env (your env file)\n└── package.json\n```\n\n### 2. Add API keys\n\nCopy the following in your  `.env` file and add appropriate LLM API keys:\n\n```bash\n# !! SERVER SIDE ONLY !!\n# Keep all your API keys secret — use only on the server side.\n\n# TODO: ADD: Both in your production and local env files.\n# Langbase API key for your User or Org account.\n# How to get this API key https://langbase.com/docs/api-reference/api-keys\nLANGBASE_API_KEY=\n\n# TODO: ADD: LOCAL ONLY. Add only to local env files.\n# Following keys are needed for local pipe runs. For providers you are using.\n# For Langbase, please add the key to your LLM keysets.\n# Read more: Langbase LLM Keysets https://langbase.com/docs/features/keysets\nOPENAI_API_KEY=\nANTHROPIC_API_KEY=\nCOHERE_API_KEY=\nFIREWORKS_API_KEY=\nGOOGLE_API_KEY=\nGROQ_API_KEY=\nMISTRAL_API_KEY=\nPERPLEXITY_API_KEY=\nTOGETHER_API_KEY=\nXAI_API_KEY=\n```\n\n### 3. Create a new AI agent\n\nPipe 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:\n\n```bash\nnpx baseai@latest pipe\n```\n\nIt 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:\n\n```ts\nimport { PipeI } from '@baseai/core';\n\nconst pipeSummary = (): PipeI =\u003e ({\n\t// Replace with your API key https://langbase.com/docs/api-reference/api-keys\n\tapiKey: process.env.LANGBASE_API_KEY!,\n\tname: 'summary',\n\tdescription: 'AI Summary agent',\n\tstatus: 'public',\n\tmodel: 'openai:gpt-4o-mini',\n\tstream: true,\n\tjson: false,\n\tstore: true,\n\tmoderate: true,\n\ttop_p: 1,\n\tmax_tokens: 1000,\n\ttemperature: 0.7,\n\tpresence_penalty: 1,\n\tfrequency_penalty: 1,\n\tstop: [],\n\ttool_choice: 'auto',\n\tparallel_tool_calls: true,\n\tmessages: [\n\t\t{\n\t\t\trole: 'system',\n\t\t\tcontent: `You are a helpful AI agent. Make everything Less wordy.`\n\t\t}\n\t],\n\tvariables: [],\n\tmemory: [],\n\ttools: []\n});\n\nexport default pipeSummary;\n```\n\n### 4. Integrate pipe in your app\n\nLet's create a new `index.ts` file in your project root. Now we need to do the following:\n\n1. Import the pipe config we created.\n2. Create a new pipe instance with the pipe config.\n3. Run the pipe with a user message.\n4. Listen to the stream events.\n\nHere is what the code looks like:\n\n```ts\nimport { Pipe, getRunner } from '@baseai/core';\nimport pipeSummarizer from './baseai/pipes/summary';\n\nconst pipe = new Pipe(pipeSummarizer());\n\nconst userMsg = `\nLangbase studio is your playground to build, collaborate, and deploy AI. It allows you to experiment with your pipes in real-time, with real data, store messages, version your prompts, and truly helps you take your idea from building prototypes to deployed in production with LLMOps on usage, cost, and quality.\nA complete AI developers platform.\n- Collaborate: Invite all team members to collaborate on the pipe. Build AI together.\n- Developers \u0026 Stakeholders: All your R\u0026D team, engineering, product, GTM (marketing and sales), literally invlove every stakeholder can collaborate on the same pipe. It's like a powerful version of GitHub x Google Docs for AI. A complete AI developers platform.\n`;\n\nasync function main() {\n\tconst { stream } = await pipe.run({\n\t\tmessages: [{ role: 'user', content: userMsg }],\n\t\tstream: true,\n\t});\n\n\tconst runner = getRunner(stream);\n\n\t// Method 1: Using event listeners\n\trunner.on('connect', () =\u003e {\n\t\tconsole.log('Stream started.\\n');\n\t});\n\n\trunner.on('content', content =\u003e {\n\t\tprocess.stdout.write(content);\n\t});\n\n\trunner.on('end', () =\u003e {\n\t\tconsole.log('\\nStream ended.');\n\t});\n\n\trunner.on('error', error =\u003e {\n\t\tconsole.error('Error:', error);\n\t});\n}\n\nmain();\n```\n\nMake sure to install and import `dotenv` at the top if you are using Node.js:\n\n```ts\nimport 'dotenv/config';\n```\n\n### 5. Run the AI agent\n\nTo run the pipe locally, you need to start the BaseAI server. Run the following command in your terminal:\n\n```bash\nnpx baseai@latest dev\n```\n\nNow, run the `index.ts` file in your terminal:\n\n```bash\nnpx tsx index.ts\n```\n\nYou should see the following output in your terminal:\n\n```md\nStream started.\n\nLangbase 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.\n\nKey Features:\n- **Collaborate**: Invite team members to build AI together.\n- **Inclusive Teams**: Engage all stakeholders—R\u0026D, engineering, product, and marketing—in a shared space. It’s like GitHub combined with Google Docs for AI development.\nStream ended.\n```\n\u003e [!TIP]\n\u003e You can also run RAG locally with BaseAI. Check out the memory agent quickstart [guide](https://baseai.dev/docs/memory/quickstart) for more details.\n\n## Contributing\n\nWe welcome contributions to BaseAI. Please see our [Contributing Guide](CONTRIBUTING.md) for more information.\n\n## Authors\n\nThe following are the original authors of BaseAI:\n\n- Ahmad Awais ([@MrAhmadAwais](https://twitter.com/MrAhmadAwais))\n- Ashar Irfan ([@MrAsharIrfan](https://twitter.com/MrAsharIrfan))\n- Saqib Ameen ([@SaqibAmeen](https://twitter.com/SaqibAmeen))\n- Saad Irfan ([@MrSaadIrfan](https://twitter.com/MrSaadIrfan))\n- Ahmad Bilal ([@AhmadBilalDev](https://twitter.com/ahmadbilaldev))\n\n## Security\n\nIf you've found a security vulnerability in BaseAI, please report it privately by emailing [security@langbase.com](mailto:security@langbase.com). Please do not open a public issue. For more details on Langbase security and how to report, visit this [link](https://langbase.com/security).\n\nLearn more by clicking and browsing our [website][bai], [docs][baid], and a free [/learn AI course][bail] on building AI agents, with agentic tools, and agentic memory.\n\n[![baseai.dev](https://raw.githubusercontent.com/LangbaseInc/docs-images/refs/heads/main/baseai/baseai-ogg.jpg)][bai]\n\n[bai]: https://baseai.dev\n[baid]: https://baseai.dev/docs\n[bail]: https://baseai.dev/learn\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCommandCodeAI%2FBaseAI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCommandCodeAI%2FBaseAI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCommandCodeAI%2FBaseAI/lists"}