Client Web SDK
Integrate an Agent with the Client SDK
Introduction
Authentication
require "openssl"
def user_id_hash
api_key = "YOUR_API_KEY" # your workspace token (keep safe!)
user_id = "YOUR_USER_ID"
# Convert your api key to bytes
key = api_key.encode("utf-8")
# Hash the message using HMAC-SHA256 and the key
hash = OpenSSL::HMAC.hexdigest('sha256', key, user_id)
endimport hashlib
def user_id_hash():
api_key = "YOUR_API_KEY" # your workspace token (keep safe!)
user_id = "YOUR_USER_ID"
key = api_key.encode('utf-8')
# Hash the message using HMAC-SHA256 and the key
hash = hmac.new(key, user_id.encode('utf-8'), hashlib.sha256).hexdigest()
return hashRunning Workflows via Client SDK
Install NPM Package
Or use the CDN
Identify the User
Private Agent
Public Agent
Use It to Execute a Workflow
Example Response
Execute a Workflow with Streaming
Pull Results Async
Chat Assistant
Example Response
Error Handling
Last updated
Was this helpful?