@vornicx/origin
v0.1.0
Published
Origin — a personal intelligence layer: context, memory (Atlas), observability, and human-directed agents. Interoperates with Apollo.
Maintainers
Readme
Origin
A system of context, memory & action.
Origin is a personal intelligence layer: it understands the work around you, remembers what matters, reasons from goals, and acts through human-directed agents — with every decision traceable. Reasoning and action run on a pluggable runtime: the built-in reference runner, or Apollo.
Intelligence is incomplete until it can act.
import { Origin, ApolloAgent, humanDirected } from "@vornicx/origin";
const origin = await Origin.open();
const agent = new ApolloAgent({
memory: origin.memory,
tools: [calendar, mail, browser],
policy: humanDirected(),
});
await agent.run("Prepare my launch plan");Install
npm install @vornicx/originRequires Node ≥ 22. Ships ESM + types. The only required runtime dependency is zod.
BYOK — bring your own model key (OpenRouter, OpenAI, Anthropic, Google,
Groq, Mistral); nothing is sent anywhere you don't configure.
Principles
| | Principle | What it means | |--|-----------|----------------| | Ⅰ | First principles | Context, memory, reasoning, tools and control are designed as one system — not bolted together. | | Ⅱ | Human agency | Agents amplify judgment, never replace it by default. | | Ⅲ | Context as interface | The best intelligence understands the work around you before it acts. | | Ⅳ | Action matters | Intelligence is incomplete until it can help you do something meaningful — with you, not without you. |
They're exported, too: import { PRINCIPLES } from "@vornicx/origin".
The cycle
Every run is one turn of understand → remember → reason → act → learn:
context → recall → plan → (gate → act → trace)* → synthesize → verify → remember- Context — scans the work around the goal (files, tools, intent).
- Memory (Atlas) — recalls what's relevant; saves the mission afterward.
- Reasoning — decomposes the goal into executable steps.
- Action — every change passes the policy gate first (approve / deny / ask).
- Verification — runs a success contract and issues a tamper-evident certificate.
- Observability — every decision is recorded; replay any run.
Tools
A tool is anything the agent can call. Inputs are validated by the tool itself.
import { defineTool } from "@vornicx/origin";
const calendar = defineTool({
name: "calendar",
description: "read the user's calendar",
run: (input) => readCalendar(input),
});
// Mutating tools are gated more strictly by policy:
const sendMail = defineTool({
name: "send_mail",
description: "send an email",
mutating: true,
kind: "network",
run: (input) => smtp.send(input),
});Human agency (policy)
Policies map to Apollo's execution modes and decide, per action, whether to allow, deny, or ask a human.
import { humanDirected, reviewOnly, autonomous, autoApprove } from "@vornicx/origin";
humanDirected(); // default — read freely, ask before any change
reviewOnly(); // plan only, never act
autonomous({ fullAuto: true }); // act without prompts (use deliberately)The approval handler is yours to implement (CLI prompt by default):
const agent = new ApolloAgent({
memory: origin.memory,
tools: [sendMail],
policy: humanDirected(),
approver: async (req) => ({ approved: await askHuman(req.reason) }),
});Non-interactive? Use autoApprove / denyAll, or supply your own.
Memory — Atlas
Persistent across sessions, decisions and workflows. Recall is ranked by
relevance × importance × recency, and shares Apollo's memory model
(note · chat · mission · fact · preference, importance 1–5).
import { Memory, JsonStore } from "@vornicx/origin";
const memory = new Memory({ store: new JsonStore({ file: ".origin/atlas.json" }) });
await memory.remember({ content: "Launch is June 12.", kind: "fact", importance: 5 });
const hits = await memory.recall("when is the launch?");Stores: InMemoryStore (default), JsonStore (file), or SupabaseStore
(cloud — see below). Bring your own by implementing MemoryStore.
Verification — contracts & certificates
Done is provable, not vibes. A contract verifies a goal via commands, HTTP checks, regex over output, and human criteria, producing a hashed certificate.
import { evaluateContract } from "@vornicx/origin";
const cert = await evaluateContract({
commands: [{ cmd: "npm test" }],
http: [{ url: "http://localhost:3000/health", expectStatus: 200 }],
criteria: ["no console.log left behind"],
});
cert.ok; // true if every check passed
cert.hash; // sha256 fingerprint, stable across timeObservability
const result = await agent.run("Prepare my launch plan");
const trace = await origin.observability.replay(result.traceId);
console.log(trace.events.map((e) => e.kind).join(" → "));
// mission_start → plan → approval → tool_call → verify → mission_endSinks: in-memory (default) or JSONL on disk. Sensitive values are redacted by a configurable redactor before anything is written.
Apollo — the agent runtime
Use the real Apollo CLI as Origin's reasoning runtime, and persist Atlas to the same Supabase cloud Apollo syncs to.
npm i -g @vornicx/apollo-agent && apollo setupimport { Origin } from "@vornicx/origin";
import { ApolloAgent, ApolloRuntime, SupabaseStore } from "@vornicx/origin/apollo";
const origin = await Origin.open();
const agent = new ApolloAgent({
memory: origin.memory,
policy: humanDirected(),
runtime: new ApolloRuntime(), // drives `apollo run …`
});// Atlas in the cloud (run SUPABASE_ATLAS_DDL once in your project):
const memory = new Memory({
store: new SupabaseStore({ url: process.env.SUPABASE_URL!, key: process.env.SUPABASE_KEY! }),
});Ecosystem
One foundation. Multiple layers.
| Layer | Name | This package |
|-------|------|--------------|
| Foundation | Archic | — |
| Personal intelligence | Origin | Origin |
| Agent runtime | Apollo | ApolloAgent, ApolloRuntime |
| Memory layer | Atlas | Memory, *Store |
| Integrations | Nexus | planned |
| — | Forge | coming soon |
Examples
npm run example:launch # the snippet above, end to end
npm run example:apollo # drive the Apollo CLI as the runtime
npm run example:memory # Atlas: remember & recallSee examples/.
