@blandsdk/client
How it works
The SDK has two parts that work together:Creating sessions (server-side)
Set up an endpoint on your server to mint session tokens for a given agent.Never expose your API key on the client side. Always create session tokens server-side and pass them to the browser.
Starting a conversation (client-side, React)
Use theuseWebchat hook to manage connection state and build a real-time conversation UI.
| Event | Description |
|---|---|
open | Connection established |
message | New message received |
update | Conversation state updated |
closed | Connection closed |
Docs for agents: llms.txt