embed
Put Bash inside your own app, for the user who is signed in. One iframe gives your user chat, approvals, Bash's live screen and voice. Your server opens a session, a short-lived link for that user, and your page shows its url.
Open a session on your server
Do this for the user signed in to your app. It gives them chat, approvals, the live screen and voice.
const session = await vestra.user('traveller-42').embed();// Put session.url in an iframe on your page: <iframe src={session.url} allow="microphone" />console.log(session.url, session.expires_at);Show the memory panel
Your company must turn it on first.
const withMemory = await vestra.user('traveller-42').embed({ memory: true });End the session
Its token stops working at once.
await withMemory.end();Open a session on your server
Do this for the user signed in to your app. It gives them chat, approvals, the live screen and voice.
session = vestra.user("traveller-42").embed()# Put session.url in an iframe on your page: <iframe src="{{ session.url }}" allow="microphone"></iframe>print(session.url, session.expires_at)Show the memory panel
Your company must turn it on first.
with_memory = vestra.user("traveller-42").embed(memory=True)End the session
Its token stops working at once.
with_memory.end()Preview what your users see
It opens chat, approvals, the live screen and voice. In your app, open one session per visit on your server, with the SDK or over HTTP.
vestra embed --user traveller-42Show the memory panel
Your company must turn it on first.
vestra embed --user traveller-42 --memoryOpen a session on your server
Do this for the user signed in to your app. It gives them chat, approvals, the live screen and voice. The response has a url and a token, valid for 15 minutes. Put the url in an iframe with allow="microphone".
curl "$VESTRA_BASE_URL/v1/sessions" \ -H "Authorization: Bearer $VESTRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "user_id": "traveller-42", "chat": true, "screen": "view", "voice": true }'Check the session
See whether it is still open.
curl "$VESTRA_BASE_URL/v1/sessions/ses_8h2" \ -H "Authorization: Bearer $VESTRA_API_KEY"End the session
Its token stops working at once.
curl -X DELETE "$VESTRA_BASE_URL/v1/sessions/ses_8h2" \ -H "Authorization: Bearer $VESTRA_API_KEY"{ "method": "tools/call", "params": { "name": "embed", "arguments": { "user": "traveller-42", "memory": true } }}Good to know
What the session token can see
A session's token lasts 15 minutes and can only reach that user and the session's conversation. It never shows what anything costs, never lists interactions, and never sees calls to your tools.
Which sites can show it
Your company's allowed_embed_origins setting decides which of your sites may show a session in an iframe. With none set, the session still works as a page of its own.
Ending a session
DELETE /v1/sessions/{id} ends a session at once. Its token stops working, its streams close, and a session.ended event says so.
The routes behind embed4 routes, each with every field in the API reference
runtime (or all)runtime (or all)runtime (or all)