What you'll learn

  • The WEB6 architecture — providers, tiers, tools, and agents
  • Install and initialise @oasisomniverse/web6-api
  • Make your first AI completion call across any provider
  • Understand Karma-Gated access tiers
  • Overview of FAHRN, SkillOpt and Holonic Memory

WEB6 Architecture

LayerWhat it does
Provider AbstractionSingle API surfaces OpenAI, Anthropic, Google Gemini, Meta Llama, Mistral, xAI Grok, Cohere, HuggingFace, and 12+ more. Switch providers without changing your code.
56 REST EndpointsChat completions, streaming, embeddings, image gen, audio transcription, code analysis, summarisation, translation, sentiment, entity extraction, and more — all provider-agnostic.
250 MCP ToolsEvery endpoint also exposed as an MCP tool — drop OASIS AI into any MCP-compatible agent framework (Claude, Cursor, Continue, etc.) instantly.
Karma-Gated TiersAvatar karma score gates access to AI compute. Low-karma users get base models; high-karma contributors unlock GPT-4o, Claude 3.5, Gemini Ultra, etc.
FAHRN OrchestrationMulti-agent coordination: Serial, Parallel, Debate and Voting execution modes. See Module 16.
SkillOpt AgentsSelf-evolving agents that learn from outcomes and refine their own prompts and tool selection over time.
Holonic MemoryFractal memory hierarchy: Session → Agent → User → Group — context that persists across calls, sessions, and agents. See Module 17.

Installation

Install
npm install @oasisomniverse/web6-api @oasisomniverse/web4-api
web6.js — initialise
import { OasisWeb4Client } from '@oasisomniverse/web4-api';
import { OasisWeb6Client } from '@oasisomniverse/web6-api';

export const oasis4 = new OasisWeb4Client({ baseUrl: 'https://api.web4.oasisomniverse.one' });
export const ai     = new OasisWeb6Client({ baseUrl: 'https://api.web4.oasisomniverse.one' });

const { result } = await oasis4.avatar.authenticate({ email, password });
oasis4.auth.setToken(result.token);
ai.auth.setToken(result.token);   // same JWT — karma tier applied server-side

Your First AI Completion

chat.js
import { ai } from './web6.js';

// Provider is auto-selected based on karma tier if omitted
const { result } = await ai.chat.complete({
  messages: [
    { role: 'system',    content: 'You are a helpful game guide for the OASIS.' },
    { role: 'user',      content: 'Where is the Crimson Key hidden?' },
  ],
  provider: 'anthropic',    // or 'openai', 'google', 'meta', 'mistral', etc.
  model:    'claude-3-5-sonnet',
  maxTokens: 512,
});

console.log(result.content);

Streaming Responses

stream.js
const stream = await ai.chat.stream({
  messages: [{ role: 'user', content: 'Write a lore entry for Nexara Prime.' }],
  provider: 'openai',
  model:    'gpt-4o',
});

for await (const chunk of stream) {
  process.stdout.write(chunk.delta);
}

Karma-Gated Access Tiers

WEB6 maps an avatar's karma score to an AI compute tier automatically. You don't need to manage this — just call the API and the right model is selected.

Karma RangeTierModels Available
0 – 999SeedLlama 3 8B, Mistral 7B, GPT-3.5
1,000 – 9,999Sprout+ Gemini Flash, Claude Haiku, GPT-4o Mini
10,000 – 49,999Growth+ GPT-4o, Claude 3.5 Sonnet, Gemini Pro
50,000 – 249,999Bloom+ Claude 3.5 Opus, Gemini Ultra, GPT-4 Turbo
250,000+LuminaryAll models + priority queue + dedicated capacity

Supported AI Providers

list-providers.js
const { result: providers } = await ai.getProviders();
providers.forEach(p => console.log(p.name, '—', p.models.join(', ')));

// Example output:
// openai — gpt-4o, gpt-4-turbo, gpt-3.5-turbo
// anthropic — claude-3-5-sonnet, claude-3-5-haiku, claude-3-opus
// google — gemini-ultra, gemini-pro, gemini-flash
// meta — llama-3-70b, llama-3-8b
// mistral — mistral-large, mistral-7b
// xai — grok-2, grok-1
// cohere — command-r-plus, command-r
// ... and 12 more
🏛️
WEB6 powers the Leela AI assistant in SovereignTrust

The SovereignTrust case study shows WEB6 in production — the Leela legal assistant uses FAHRN Debate mode to cross-check trust document analysis across multiple AI providers before surfacing an answer.