1. Obtain credentials
- Sign in to the Envole dashboard.
- Navigate to API Keys and create a new key.
- Choose or generate a unique identifier for the end user. This value will be sent in the required
X-Envole-User-Id
header on every request. - Store both values in environment variables:
Authorization: Bearer <API_KEY>
X-Envole-User-Id: <user-id>
2. Start a session
Create a thread for your assistant. Replace placeholders with your real values.id
field representing the thread identifier used in subsequent calls.
3. Post a message and stream events
Messages are sent to the thread and responses are streamed back using Server‑Sent Events. The request body now uses acontent
array where each item describes a piece of the message, such as text or files.
TypeScript / JavaScript
Python
4. Understanding events
Eachdata:
line is a complete SseEvent
object:
AGENT_RESPONSE_CHUNK
, AGENT_RESPONSE_COMPLETE
, TOOL_EXECUTION_APPROVAL_REQUEST
, and the many NOTIFICATION_*
types are documented in the Streaming reference.
With these steps you can programmatically interact with your assistant and handle its streaming responses end‑to‑end.
What’s Next?
Sub Assistant Nodes
Learn how nodes define your sub-assistant’s workflows