PATH
Install and first turn
Get started
is the shortest live path: install the client, bind the runtime, mint a token, call
session.send.
客户端、host SDK、runtime 与 wire 参考。正文跟随源码。
Sveda 文档:入门、JS 客户端、host SDK、sveda-server、stream 协议、MCP 与 tools、模型与 embed token。
STACK BUILDER
Backend picks the host guide in the prompt. Frontend is for your stack — UI steps live on that host page. If the agent is unsure, it will ask you.
Backend
Frontend
Install Sveda into this project.
Read:
- https://sveda.dev/docs/hosts/laravel
- https://sveda.dev/docs/deploy
- https://sveda.dev/docs/client
- https://sveda.dev/llms.txt
Follow the numbered steps on the host page. If anything about this repo is unclear, ask the user.Install Sveda into this project. Read: - https://sveda.dev/docs/hosts/laravel - https://sveda.dev/docs/deploy - https://sveda.dev/docs/client - https://sveda.dev/llms.txt Follow the numbered steps on the host page. If anything about this repo is unclear, ask the user.
Two pieces: a JS client in the host, a Rust runtime beside it. This page is the shortest path to a live stream.
SvedaClient is the attach surface. Vue, React, Svelte, Solid, and the web component are optional UI — core does not require them.
Four packages, one shell. Import styles.css, pass endpoints and the embed token, and mount SvedaChat.
The binary is sveda-server. It is Axum. It is not in your application request cycle unless you choose to proxy it.
Replicas are stateless. Histories and settings live in Postgres. Occupancy, throttle, and MCP creds live in Redis.
One POST, one SSE response, a closed event list. Frontend vs backend tool.call targets.
Three layers: builtin agent tools, client-registered frontend tools, and host MCP listed at token mint. Token policy filters tools on every turn.
Sensitive tools pause the turn until the chat user taps Confirm or Deny. Opt-in only — nothing runs with confirmation unless the host or client tool declares it.
The catalog is on the runtime. Bring a ChatGPT or Claude key, or any Responses / Anthropic endpoint. DeepSeek is one wrapper. Failover is still the ordered list.
Tokens are HMAC, prefixed sveda_embed_, scoped to visitor_id. The host mints them with an optional named policy. The browser only sends them.
Sveda does not store your users. Your app keeps the role. The embed token carries a policy name. The runtime enforces it.
Whatever the host page passes in JS wins. If it passes nothing, the widget uses the appearance block in sveda.yaml. Default is the ink dashed frame.
These pages are a contract against the source: package names, route paths, event types, and env vars as they exist in
@sveda-ai/core
and
sveda-server.
PATH
Get started
is the shortest live path: install the client, bind the runtime, mint a token, call
session.send.
CONTRACT
JS client, runtime, and stream protocol are the attach surface. Everything else hangs off this pair plus one SSE pipe.
ATTACH
MCP and tools, models, and embed tokens document builtins, the catalog, and the host handshake. Language minting lives under Host SDKs.
Numbered install for each language, plus a path with no framework. Same
POST /sveda/session
JSON on every stack.
A static page can open the chat. Something on your origin still has to mint the embed token — curl for local, or a tiny POST /sveda/session.
Framework-agnostic PHP. Factory::factory() → embed()->createToken(). Your page only receives origin and token.
The package wraps sveda-ai/php-sdk, mints Sanctum MCP tokens, and exposes StartSidecarSessionController.
One client. Flask, Django, and FastAPI are route wrappers. start_host_session returns origin, token, expires_in, appearance.
Native fetch. startHostSession talks to the sidecar. The page still opens chat with data-sveda-open buttons.
The gem mints embed tokens with Bearer host auth. Rails is a controller and a layout. Plain Ruby is the same HTTP call.
No framework required. net/http plus the module is the host. Templates only render chat buttons when the origin is set.
HttpClient transport. Spring Boot is a controller and Thymeleaf. The SDK does not need Spring.
net8.0 sveda-dotnet-sdk. ASP.NET is MapPost plus a layout. The library is usable from any HttpClient host.
Install @sveda-ai/core. Run sveda-server on 0.0.0.0:8787. Mint a token. Call session.send.