sf-agent-api-session-lifecycle
Installation
SKILL.md
Agent API Session Lifecycle
Use This Skill When
- Designing the full session flow: start → send messages → end, plus feedback.
- Managing
sessionId,externalSessionKey, and per-turnsequenceId. - Deciding between synchronous and streaming message delivery.
- Handling session end reasons and submitting response feedback to Data 360.
Lifecycle Overview
- Start a session with an agent → receive
sessionIdand an initial greetingInformmessage. - Send messages using the
sessionId. The agent tracks context across turns. Choose sync or streaming. - End the session when finished (or let it time out).
- Optionally submit feedback on any response.
The API supports one request at a time per session — a concurrent request returns HTTP 423 (Session Already Locked).