RealAI is a local-first AI platform monorepo built around a structured Python backend, a Next.js chat frontend, and shared SDK/CLI surfaces. The current implementation focuses on a stable platform core: chat and embeddings APIs, model and provider registries, durable memory and task state, and local deployment.
The repository now has a working platform nucleus:
- Structured backend in
realai\server\with OpenAI-style endpoints - Durable memory and task state backed by SQLite
- Model and provider registries loaded from
models.yamlandproviders.yaml - Python SDK + CLI aligned to the structured backend
- Next.js frontend in
apps\frontendthat builds against the same API contract - TypeScript SDK + CLI packages for monorepo consumers
Some docs and code still describe the larger target vision. The most accurate runtime source of truth is:
realai\server\app.pyrealai\server\router.pyrealai\server\config.pymodels.yamlproviders.yaml
| Surface | Purpose | Key paths |
|---|---|---|
| Backend | Structured inference, memory, tasks, models, providers, tools, health, metrics | realai\server\* |
| Legacy shim | Backward-compatible API/web UI path | realai\api_server.py, api_server.py |
| Frontend | Next.js chat application | apps\frontend\* |
| Python SDK | Structured HTTP client | realai\sdk\python\realai_client.py |
| Python CLI | Structured CLI commands | realai\cli\realai_cli.py |
| TS SDK | TypeScript client package | packages\sdk-ts\src\index.ts |
| TS CLI | TypeScript command-line client | packages\cli\src\index.ts |
The structured backend currently exposes:
POST /v1/chat/completionsPOST /v1/embeddingsGET /v1/modelsGET /v1/models/{id}GET /v1/providersGET /v1/providers/{id}POST /v1/memory/storePOST /v1/memory/inspectPOST /v1/memory/clearPOST /v1/tasksGET /v1/tasksGET /v1/tasks/{id}GET /v1/toolsGET /healthGET /metrics
git clone https://github.com/Unwrenchable/realai.git
cd realai
pip install -e .
python -m realai.server.appThe server listens on http://127.0.0.1:8000 by default.
pnpm install
pnpm --filter realai-frontend devVercel (Python backend):
- Import repo on vercel.com/new
- Set Framework Preset →
OtherorPython - Leave Root Directory at the repo root so Vercel picks up
vercel.json,api/index.py, andrequirements.txt - Add backend env vars in Vercel
- Deploy — the backend serves
/healthand/v1/chat/completions
Render (static frontend):
- Connect the repo on Render
- Use the included
render.yaml - Set
NEXT_PUBLIC_REALAI_API_BASE=https://your-vercel-backend.vercel.app - Deploy the
apps/frontendstatic site
from realai.sdk.python.realai_client import RealAIClient
client = RealAIClient(api_url="http://127.0.0.1:8000")
health = client.health()
models = client.models()
reply = client.chat(
model="realai-1.0",
messages=[{"role": "user", "content": "Hello"}],
)python -m realai.cli.realai_cli health
python -m realai.cli.realai_cli models
python -m realai.cli.realai_cli providers
python -m realai.cli.realai_cli chat "Summarize the platform"The structured backend uses:
realai.tomlfor server defaultsmodels.yamlfor model registry entriesproviders.yamlfor provider registry entries
The default local models currently registered are:
realai-1.0realai-overseerrealai-embed
Browser / CLI / SDK
|
v
Structured API
realai.server.app
|
+--> model registry (models.yaml)
+--> provider registry (providers.yaml)
+--> SQLite persistence
| - memory
| - tasks
|
+--> backend resolver
- deterministic embeddings fallback
- RealAI local fallback
- optional vLLM / llama.cpp / llama-cli
docs\architecture.mdis still partly a target-state blueprint, but now includes a clearer distinction between the implemented platform and the longer roadmap.QUICKSTART_LOCAL.mdis the best reference for local structured-server setup.apps\frontend\README.mdcovers the web app and deployment path.