Documentation Index
Fetch the complete documentation index at: https://developers.autoplay.ai/llms.txt
Use this file to discover all available pages before exploring further.
Install the SDK
Run these commands once from your project root:π₯ Step-1 Choose your existing session replay provider
PostHog
PostHog
π― Step 1 β Go to the project page in Autoplay and press βcreate one with Autoplayβ
First, you need to grab the unique IDs that tell our system who you are.- Go to app.autoplay.ai and sign up.
- Inside your dashboard, find your Product ID and API Key. Keep this page openβyou will need both of these in the next step!
π» Step 2 β Add the front end snippet to capture events
Next, we are going to add a tiny piece of tracking code (powered by PostHog) to your website. This acts as the βeyesβ that see what users are clicking on.Use your PostHog Project API Key (starts withphc_) here. Personal keys (phx_...) are admin keys and posthog.init() rejects them with personal_api_key.Copy the code snippet below into your websiteβs frontend. Make sure to replace YOUR_POSTHOG_PROJECT_API_KEY and YOUR_PRODUCT_ID with your real values.JavaScript
π Quick Tip: Once you add this code to your site, jump into our Slack workspace and drop a message in #just-integrated. We will check to make sure your data is flowing properly and help you get fully set up!
Identity plumbing for widget-based chatbots: make sure the same user identity flows across all three layers: PostHog
distinct_id / user_id, your chat widget session metadata, and the chatbot backend sender identifier. If those do not match, chat replies will look like βno recent activityβ because events are stored under one key and fetched with another.π Step 3 β Registering your product with Autoplay
Now that your website is tracking clicks, we need to create a secure βmailing addressβ (Webhook URL) and a shared secret (X-PostHog-Secret) so that data can be safely sent to Autoplay.Registration requires a valid contact email (stored on your connector product row) in addition to your product id. Existing deployments may still have older product rows without email until you re-register.Your stream consumer can pass the bearer token directly to AsyncConnectorClient(token=...) or via AUTOPLAY_APP_UNKEY_TOKEN.Create a Python file with the script below. Paste your Product ID from Step 1 into the script and run it.Python- product_id:
{product_id_entered} - webhook_url:
https://event-connector-luda.onrender.com/webhook/{product_id}
stream_url:https://event-connector-luda.onrender.com/stream/{product_id} - webhook_secret:
{secret}
unkey_key:{secret}
onboard_product registers an event_stream product. result includes your webhook, stream, and auth valuesβsave what prints in the terminal.- Step 4 (PostHog):
result.webhook_url,result.webhook_secret - Step 5 (live stream):
result.stream_url,result.unkey_key(use as Bearer)
Re-registering your product
- A second
onboard_productwith the sameproduct_idreturns 409 until overwrite is allowed. - Pass
force_reregister=True(same as CLI--force-reregister). You must still passcontact_emailon every registration, including overwrites. - After a successful overwrite, the webhook secret rotates. Update PostHog (Step 4) so
X-PostHog-Secretmatches the new secret.
π Step 4 β Set up your PostHog webhook
Now we must tell the website tracker (Step 2) to send its data to the secure address (webhook) you just generated (Step 3).You have two choices:Option A β Managed (default)- Join our Slack workspace and message
#just-integrated. - We configure the PostHog webhook for you.
- You receive a 1Password link with your Stream URL and API token for Step 5.
- In PostHog, add a Webhook destination.
- Webhook URL: paste
result.webhook_urlfrom Step 3. X-PostHog-Secretheader: pasteresult.webhook_secretfrom Step 3. Do not create a new secret.
let url := ....PostHog webhook setup walkthroughπ‘ Step 5 β Watch Your Data Arrive Live! (Receive your first event)
Everything is wired up! Letβs turn on the monitor to see a live feed of your usersβ actions.Run this final script. If you used the DIY method in Step 4, use theStream URL from Step 3 and your Unkey token. If we helped you in Slack, use the stream URL and API token from Autoplayβs 1Password handoff.Then run the script, it connects to the SSE endpoint and prints every event as it arrives.Pythonprint(...) statements. SDK callbacks still receive typed dataclasses (ActionsPayload / SummaryPayload).π Next Steps & Advanced Features
Now that your data is flowing, hereβs how to put it to work:- Typed Payloads: Explore all available fields for Actions and Summaries.
- Inject into your LLM Response: Pass real-time user events into your prompt so the LLM understands what a user just didβnot just what they asked. Most users are in the wrong part of your product when they ask for help; this is what lets your copilot bridge that gap.
- Agentic RAG: Build agents that track where a user is, where they need to be, and guide them thereββYouβve been on this page for a few minutesβhereβs where you actually need to go.β
- Async Client: Use Autoplay alongside LangChain or FastAPI.
Typed payloads
Explore all fields on ActionsPayload and SummaryPayload
RAG pipeline
Embed events into a vector store in real time
Async client
Use AsyncConnectorClient with LangChain or FastAPI
Proactive copilot
Combine real-time events, memory, and golden paths
Chatbot tutorials
Step-by-step guides for Intercom, Ada, Botpress, and more
AI agent skills
Browse, install, and download Cursor / Claude skills
extra field conventions used across the SDK, see Logging. Release history is on the Changelog.FullStory (Coming soon)
FullStory (Coming soon)
Coming soon. Join our Discord for notifications.
Datadog (Coming soon)
Datadog (Coming soon)
Coming soon. Join our Discord for notifications.
Pendo (Coming soon)
Pendo (Coming soon)
Coming soon. Join our Discord for notifications.
π€ Step-2 Choose your existing chatbot provider
Intercom
Intercom
Botpress
Botpress
Dify
Dify
Tidio
Tidio
Landbot
Landbot
Crisp AI
Crisp AI
Zendesk (Coming soon)
Zendesk (Coming soon)
Coming soon.
Rasa (Coming soon)
Rasa (Coming soon)
Coming soon.
Inkeep (Coming soon)
Inkeep (Coming soon)
Coming soon.
πΊοΈ Step-3 Choose your existing visual guidance
Pop-up tours
Userpilot
Userpilot
Chameleon
Chameleon
Userflow
Userflow
Pendo
Pendo
Usertour
Usertour
UserGuiding
UserGuiding
Told
Told
Browser agents
Browser agents (Coming soon)
Browser agents (Coming soon)
Coming soon. Join our Discord for notifications.