5-Minute Developer Onboarding
Last updated: 2026-02-19
This guide is for external developers who want to use Aionis quickly.
Default Local Port Convention
Unless you have a reason to change it, this guide uses:
PORT=3001- Local base URL:
http://localhost:3001 - If
3001is already in use, run with another port, e.g.PORT=3011 make quickstart
Core Endpoints (Start Here)
GET /health: service liveness.POST /v1/memory/write: write facts/nodes/edges.POST /v1/memory/recall_text: get compact text context for LLM prompts.
Data Model Quick Definitions
- Node
type=event: a fact/log you want to remember. - Node
type=entity: a named object/person/system. - Node
type=topic: a cluster/collection of related items.
type is an enum controlled by server contract; for the full set, see API Contract.
/v1/memory/write Minimum Contract
At API level, write requires:
input_textorinput_sha256(at least one).
Optional:
nodes[]edges[]auto_embed
Absolute minimum request (valid contract):
{"input_text":"hello write"}Recommended onboarding write (actually useful for recall):
{
"input_text": "quickstart",
"nodes": [{"client_id":"evt_1","type":"event","text_summary":"hello"}]
}Option A: Use Hosted Aionis (Fastest)
If you host Aionis for users, only share:
BASE_URL(your API URL)API_KEY(ifMEMORY_AUTH_MODE=api_key)
Hosted auth header formats:
- API key mode:
X-Api-Key: <API_KEY> - JWT mode:
Authorization: Bearer <JWT>
Hosted curl example:
curl -sS "$BASE_URL/v1/memory/recall_text" \
-H 'content-type: application/json' \
-H "x-api-key: $API_KEY" \
-d '{"query_text":"hello","limit":5}' | jqTypeScript:
npm i @aionis/sdk@0.1.4import { AionisApiError, AionisClient, AionisNetworkError } from "@aionis/sdk";
const client = new AionisClient({
base_url: process.env.BASE_URL!,
api_key: process.env.API_KEY,
});
try {
await client.write({
input_text: "onboarding write",
auto_embed: true,
nodes: [{ client_id: "onboard_evt_1", type: "event", text_summary: "hello aionis" }],
});
const out = await client.recallText({ query_text: "hello aionis", limit: 5 });
console.log(out.data.context?.text ?? "");
} catch (err) {
if (err instanceof AionisApiError) {
console.error("api error", err.status, err.code, err.details, err.request_id);
} else if (err instanceof AionisNetworkError) {
console.error("network error", err.message, err.request_id);
} else {
console.error("unknown error", err);
}
}Python:
pip install aionis-sdk==0.1.4import os
from aionis_sdk import AionisApiError, AionisClient, AionisNetworkError
client = AionisClient(
base_url=os.environ["BASE_URL"],
api_key=os.getenv("API_KEY"),
)
try:
client.write({
"input_text": "onboarding write",
"auto_embed": True,
"nodes": [{"client_id": "onboard_evt_1", "type": "event", "text_summary": "hello aionis"}],
})
out = client.recall_text({"query_text": "hello aionis", "limit": 5})
print((out.get("data") or {}).get("context", {}).get("text", ""))
except AionisApiError as err:
print("api error", err.status, err.code, err.details, err.request_id)
except AionisNetworkError as err:
print("network error", err, err.request_id)Option B: Self-Host in 5 Minutes (Docker Compose)
git clone https://github.com/Cognary/Aionis.git
cd Aionis
cp .env.example .envDependency check:
docker --version
docker compose version
make --versionRecommended minimal local edits in .env:
EMBEDDING_PROVIDER=fakeMEMORY_AUTH_MODE=offPORT=3001
Start full stack:
make stack-up
curl -fsS http://localhost:3001/healthIf make quickstart or make stack-up reports bind: address already in use for 3001, run:
PORT=3011 make quickstartfake provider behavior (important):
- It generates deterministic synthetic vectors (not real semantic embeddings).
recall_textstill runs vector recall, but quality is for plumbing/smoke only.- Fresh writes may not be immediately recallable until async embedding backfill is done.
Smoke write + recall:
curl -sS http://localhost:3001/v1/memory/write \
-H 'content-type: application/json' \
-d '{"input_text":"quickstart","auto_embed":true,"nodes":[{"client_id":"evt_1","type":"event","text_summary":"hello"}]}' | jq
for i in {1..20}; do
out="$(curl -sS http://localhost:3001/v1/memory/recall_text \
-H 'content-type: application/json' \
-d '{"query_text":"hello","limit":5}')"
seeds="$(echo "$out" | jq '.seeds|length')"
if [ "$seeds" -gt 0 ]; then
echo "$out" | jq '{seeds:(.seeds|length), context_preview:(.context.text|split("\n")[0])}'
break
fi
sleep 1
doneExpected hello-world shape (example):
seeds:>= 1context.text: starts with sections like# Topics / Conceptsor# Supporting Events / Evidence
Stop:
make stack-downProduction Baseline (Minimum)
Before external production usage, set:
APP_ENV=prodMEMORY_AUTH_MODE=api_key(orjwt)RATE_LIMIT_BYPASS_LOOPBACK=false(must stay false in production)- real embedding provider (
minimaxoropenai)
Hard safety rules:
MEMORY_AUTH_MODE=offis for local development only; do not expose it on public network.- Keep rate-limit bypass disabled in production (
RATE_LIMIT_BYPASS_LOOPBACK=false).
Recommended runbooks: