Playbooks
Each playbook is a script in cURL, Python and TypeScript that runs one common job from top to bottom and prints a step <n>: line per step. Each page ends with the complete scripts. The Python and TypeScript scripts are type-checked against the SDK versions on SDKs. Before you run a script, set CONTEXT_BASE_URL, CONTEXT_API_KEY and AGENT_ID. IDs and times in the sample output differ on every run.
Upload a CSV, attach it to a new session, ask the agent about it, then archive the session and delete the file.
Run a session and stream its eventsSend a message and read the agent’s reply from the event stream. Then resume the stream after a disconnect, list the session’s history and archive the session.
Approve or deny tool callsRun a turn on an agent whose tools ask for permission, approve each waiting tool call, read to the end of the turn, then archive the session.