AINative is a domain-specific micro-framework (rather than just a traditional library) designed to standardize and simplify the process of building AI/LLM-driven full-stack applications.
Instead of manually wiring together generic UI frameworks, backend routing, and complex text streaming protocols, AINative offers an end-to-end architecture (React on the frontend and an Express/FastAPI adapter on the backend) tailored specifically for LLM streaming, multimodal inputs, and prompt UI states.
Building an AI application typically involves repetitive tasks such as maintaining chat state histories perfectly in sync with the backend memory, parsing chunked data streams in React, updating loading states gracefully, handling errors natively mid-stream, and invoking system tools. AINative simplifies this by providing ready-made client-side runtimes, components, and server-side routes that natively understand AI interactions, freeing you to focus only on building your domain tools and prompts.
AINative embraces "Inversion of Control". You inject the <AIApp> provider into your React application and set up an AINativeServer on your backend. When components trigger user prompts (eg: <AIInput>), the system takes over. The data is securely ferried backwards via the server adapter to the given AI model. The response payload is then streamed down to the <AIStream> components natively, parsing functions and text outputs synchronously into your view tree.
packages/client: runtime, components, multimodal helpers, and client-side testspackages/server-node: Express-based AI server with provider adapters and tool routingpackages/server-python: FastAPI-based server adapterpackages/cli: project scaffolding and developer commandsexamples/basic-chat: end-to-end example used by Playwrightexamples/streaming-demo: local streaming demodocs: framework and package documentation
- OpenAI
- Anthropic
- Ollama
The example apps also support a local fallback response path so they can run without external API keys.
- Node.js 18+
- pnpm 8+
- Python 3.10+
corepack pnpm installcorepack pnpm run buildcorepack pnpm test
corepack pnpm run test:e2eTerminal 1:
corepack pnpm run server:basic-chatTerminal 2:
corepack pnpm run dev:basic-chatThen open http://127.0.0.1:5173.
The CLI currently supports:
ainative initainative devainative buildainative previewainative doctorainative add-provider
Install the CLI after publish:
npm install -g @hari7261/ainative-cliSmoke check:
corepack pnpm --dir packages/cli exec node dist/index.js --helpThe repo has been validated locally with:
- monorepo build
- client unit tests
- Node server tests
- Python server smoke test
- Playwright end-to-end tests for
basic-chat - CLI help and doctor smoke checks
- Getting Started
- Installation
- Architecture
- Runtime
- Component API
- Server API
- Streaming
- Providers
- Tools and Actions
- CLI
- Publishing
- Contributing
PROJECT-PROMPT.mdis kept as a repo-local specification/reference file.- Python tests may still show third-party dependency warnings on some machines, but the server test itself passes.