@multraverse/ai
v0.1.0
Published
Multraverse AI SDK — powered by Maz on Ollama
Readme
@multraverse/ai
The Multraverse AI SDK — a lightweight TypeScript wrapper around Maz, Multraverse's self-hosted AI backend powered by Ollama.
Models
| Tier | Model | Use for |
|------|-------|---------|
| light | qwen3:8b | Chat, classification, summarization, quick tasks |
| heavy | qwen3:14b | Complex reasoning, structured output, enrichment |
Installation
npm install @multraverse/aiSetup
import { MazAI } from '@multraverse/ai'
const maz = new MazAI({
baseUrl: 'https://ollama.multraverse.ai',
apiKey: process.env.MAZ_API_KEY,
})Methods
chat(options)
Multi-turn conversation. Default tier is light.
complete(options)
Single prompt → single string response.
enrich(options)
Look up missing business profile data. Always uses heavy model.
classify(text, categories)
Classify text into one of the provided categories.
summarize(text, maxSentences?)
Summarize a block of text.
isHealthy()
Returns true if Ollama is reachable.
Model routing
Pass tier: 'light' or tier: 'heavy' on any method to control
which model handles the request. When omitted, defaults to light.
// Light — fast, everyday
await maz.complete({ prompt: '...', tier: 'light' })
// Heavy — complex reasoning
await maz.chat({ messages: [...], tier: 'heavy' })