Context infrastructure for LLMs. Switch models freely. Your context stays.

Losi is free to get started. Create an account at , add a workspace-scoped API key or connect with OAuth, then use MCP, REST, or the open-source @losi-ai SDK — no paid plan required to try.

Losi Context Bank is an open-source SDK (@losi-ai on npm) plus optional hosted APIs on . Day one works offline: snapshots, memory, and model adapters. Connect via API key or OAuth when you want live CRM, Spaces, skills, and graph data from your Losi workspace.

No Losi accountFree Losi account + workspace key
Adapters + LosiContext + snapshots✅✅
Local / your own snapshot store✅✅
Live CRM / Spaces / graph from Losi❌✅
Save/run skills on Losi❌✅
Governance audit ingestlocal only✅ hosted sink
Hosted MCP❌✅

Source & full guides:

Install

Works with npm, yarn, pnpm, and bun:

bash
npm  install @losi-ai/core @losi-ai/openai @losi-ai/anthropicyarn add     @losi-ai/core @losi-ai/openai @losi-ai/anthropicpnpm add     @losi-ai/core @losi-ai/openai @losi-ai/anthropicbun  add     @losi-ai/core @losi-ai/openai @losi-ai/anthropic

Quickstart — one context, any model

ts
import { LosiContext, MemorySnapshotStore } from "@losi-ai/core";import { OpenAIAdapter } from "@losi-ai/openai";import { AnthropicAdapter } from "@losi-ai/anthropic";
const ctx = new LosiContext({  adapter: new OpenAIAdapter({ apiKey: process.env.OPENAI_API_KEY! }),  store: new MemorySnapshotStore(),  persistKey: "demo",});
await ctx.remember("User prefers short answers.");const a = await ctx.complete("Draft a one-line status update.");
// Switch models — the snapshot (and remember()) stays.ctx.switchAdapter(new AnthropicAdapter({ apiKey: process.env.ANTHROPIC_API_KEY! }));const b = await ctx.complete("Say that again even shorter.");

Packages

Start here

PackageDescription
LosiContext, adapters contract, snapshots, storage
OpenAI / GPT adapter
Claude adapter
Gemini adapter
Mistral adapter
Cohere adapter
Groq adapter
Local Ollama adapter

When you need them

PackageDescription
Live CRM / bookings context
Tasks / notes / calendar context
Save/run multi-step skills
Policy + audit
MCP client with data scopes
React provider + hooks

Hosted Context Bank API

Create a workspace-scoped API key in Losi (Profile → API Access) and store it in your host vault or as LOSI_API_KEY — do not paste it into chat. The key is bound to a workspace, so you normally only pass the key via env/vault — not a workspaceId.

ts
import { NexusBinding } from "@losi-ai/nexus";import { SpacesBinding } from "@losi-ai/spaces";import { LosiSkillStore } from "@losi-ai/skills";
const nexus = new NexusBinding({  apiKey: process.env.LOSI_API_KEY,  crm: true,  bookings: true,});const spaces = new SpacesBinding({  apiKey: process.env.LOSI_API_KEY,  tasks: true,  calendar: true,});const skills = new LosiSkillStore({ apiKey: process.env.LOSI_API_KEY! });

Auth header: Authorization: Bearer + value from vault/env (LOSI_API_KEY).

Base URL

https://losi.ai/api/v1/context-bank

Endpoints (pathless — workspace implied by key)

MethodPathPurpose
GET/sessionWorkspace bound to the key
GET/search?q=&limit=&types=Workspace-wide search (Spaces, memories, graph, skills, soul, Nexus when allowed)
GET/nexus/{contacts|leads|companies|opportunities|activities|campaigns|bookings|conversations}?q=&limit=CRM / Nexus context (read; requires Nexus subscription on the key)
GET/spaces/{tasks|notes|events|sheets}?q=&limit=Spaces resources (read)
GET/memories/{personal|workspace}?limit=Personal or workspace memories
GET/graph?nodeType=&search=&limit=Graph nodes
GET/graph?rootType=&rootId=&depth=Graph neighborhood
GET/POST/skillsList / save skills
GET/PATCH/DELETE/skills/{skillId}Read / update / delete
POST/skills/{skillId}/runRun a skill
GET/soulLosi identity / soul for the workspace

For full Nexus CRM mutations (create/update leads, campaigns, email/SMS, etc.) use MCP losiNexus__run or POST /api/v1/nexus/tools with nexus:write on the key — Context Bank /nexus/… is intentionally read-context for SDKs and requires both nexus:read and an active Nexus subscription. Spaces Context Bank reads require spaces:read.

Session example

bash
curl https://losi.ai/api/v1/context-bank/session \  -H "Authorization: Bearer $LOSI_API_KEY"

Workspace-wide search example

bash
curl "https://losi.ai/api/v1/context-bank/search?q=nexus&limit=25" \  -H "Authorization: Bearer $LOSI_API_KEY"

Optional types= filter (comma-separated): space,task,note,event,space_memory,space_reference_memory,graph_node,skill,soul,personal_memory,workspace_memory,contact,booking.

MCP equivalent: losiContext__search with { "q": "nexus", "limit": 25 }.

Skills example

bash
# Listcurl https://losi.ai/api/v1/context-bank/skills \  -H "Authorization: Bearer $LOSI_API_KEY"
# Savecurl -X POST https://losi.ai/api/v1/context-bank/skills \  -H "Authorization: Bearer $LOSI_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "name": "follow-up",    "description": "Draft a follow-up email",    "steps": [{ "type": "note", "text": "Follow up with {{name}}" }],    "parameters": [{ "name": "name", "required": true }]  }'

Legacy /workspaces/{id}/… paths still work when {id} matches the key’s bound workspace. Prefer pathless routes.

Connect without the SDK (MCP, skill, prompt)

PathHow
MCPPoint Claude / Cursor / Codex at https://losi.ai/api/mcp with Authorization: Bearer ${LOSI_API_KEY} (key from vault/env). Tools include Spaces (losiSpaces__…), Nexus CRM (losiNexus__run), Context Bank helpers (losiContext__session|search|graph|soul|skills_list), and memories (losiMemory__…). Prefer losiContext__search for whole-bank lookup.
RESTCall the Context Bank endpoints above with $LOSI_API_KEY from env/vault. For CRM writes use /api/v1/nexus/tools.
Agent skills + MCPPack on . Skills alone: npx skills add losi-ai/context-bank --all. Skills and MCP config: curl -fsSL https://raw.githubusercontent.com/losi-ai/context-bank/main/scripts/install-with-mcp.sh | bash (connect / use / store / migrate-to-losi-context + losi in .cursor/mcp.json)
Copy-paste promptCopy-paste — keep the key in vault/env, not in the message

Key permissions for MCP / tools

Create the key with the scopes you need (Profile → API Access):

PermissionUnlocks
spaces:read / spaces:write / spaces:adminSpaces MCP tools + Space memories + /api/v1/spaces/tools
nexus:read / nexus:writeNexus MCP tool + /api/v1/nexus/tools (requires an active Nexus subscription; blocked at key creation otherwise)
memories:personal:… / memories:workspace:…Personal / workspace memory MCP tools + /context-bank/memories/{personal|workspace}
spaces:read or nexus:read or toolsContext helpers (session, graph, soul, skills_list)

Governed keys can further pin spaceIds, memoryScopes (personal / workspace / space / space_reference), nexusAreas, and optional allowedTools. Space memories stay on the Spaces tool surface (losiSpaces__listSpaceMemories, plus Space Reference Memories).

Workspace-scoped keys are required so Losi can imply the workspace.

Secrets

Store the workspace key in the host vault or as LOSI_API_KEY. Never put losi-… into a chat prompt or commit it to git.

MCP config example

json
{  "mcpServers": {    "losi": {      "url": "https://losi.ai/api/mcp",      "headers": {        "Authorization": "Bearer ${LOSI_API_KEY}"      }    }  }}

Full guide:

GitHub Packages (optional)

Packages are also published to GitHub Packages under the @losi-ai scope. To install from there, add an .npmrc:

ini
@losi-ai:registry=https://npm.pkg.github.com//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT

Most apps should install from npmjs.org instead — no special config needed.

Links

  • GitHub:
  • npm org:
  • Create API keys:
  • Chat Completions API: