@nyxis/core
v0.2.0
Published
Runtime core for Nyxis — types, provider adapter, event bus, and React hooks for AI products.
Downloads
68
Maintainers
Readme
@nyxis/core
The runtime core of Nyxis — a toolkit for building
AI products. Tiny by design: shared types, the createModel provider adapter,
an event bus, and a handful of React hooks.
This package is the only thing the rest of Nyxis (the frontend components and
backend recipes you copy-paste with npx shadcn add) imports from. There is no
UI here, no CSS, no Tailwind.
Install
pnpm add @nyxis/coreWhat's inside
- Types —
AIMessage,AIToolCall,AICitation,AIProviderId, plus domain types for chat, agents, RAG, MCP, multimodal, prompts, skills. createModel— provider-agnostic adapter. Anthropic, OpenAI, Google, Mistral, Ollama out of the box; extensible via the registry.- Event bus —
nyxisAIEventsfor token streaming, cost tracking, and usage telemetry. - Hooks —
useAI,useChat,useCompletion,useTokenCount,useToolExecutor. - Server helpers —
createChatHandlerforRequest → Responsestreaming endpoints, available from@nyxis/core/server.
Pair with the registry
# Add a UI component (lands as editable source in your repo)
npx shadcn add @nyxis/chat-message
# Add a backend recipe (lands as editable source in your repo)
npx shadcn add @nyxis/api-chatComponents and recipes import shared types and the adapter from @nyxis/core.
They are otherwise yours to edit freely.
License
MIT © Julio César Daal
