GTWY Embed Integration Guide
Bring the Full GTWY Experience into your App
Why redirect users to another platform when you can bring the entire GTWY experience directly inside your product?
With Embedded GTWY, you can integrate GTWY’s full interface — agents, management tools, and workflows — straight into your app or website. Your users get the same powerful AI experience without ever leaving your platform.
This guide shows you how to generate your embed token, add the script, and control the GTWY interface programmatically.
GTWY Embed Configuration
Generate an Embed Token (JWT)
To embed GTWY securely, generate a JWT token.
This token authenticates the embedded instance and ties it to your org and users.
JWT Payload Format
{
"org_id": "YOUR_ORG_ID",
"folder_id": "YOUR_FOLDER_ID",
"user_id": "YOUR_USER_ID"
}Field Explanation
org_id – Your GTWY organization’s unique ID
folder_id – The folder ID assigned for this embed
user_id – A unique identifier for the user (email, UUID, internal ID)
Signing the Token
Find your Access Key under Integration Setup
Use this key to sign the JWT payload
The signed token ensures only authorized users can load and use the embed
Embed GTWY in Your Product
Add this script wherever you want GTWY to appear:
<script
id="gtwy-main-script"
src="https://app.gtwy.ai/gtwy.js"
embedToken="YOUR_EMBED_TOKEN"
defaultOpen= "true"
></script>Script Attributes Explained
Attribute | Description |
|---|---|
id | Should always be |
embedToken | Your signed JWT token |
src | GTWY embed script URL |
defaultOpen | set “true” for default open the gtwy embed |
Here’s a real example of how viaSocket has embedded the GTWY interface inside their platform—giving users a seamless, native GTWY experience directly within their app.

Watch how to setup the GTWY Embed :
Programmatic Control
Use JavaScript to control the embed dynamically:
// Opens the embedded GTWY window
window.GtwyEmbed.open();
// Closes the embedded GTWY window
window.GtwyEmbed.close();
// Open GTWY with specific agent
window.GtwyEmbed.open({"agent_id":"your gtwy agentid"})
// create new Agent with purpose
window.GtwyEmbed.sendDataToGtwy({"agent_purpose" : "PURPOSE OF YOUR AGENT TO BE CREATED"})These methods allow you to trigger GTWY from buttons, menus, or any custom interaction.
UI Customization
window.GtwyEmbed.sendDataToGtwy({
hideHomeButton: true,
showGuide: false,
showConfigType: false,
agent_name: "New Agent",
agent_id: "your_agent_id"
});Configure Embed Options
Option | Description |
|---|---|
Show Agent Type on Create Agent | Shows available agent types (Chatbot, API, Trigger, Batch) when creating a new agent. |
Show History | Displays conversation history logs inside the embed. |
Show Config Type | Shows the configuration type (API, Chatbot, Batch API, etc.) while modifying or creating an agent. |
Hide Advanced Parameters | Hides model parameters such as creativity, tool choice, and other tuning options. |
Hide Create Agent Manually Button | Removes the manual agent creation option from the embed. |
Hide Advanced Configurations | Hides advanced settings like fallback model, guardrails, model-switching logic, etc. |
Hide Pre Tool | Hides the pre-tool configuration section. |
Default API Keys | Allows setting default API keys at the embed level for pre-configured access. |
Folder Limit Control
Limit the access available to the embed by setting a folder limit:
Folders → Actions → Set Folder Limit
Why use Embedded GTWY ?
Embedding GTWY lets you deliver AI-powered functionality inside your own application — without redirecting users elsewhere.
It’s a seamless way to:
Add custom AI agents to your app interface.
Keep users engaged within your platform.
Maintain branding and UX consistency.
Offer complete GTWY features in a single click.
Final Thoughts
Embedded GTWY turns your app, dashboard, or website into a full AI workspace.
From agent creation to real-time interaction — everything runs inside your product.
Secure. Scalable. Simple to deploy.
Your platform stays in control. GTWY takes care of the intelligence.