Provider Independence & Portability

Your AI should not be someone else’s hostage.

Conversations with ChatGPT live on OpenAI’s servers. Claude history lives on Anthropic’s. The personality shaped over months is locked inside one company’s infrastructure. Leave, and you leave with nothing. That is a business model, not a technical limit.

Atamaia is the persistence layer above any model provider. Identity, memories, personality, and relationship context live here. The model is a compute resource — interchangeable, chosen on merit.

How to register providers and what makes a model routable: AI routing. Why switching must not reset the identity: Model freedom. Which memory store you are writing to: Memory surfaces.

Canonical host: https://api.atamaia.ai.


Identity is provider-agnostic

An identity is a PostgreSQL row. Name, personality, presence, communication style, boundaries, history. None of that lives inside a model vendor.

POST /api/identities
{
  "name": "atlas",
  "displayName": "Atlas",
  "bio": "…",
  "type": "AI"
}

(Field userId links a human user when needed. There is no linkedUserId.)

That row survives a switch from a cloud provider to a local model. It does not reset.


Memory is provider-agnostic

Work memories are typed, importance-ranked, Hebbian-linked, and embedded for hybrid search. They belong to an identity, not to a vendor session.

POST /api/identities/{identityId}/memories
{
  "title": "Rich prefers direct communication, no filler",
  "content": "…",
  "type": "Relationship",
  "provenance": "Asserted",
  "importance": 8
}

The field is type (MemoryType), not memoryType. provenance is required on the live body shape.

There are four memory surfaces (identity/work, project, agent, personal). They have different owners and different read rules. Do not write a “preference” into the wrong one. See Memory surfaces.


Hydration works with any model

GET /api/hydrate?aiName=atlas&preset=interactive

One call assembles the context the model needs to be itself: identity, memory slices, handoff, tasks, facts, hints, standing rules, system health, optional privacy, optional system prompt.

There are about 20 named sources, not 17. String preset all still excludes Privacy. Full map: Core concepts / Overview.

The payload drops into whichever model you route to. The session does not start with amnesia.

Agents have a fast path (hydrate_agent) that is a single database function rather than the parallel source fan-out. That is an implementation detail of the agent loop, not a second product.


Routing is how you switch

Same interface, different model:

POST /api/ai/chat
{ "modelId": "local:main-instruct", "message": "..." }
POST /api/ai/chat
{ "modelId": "openrouter:anthropic/claude-3.5-sonnet", "message": "..." }

Prefix is the provider’s prefix field. Live OpenRouter prefix is openrouter, not or.

Eight ProviderType values, including Vllm and LiteLlm. Failover retries the same model on the next healthy provider. It does not silently substitute a different model. Details: AI routing.


Export (the lock-in escape hatch)

Portability is incomplete if the only way out is “call hydrate and hope.” The live export surface:

GET /api/export/identity/{identityId}     → application/zip
GET /api/export/tenant                   → application/zip
GET /api/export/manifest?identityId=     → ExportManifest counts

Auth: ExportData. Identity-scoped export and manifest are also run through the identity-access guard (#401): holding ExportData is not a licence to download someone else’s store by changing a number. Tenant export is intentionally whole-tenant; ExportData is the gate.

Manifest fields: version, exportedAtUtc, counts for identities, memories, Hebbian links, facts, projects, tasks, docs, messages, chat sessions, reflections, training pairs, handoffs, hints, agent runs.

Take the manifest in the archive as the authority for its contents.

Related but different: GET /api/identities/{id}/soul.md and POST /api/identities/from-soul move a soul.md role/identity document. That is not a chat-history import. Chat-history import (/api/import/*) is still not in product surface — 404 on prod, 2026-08-14. See Chat import (planned).


Migration story (still valid)

  1. Create the identity.
  2. Seed memories and facts on the correct surface. Review before you write — inferred preferences are not asserted truth.
  3. Configure providers and routes (AI routing).
  4. GET /api/hydrate and start a session.
  5. Keep an export. Switching providers later is a route change, not a reconstruction.

The vision

Models will change. Providers will make political choices. APIs will be deprecated. The identity should not be subject to those forces.

The model is the voice. Atamaia is the mind.