{"id":31733674,"url":"https://github.com/neoapps-dev/modai","last_synced_at":"2025-10-09T08:53:33.860Z","repository":{"id":306817004,"uuid":"1027292701","full_name":"neoapps-dev/Modai","owner":"neoapps-dev","description":"Modular AI Protocol, alternative to MCP.","archived":false,"fork":false,"pushed_at":"2025-07-30T20:42:50.000Z","size":232,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-01T11:57:05.133Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neoapps-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-27T18:05:43.000Z","updated_at":"2025-07-30T20:42:54.000Z","dependencies_parsed_at":"2025-07-29T06:30:48.710Z","dependency_job_id":null,"html_url":"https://github.com/neoapps-dev/Modai","commit_stats":null,"previous_names":["neoapps-dev/modai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/neoapps-dev/Modai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoapps-dev%2FModai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoapps-dev%2FModai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoapps-dev%2FModai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoapps-dev%2FModai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neoapps-dev","download_url":"https://codeload.github.com/neoapps-dev/Modai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoapps-dev%2FModai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001055,"owners_count":26082991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-10-09T08:53:28.508Z","updated_at":"2025-10-09T08:53:33.852Z","avatar_url":"https://github.com/neoapps-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modai\n\n**Modai** is a modern, TypeScript-powered framework that enables large language models (LLMs) to interact with the real world via extendable \"tools\"—like running shell commands or reading files. Designed for safety, flexibility, and developer delight.\n\n---\n\n## ✨ Features\n\n- **Multi-provider LLM support:** OpenAI, Claude, Ollama, and custom endpoints.\n- **Pluggable, secure tools:** Run system commands, access the filesystem, automate anything.\n- **Protocol-driven:** All interactions flow through a predictable JSON protocol for tool use.\n- **Easy extension:** Add your own tools or providers with simple base classes.\n- **Contextual awareness:** Seamlessly pipes tool results into LLM conversations.\n- **Built in TypeScript:** Type safety out-of-the-box, ready for Node.js or via CLI.\n\n---\n\n## 📦 Installation \u0026 Setup\n\n### Method 1: NPM (recommended)\n\n```sh\npnpm i -g modai-framework # or npm. also no need for -g (--global) if you want it to be project-level.\n```\n\ndone. lol..\n\n### Method 2: Clone the repository and install dependencies\n\n```sh\ngit clone https://github.com/neoapps-dev/modai.git\ncd modai\npnpm install   # or: npm install   # choose your package manager\n```\n\nBuild the TypeScript project:\n\n```sh\npnpm run build  # or: npm run build\n```\n\nYou can now use Modai via CLI or import it in local projects using:\n\n```typescript\nimport { Modai } from \"./src\";\n```\n\n(Adjust the `import` path depending on where/how you use the framework.)\n\n---\n\n## 🚀 Quick Start\n\n```typescript\nimport { Modai } from \"./src\";\n\nconst modai = new Modai({\n  provider: \"openai\", // Also supports \"claude\", \"ollama\", \"custom\"\n  apiKey: \"YOUR_API_KEY\", // Needed for OpenAI/Claude\n  model: \"gpt-4.1\", // Model selection\n  // Optionally add: baseUrl, name, etc\n});\n\n// Chat with an LLM agent\nconst response = await modai.chat(\"List files in the current directory.\");\n\n// (Optional) Automatically extract and run any tool requests:\nconst toolResults = await modai.extractAndExecuteTools(response);\n\nfor (const { tool, result } of toolResults) {\n  if (result.success) {\n    console.log(`\u003e ${tool}:`, result.data);\n  }\n}\n\n// Or: Directly invoke a tool (scripting/programmatic use)\nconst execResult = await modai.processRequest({\n  protocol: \"modai\",\n  tool: \"exec\",\n  arguments: { command: \"ls -la\" },\n});\nconsole.log(execResult.data.stdout);\n```\n\n---\n\n## 🛠️ Core Tools\n\n- **`exec`** — Run system shell commands (with output capture)\n- **`file`** — Read, write, and list files/folders\n- **`registry`** — Utility for plugin/tool loading\n\n## 🤖 Supported LLM Providers\n\n- **OpenAI** (ChatGPT, GPT-4)\n- **Anthropic Claude**\n- **Ollama** (local open-source models)\n- **Custom**: Point to any compatible LLM API\n\n---\n\n## 🧩 Extending Modai\n\n**To add a new provider:**\n\n- Implement a provider in `src/providers/` extending `BaseProvider`\n\n**To add a new tool:**\n\n- Create a file in `src/tools/`, extending `BaseTool`\n- Register it in your config\n\n**Example: Custom Tool**\n\n[this](https://github.com/neoapps-dev/modai-echo). Can be installed via `/install neoapps-dev/modai-echo` or ask the LLM to install it :)\n\n---\n\n## 💡 Example Use Cases\n\n- AI developer agents (automate code, DevOps, builds, refactoring)\n- Smart LLM-driven automation on local or cloud systems\n- Chatbots with tool-use and access to real data\n- Autonomous research, writing, document analysis\n\n---\n\n## 🤝 Contributing\n\nPRs, feedback, and issues welcome!\n\n- Fork, branch, modify, and submit a Pull Request\n- Describe your changes, tests appreciated!\n\n---\n\n## 📄 License\n\nMIT License\n\n**Made with ❤️ and TypeScript by [@neoapps-dev](https://github.com/neoapps-dev)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoapps-dev%2Fmodai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneoapps-dev%2Fmodai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoapps-dev%2Fmodai/lists"}