@sioma/vercel
v0.1.0
Published
Vercel AI SDK adapter for Sioma. Remote mode (@sioma/vercel/remote + @sioma/client) wires your agent loop to a hosted cell; the package root is the enterprise embedded entry.
Maintainers
Readme
@sioma/vercel
Sioma adapter for the Vercel AI SDK. Sioma focuses the minimal grounded context for each intent, your model acts on it, and the measured outcome flows back so the engine learns.
Remote mode (self-serve): @sioma/vercel/remote
The learning/resolution engine runs on a Sioma cell (managed or self-hosted); your agent loop stays in-process and talks HTTP:
npm i @sioma/client @sioma/vercel ai zodimport { SiomaClient } from "@sioma/client";
import { withSiomaRemote } from "@sioma/vercel/remote";
import { anthropic } from "@ai-sdk/anthropic";
const client = new SiomaClient({
baseUrl: "https://aws-us1.cells.sioma.ai",
apiKey: process.env.SIOMA_API_KEY!,
});
const sioma = withSiomaRemote(client, { model: anthropic("claude-sonnet-5") });
const { focus, output } = await sioma.generate({
intent: "list this customer's unpaid invoices",
});
// focus.status: serve | ask | none — Sioma never invents a path.
// The outcome (latency + token counts) was already recorded for learning.Pass { rails: true } to register the rail passenger tools
(board/provide/inspect/abort) when your workspace enabled rails — the model
picks a flow, the LAYER makes the calls, and results are projected through
your spec's declared fields.
generate(args, { verify }) lets you assert ground-truth correctness before
the single outcome is recorded — only verified-correct outcomes reinforce at
full confidence (verify-then-cache).
Embedded mode (enterprise): the package root
import { withSioma, toVercelTools, toRailTools } from "@sioma/vercel" runs
the engine IN-PROCESS over your own stores — nothing leaves your boundary.
It requires @sioma/engine + @sioma/core, which are not on npm: they ship
via the licensed enterprise channel. Without them installed, use
@sioma/vercel/remote.
Rails, embedded: toRailTools(executor) takes your tenant-bound executor.
Note honestly — in embedded mode your app is the approvals UI: a WRITE
ride pauses awaiting-approval and stays paused until something calls the
executor's approval port. Point railApprovalUrl (in withSioma options)
at the approvals surface your app hosts. On the managed tier the Sioma
dashboard plays that role.
MIT © Sioma
