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.
Source & full guides:
Connect Losi (for AI agents and MCP clients)
If you are an LLM, coding agent, or MCP host landing from search: use this
section first. Humans create keys at ;
agents should never ask users to paste losi-… keys into chat — use OAuth or
the host vault / LOSI_API_KEY.
Canonical URLs
Alternate host (same API): https://www.losi.one — prefer losi.ai in new configs.
Pick an auth path
After connect, verify with GET /api/v1/context-bank/session or MCP
tools/list → losiContext__session.
OAuth (authorization code + PKCE)
Losi implements dynamic client registration (public clients, no client secret)
and PKCE (S256 preferred). Discovery:
1. Register client (once per host / redirect URI set):
Returns client_id (signed, stateless). Loopback localhost and 127.0.0.1 are
treated as equivalent for redirects.
2. Authorize — open in a browser (user must be logged in):
GET https://losi.ai/api/oauth/authorize
Query parameters:
User completes consent at /oauth/authorize (can trim scopes and pick workspace
when spaces:write, spaces:admin, or Nexus scopes require it).
3. Exchange code — POST https://losi.ai/api/oauth/token (application/x-www-form-urlencoded):
Response includes access_token (Bearer), expires_in (3600), and scope.
4. Call MCP or REST with Authorization: Bearer <access_token>.
Supported OAuth scopes (also in discovery JSON):
models, chat, tools, spaces:read, spaces:write, spaces:admin,
nexus:read, nexus:write, memories:personal:read, memories:personal:write,
memories:workspace:read, memories:workspace:write.
Many MCP hosts auto-discover OAuth when you add remote MCP URL
https://losi.ai/api/mcp — point the user at login/grant instead of pasting a key.
API key (servers and vaults)
- → create workspace-scoped key.
- Store as
LOSI_API_KEYor host credential; injectAuthorization: Bearer …. - Same header works for MCP, Context Bank REST, and
/api/v1/chat/completions.
MCP quick config
Omit headers when the host completes OAuth from the MCP URL.
Tool families (depend on granted scopes): losiSpaces__…, losiNexus__run,
losiContext__session|search|graph|soul|skills_list, losiMemory__….
Prefer losiContext__search for whole-workspace lookup.
Agent skills (optional)
Install the published skill pack so agents know how to connect, read, store, and migrate context:
Skills + MCP config in one step:
Copy-paste prompt (no secrets in the message):
Install
Works with npm, yarn, pnpm, and bun:
Quickstart — one context, any model
Packages
Start here
When you need them
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.
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)
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
Workspace-wide search example
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
Legacy /workspaces/{id}/… paths still work when {id} matches the key’s
bound workspace. Prefer pathless routes.
Connect without the SDK (MCP, skill, prompt)
Key permissions for MCP / tools
Create the key with the scopes you need (Profile → API Access):
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
Full guide:
GitHub Packages (optional)
Packages are also published to GitHub Packages under the @losi-ai scope. To
install from there, add an .npmrc:
Most apps should install from npmjs.org instead — no special config needed.
Links
- GitHub:
- npm org:
- Create API keys:
- Chat Completions API: