Neural OS Documentation
Stop writing migrations and boilerplate CRUD before you’ve built anything real. Describe your database in plain English — the Neural OS designs the schema, secures it with an intent-based bouncer, and adapts as your data evolves.
Micro-Kernel Pipeline
Every request flows through a priority-ordered module pipeline: Security → Database → AI Engine → Response.
LivingDNA
Define your schema deterministically via API, or let the AI Engine assist you in generating it through natural language.
AISecurityModule
An intent-based bouncer that replaces traditional RLS. Scans for prompt injection, redacts PII, and blocks malicious payloads.
Virtual Database
Insert, query, and migrate data through structured REST calls or natural language. The AI engine translates intent into operations.
Edge-Native
Runs on the Next.js Edge Runtime with Upstash Redis for sub-50ms global latency.
REST-First API
A single POST endpoint powers every operation — use raw HTTP from any language, or reach for one of the official SDKs (TypeScript, Python, Go, PHP) for typed, idiomatic helpers. Your choice — nothing here locks you in.
LivingDNA — Auto-Adapting Schemas
Traditional databases require you to manually define every table, column, and relationship upfront. Evorozen flips this model. When you call create_schema or describe a schema in natural language via the chat action, the DatabaseGatewayModule automatically discovers the table structure and registers it into the kernel LivingDNA state — a living representation of your database schema, relations, and active policies.
Define your schema deterministically via API, or let the AI Engine assist you in generating it through natural language. As your data evolves, LivingDNA adapts. New tables are registered on first use, and the AI engine uses LivingDNA to validate all subsequent operations — no manual migrations needed.
AISecurityModule — The Intent-Based Bouncer
Row-Level Security (RLS) policies are static, brittle, and require expert tuning. The AISecurityModule replaces traditional RLS with an intelligent, intent-based bouncer that runs at CRITICAL_SECURITY priority — the very first module in the kernel pipeline.
Every incoming prompt is scanned against 15+ prompt-injection attack patterns. Detected injections are classified by severity (safe → low → medium → high → critical). High-severity payloads are blocked entirely and the kernel pipeline halts. Lower-severity payloads are sanitized in-place. PII (emails, phone numbers, SSNs, credit cards) is automatically redacted before the prompt reaches the LLM.
This means your database is secured by understanding what the user is trying to do — not by static rules that break when your schema changes.
The Kernel Pipeline
Every request to /api/neural enters the Micro-Kernel and flows through a priority-ordered module pipeline:
If any module throws, the pipeline halts and rolls back. The kernel returns a structured error JSON with the trace ID so you can debug exactly which module failed.
Connect with Standard HTTP
Every operation is a plain POST request with a JSON body — use raw HTTP from any language, or grab an official SDK (TypeScript, Python, Go, PHP) for typed helpers. Three steps: set your key, define your schema, then query or chat.
Set up Your Environment
Store your API key as an environment variable. Every request must include it as a Bearer token in the Authorization header. Generate your key from the Dashboard.
// Store your key in an environment variable — never hardcode it.
// .env.local
EVOROZEN_API_KEY=evo_live_your_key_here
// lib/neural.ts — reusable fetch helper
const API_ENDPOINT = 'https://pulse.evorozen.com/api/neural';
async function neuralRequest(body: Record<string, unknown>) {
const res = await fetch(API_ENDPOINT, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.EVOROZEN_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(`Neural API error: ${res.status}`);
return res.json();
}Define Schema & Insert Data
Two sequential calls: first create_schema registers the table structure into LivingDNA, then insert_data writes your first record.
// Step 1 — Define the table schema (registers into LivingDNA Rulebook)
await neuralRequest({
action_type: 'create_schema',
prompt: 'Define users table',
data_payload: {
tables: [{
name: 'users',
columns: [
{ name: 'id', type: 'uuid', primary: true },
{ name: 'name', type: 'text' },
{ name: 'email', type: 'text' },
],
}],
},
});
// Step 2 — Insert a record into the table
const res = await neuralRequest({
action_type: 'insert_data',
prompt: 'Insert new user',
data_payload: {
table: 'users',
record: { name: 'Ada Lovelace', email: 'ada@example.com' },
},
});
console.log(res);
// { action: 'insert_data', table: 'users', row: { _id: '...', name: 'Ada Lovelace', ... } }Chat with the AI Engine
Send a natural-language prompt using action_type: "chat". The AISecurityModule scans for injection attacks and redacts PII before the prompt reaches the LLM. The Agentic Executor can also auto-detect and create schemas from the AI's response.
// Chat with the Neural AI Engine — natural language to database
const res = await neuralRequest({
action_type: 'chat',
prompt: 'Create a products table with name, price, and stock columns',
});
console.log(res.response); // AI narrative + detected schema
console.log(res.traceId); // Kernel trace ID for debugging
// The AI may also auto-execute schema creation via the Agentic Executor.
// Check res.schema_execution for deterministic execution results:
if (res.schema_execution?.executed) {
console.log('Tables created:', res.schema_execution.tablesCreated);
}Endpoint & Payload
Action Types
create_schemaDDLRegister a table + column structure into LivingDNA Rulebook. Pass a "tables": [{ name, columns }].
insert_dataWRITEInsert a single record. Pass "table", "record": { key: value }.
select_dataREADQuery rows with optional filter. Pass "table", "where": { field: value }.
update_dataWRITEUpdate matching rows. Pass "table", "where", "changes": {}.
delete_dataWRITEDelete rows by filter. Pass "table", "where": { field: value }.
chatAINatural language to database. Pass "prompt": "your instruction".
Official SDKs
Most SDKs are live and published — they wrap the same REST API with type-safe, idiomatic helpers for your language. Prefer raw HTTP? That works identically. Nothing here locks you in.
Java
Maven: com.evorozen:neural-sdk:1.0.0View source Dart / Flutter
dart pub add evorozen_neuralView source