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-turn sequenceId.
  • Deciding between synchronous and streaming message delivery.
  • Handling session end reasons and submitting response feedback to Data 360.

Lifecycle Overview

  1. Start a session with an agent → receive sessionId and an initial greeting Inform message.
  2. Send messages using the sessionId. The agent tracks context across turns. Choose sync or streaming.
  3. End the session when finished (or let it time out).
  4. 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).

Quick Start (curl)

Installs
2
First Seen
Jul 29, 2026