AIOS is the reusable Artificial Intelligence Operating System layer for Appneural platforms. It manages AI agents, prompt templates, LLM model configuration, RAG knowledge retrieval, tools, guardrails, conversations, automations, evaluations, analytics, event logs, permissions, and audit logs.
This starter is written in TypeScript and runs with zero external npm dependencies. It uses a JSON file store for local development and includes a PostgreSQL schema for production migration.
- Model provider management
- LLM model catalog
- Mock deterministic LLM completion engine
- Versioned prompt templates
- Prompt rendering
- Knowledge bases
- Document ingestion
- Text chunking and keyword indexing
- RAG search and answer generation
- AI tools
- Built-in calculator, summarizer, task creator, and OS event emitter
- Guardrail input/output scanning
- AI agent definitions
- Agent run lifecycle
- Tool execution during agent runs
- Conversation memory
- Event-triggered AI automations
- Evaluation suites and evaluation runs
- Usage metrics
- Event logs
- Audit logs
- Role-based permissions
- Seed demo data
- PostgreSQL schema example
- Automated tests
npm run build
npm startOpen:
http://localhost:5700/health
http://localhost:5700/docsDefault tenant:
demo-tenantUse request headers:
x-role: ai_engineer
x-tenant-id: demo-tenant
x-user-id: user_demoAvailable roles:
owner
admin
ai_admin
ai_engineer
agent_operator
knowledge_manager
viewerprovider_mock
model_mock_mind
model_mock_embed
prompt_rag_answer
prompt_agent_assistant
prompt_event_triage
kb_appneural_os
doc_aios_architecture
doc_rag_playbook
doc_agent_tooling
tool_calculator
tool_summarizer
tool_task_creator
tool_os_event_emitter
guardrail_safe_ai
guardrail_rag_citations
agent_business_assistant
agent_rag_researcher
auto_support_question
auto_document_uploaded_summary
evalsuite_aios_basicscurl -X POST http://localhost:5700/aios/rag/query \
-H "Content-Type: application/json" \
-H "x-role: agent_operator" \
-d '{
"query": "What is RAG in AIOS?",
"knowledgeBaseIds": ["kb_appneural_os"]
}'curl -X POST http://localhost:5700/aios/agents/agent_business_assistant/run \
-H "Content-Type: application/json" \
-H "x-role: agent_operator" \
-d '{
"input": "Explain AIOS agents and RAG"
}'curl -X POST http://localhost:5700/aios/agents/agent_business_assistant/run \
-H "Content-Type: application/json" \
-H "x-role: agent_operator" \
-d '{
"input": "calculate 12 + 18 and explain AIOS tools"
}'curl -X POST http://localhost:5700/aios/documents \
-H "Content-Type: application/json" \
-H "x-role: knowledge_manager" \
-d '{
"knowledgeBaseId": "kb_appneural_os",
"title": "New AIOS Policy",
"sourceType": "text",
"content": "AIOS answers must use retrieved context where possible and include citations for RAG responses."
}'curl -X POST http://localhost:5700/aios/events/ingest \
-H "Content-Type: application/json" \
-H "x-role: agent_operator" \
-d '{
"type": "support.question",
"source": "ClientOS",
"data": {
"question": "How does AIOS use RAG?"
}
}'aios-complete/
├── src/
│ ├── core/
│ ├── engines/
│ ├── modules/
│ ├── services/
│ ├── scripts/
│ ├── seed-state.ts
│ ├── docs.ts
│ └── main.ts
├── database/
│ └── schema.sql
├── tests/
│ └── aios.test.cjs
├── package.json
└── tsconfig.jsonFor production:
- Replace the JSON file store with PostgreSQL using
database/schema.sql. - Replace the mock provider with real LLM providers.
- Replace keyword search with embeddings and a vector database.
- Connect permissions to SecurityOS.
- Connect usage metrics to AnalyticsOS.
- Connect event-triggered workflows to AutomationOS.
- Store secrets in SecurityOS or a real KMS/HSM.
- Add rate limits, tenant isolation checks, and production observability.
npm run build
npm test
npm run seed
npm start- Official package:
@appneurox/aios - Manifest:
manifest.json - Domain API namespace:
/v1/ai - Modes: standalone and PlatformOS integrated
- Related systems: PlatformOS, SecurityOS
See docs/planning.md for the planning contract applied from APPNEURAL Plannings/OSs.