OpenAI ChatKit icon

OpenAI ChatKit

Talk to Agent Builder workflows through the ChatKit beta.

Session → Create

AI-generated

Overview

This node operation creates a ChatKit session for an Agent Builder workflow. It generates a short-lived client secret tied to a specified workflow, optionally binding a user ID and forwarding metadata or session options. This is useful for initiating secure, temporary sessions to interact with workflows in applications such as chatbots or automated agents.

Use Case Examples

  1. Creating a session for a chatbot workflow to enable secure communication.
  2. Starting a session with user-specific metadata for personalized interactions.

Properties

Name Meaning
Workflow ID Specifies the Agent Builder workflow to target for session creation.
User ID Optional identifier to bind a specific user to the session.
Session Metadata (JSON) Optional JSON object containing metadata forwarded to the workflow.
Session Options (JSON) Optional advanced session options such as expiration overrides, provided as JSON.

Output

JSON

  • workflowId - The ID of the targeted workflow.
  • session
    • id - The unique identifier of the created session.
    • client_secret - The client secret for the session, partially obfuscated for security.
    • expires_at - Optional expiration timestamp of the session.
  • raw - The full raw response from the ChatKit API, useful for debugging or extended data access.

Dependencies

  • Requires an API key credential for OpenAI ChatKit API access.

Troubleshooting

  • Error if Workflow ID is missing when creating a session; ensure this is provided.
  • Invalid JSON errors if session metadata or options are malformed; verify JSON syntax.
  • API request failures may occur if credentials are missing or invalid; check API key and base URL configuration.
  • Session creation response must include session ID and client secret; if missing, the operation fails.

Discussion