Logo vun Xapps

Xapps

Organisatioun
Cognigy
xapps

Use when the user wants to add xApps to a Cognigy flow — interactive HTML / Adaptive Card mini-apps rendered to the user, with the submitted data flowing back into the conversation. Covers the xApp flow nodes, the Init Session rule, and accessing xApp data.

Iwwersiicht

EditeurCognigy
Repositorycognigy-plugin
Skill-Nummxapps
Stären
20
Forks
14
Matgeliwwert Fichieren
6
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 6 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum Cognigy op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Xapps an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/Cognigy/cognigy-plugin/tree/main/plugin/skills/xapps
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Cognigy/cognigy-plugin.git /tmp/cognigy-plugin
mkdir -p .claude/skills
cp -r /tmp/cognigy-plugin/plugin/skills/xapps .claude/skills/xapps
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Xapps an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Xapps automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Xapps net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

xApps

xApps are interactive in-conversation mini-apps: you render an HTML page or an Adaptive Card to the user, they interact, and their submitted data flows back into the conversation. xApps are built as flow nodes managed with manage_flow_nodes (extension @cognigy/basic-nodes).

Two hard rules

  1. xApp: Init Session (initAppSession) must run before any other xApp node. It creates the session and populates input.apps.url (session URL) and input.apps.baseUrl. Every other xApp node depends on a live session. Creating an xApp node without a preceding initAppSession in the flow returns a _hints.warning — add Init Session first.
  2. Data comes back via input/context, not a return value — see "Accessing xApp data".

Where xApp nodes go

Like all manage_flow_nodes nodes, xApp nodes live inside a tool branch — never before the AI Agent Job node (see the flow-nodes guide). "Init Session at the beginning" means the beginning of the xApp sequence inside the tool branch, not the flow's absolute start.

Typical chain inside a tool:

tool node ──appendChild──▶ initAppSession
          ──append──────▶ showXAppAdaptiveCard { waitForInput: true, storeResultInContext: true, contextKey: "result" }
          ──append──────▶ code / say  (reads context.result or input.data._cognigy._app.payload)
                          ▶ Resolve Tool Action

Workflow

1. Create a tool — create_tool { aiAgentId, toolType: 'tool', name: 'Collect Details', config: { toolId: 'collect_details', description: 'Collect details via an xApp' } } → toolNodeId
2. Init the session — manage_flow_nodes { operation: 'create', flowId, parentNodeId: '<toolNodeId>', mode: 'appendChild', nodeType: 'initAppSession', label: 'xApp: Init Session' }
3. Show a UI + wait — manage_flow_nodes { operation: 'create', flowId, parentNodeId: '<initSessionNodeId>', mode: 'append', nodeType: 'showXAppAdaptiveCard', label: 'xApp: Show Card', config: { card: { ... }, waitForInput: true, storeResultInContext: true, contextKey: 'result' } }
4. Use the result — add a code/say node after it that reads context.result or input.data._cognigy._app.payload
5. List nodes — manage_flow_nodes { operation: 'list', flowId }

To let the user open the xApp from a button (rather than an inline overlay), add a say node with a web_url button after step 2 — see "Rendering an Open-xApp button" below.

Node types

initAppSession — xApp: Init Session

Creates the session. Place first among the xApp nodes. All fields optional.

FieldTypeDescription
backgroundColor / textColorstringCSS color for the shell page
logo"default" | "none" | "custom"Shell logo. custom requires logoUrl
logoUrlstringCustom logo URL (when logo: "custom")
faviconUrlstringBrowser-tab icon URL
pageTitlestringBrowser-tab title
appLoadingText / appLaunchErrorText / appErrorTextstringScreen texts
intermediateScreenCustomizationType"none" | "override" | "app"Intermediate screen mode
intermediateScreenOverrideTextstringWhen ...Type: "override"
intermediateScreenAppTemplateId / intermediateScreenAppTemplateDatastring / objectWhen ...Type: "app"
connectionScreenCustomizationType"none" | "override" | "app"Connection screen mode
connectionScreenOverrideConnectingText / ...InvalidText / ...UnavailableTextstringWhen ...Type: "override"
connectionScreenAppTemplateId / connectionScreenAppTemplateDatastring / objectWhen ...Type: "app"
json
{
  "operation": "create",
  "flowId": "<flowId>",
  "parentNodeId": "<toolNodeId>",
  "mode": "appendChild",
  "nodeType": "initAppSession",
  "label": "xApp: Init Session",
  "config": { "pageTitle": "Booking", "logo": "default" }
}

showXAppAdaptiveCard — xApp: Show Adaptive Card

Render an Adaptive Card. card is required.

FieldTypeRequiredDescription
cardobjectYesAdaptive Card JSON (build with the Adaptive Card Designer)
primaryColor / primaryContrastColorstringNoStyle overrides
waitForInputbooleanNoPause the flow until the user submits
storeResultInContextbooleanNoStore the submit payload in context (needs waitForInput)
contextKeystringNoContext key for the result (default "result")
autoOpen, closeOnSubmit, feedbackMessage, screenTitle, sendEventOnCloseIconClick, showCloseIcon—NoWebchat v3 overlay settings
json
{
  "operation": "create",
  "flowId": "<flowId>",
  "parentNodeId": "<initSessionNodeId>",
  "mode": "append",
  "nodeType": "showXAppAdaptiveCard",
  "label": "xApp: Show Card",
  "config": {
    "card": { "type": "AdaptiveCard", "version": "1.5", "body": [{ "type": "Input.Text", "id": "nickname", "label": "Nickname" }], "actions": [{ "type": "Action.Submit", "title": "Submit" }] },
    "waitForInput": true,
    "storeResultInContext": true,
    "contextKey": "result"
  }
}

showXAppHtml — xApp: Show HTML

Render custom HTML. All fields optional (mode defaults to body).

FieldTypeDescription
mode"body" | "full"body = HTML body only (Cognigy wraps it + injects the xApp SDK). full = full HTML document (you must include the SDK yourself)
bodystringHTML body (when mode: "body")
htmlstringFull HTML document (when mode: "full")
waitForInput / storeResultInContext / contextKeyboolean / boolean / stringSame waiting behavior as above
autoOpen, closeOnSubmit, feedbackMessage, screenTitle, sendEventOnCloseIconClick, showCloseIcon—Webchat v3 overlay settings

In HTML, return data to the flow via the injected SDK global: <button onclick="SDK.submit({ variant: 'a' })">A</button>, or submit the first <form>.

setXAppState — xApp: Set State

Render a Cognigy App Template by id. appTemplateId required.

FieldTypeRequiredDescription
appTemplateIdstringYesReference id of the App Template
appTemplateDataobjectNoData passed to the template (default {})

getXAppSessionPin — xApp: Get Session PIN

No config. Populates input.apps.session.pin and the PIN page URL into input.apps.baseUrl, so the user can open the xApp on another device via a PIN.

Accessing xApp data

  • Session URL — input.apps.url. Render it as a button so the user opens the xApp with a tap instead of a bare link — see "Rendering an Open-xApp button" below.
  • Session PIN — input.apps.session.pin (after getXAppSessionPin); PIN page at input.apps.baseUrl.
  • Submitted data — input.data._cognigy._app.payload. When the show node has waitForInput + storeResultInContext, it's also written to context.<contextKey> (default context.result).

Rendering an Open-xApp button

To give the user a tappable button into the xApp (instead of a plain link), add a say node with buttons after initAppSession — the button carries {{input.apps.url}}.

Use a web_url button, not an openXApp button. The dedicated "Open xApp" button type is unreliable in practice; a plain URL button pointing at {{input.apps.url}} renders as a button and opens the xApp as expected. Set the button title to something relevant to the app ("Open booking", "Pick your seats", "Upload document", …) — not a generic "Open".

manage_flow_nodes {
  operation: 'create',
  flowId,
  parentNodeId: '<initSessionNodeId>',
  mode: 'append',
  nodeType: 'say',
  label: 'Open xApp button',
  config: {
    text: 'Tap below to get started.',
    buttons: [
      { title: 'Pick your seats', type: 'web_url', url: '{{input.apps.url}}' }
    ]
  }
}

Button config keys: title (label), type: 'web_url', url: '{{input.apps.url}}'. Order this node after initAppSession so input.apps.url is populated by the time it runs.

Use-case templates

Ready-made starting points live in templates/ next to this file. For a matching request, read the template file, then pass its contents into the node config — HTML into config.body (with mode: "body") or config.html (with mode: "full" — all HTML templates here are full documents that include the SDK, so use mode: "full"); AdaptiveCard JSON into config.card. Adapt the file to the user's specifics before sending; treat it as a scaffold, not a fixed asset.

Use-caseTemplateNodeData in (context)Result payload
Signaturetemplates/signature.htmlshowXAppHtml (mode: "full")—{ signature: "<PNG dataURL>", signed: true }
Seat pickertemplates/seat-picker.htmlshowXAppHtml (mode: "full")context.seatMap = { rows, cols, unavailable[], maxSelect? }{ seats: ["R1C4", …] }
Document uploadtemplates/document-upload.htmlshowXAppHtml (mode: "full")context.uploadConfig = { accept?, maxFiles?, maxSizeMB? }{ files: [{ name, type, size, dataUrl }] }
Google Mapstemplates/google-maps.htmlshowXAppHtml (mode: "full")context.mapConfig = { center?, zoom? }{ lat, lng, address }
Appointment bookingtemplates/appointment-booking.card.jsonshowXAppAdaptiveCard— (inputs are user-entered){ appointmentDate, appointmentTime, service, notes, action: "book" }
Order summarytemplates/order-summary.card.jsonshowXAppAdaptiveCarditems rendered into the card (see note){ confirmed: true | false }

Every use-case follows the same chain: initAppSession → show node (waitForInput: true, storeResultInContext: true, contextKey) → code/say reading the result. Pass "data in" by setting the named context key before the show node (e.g. a setSessionContext or code node populating context.seatMap); the template reads it via CognigyScript.

Per-template notes:

  • Google Maps — replace __MAPS_API_KEY__ in the HTML with the user's Google Maps JS API key (needs Maps JavaScript API + Geocoding API; restrict by HTTP referrer). No key → the map won't load. Ask the user for the key.
  • Document upload — the template submits files as base64 dataUrls (payload grows ~33%; default cap 5 MB/file). For large files, don't submit base64: add an httpRequest tool to push each file to storage and submit only the returned URL.
  • Order summary — the card ships with one placeholder item row and $0.00 totals. Populate real rows before showing it: either build the card object in a code node from context.order and pass that as config.card, or interpolate values with CognigyScript. Adaptive Cards have no loop, so dynamic item lists must be assembled in code.
  • Signature / Seat picker — self-contained, no data-in required (seat picker falls back to a 5×8 grid if context.seatMap is unset).

Prerequisite

Rendering requires an xApp-capable endpoint (Cognigy App Session Manager / Webchat v3). Node creation succeeds regardless, but the xApp only renders end-to-end on a supported endpoint.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Xapps?

Use when the user wants to add xApps to a Cognigy flow — interactive HTML / Adaptive Card mini-apps rendered to the user, with the submitted data flowing back into the conversation. Covers the xApp flow nodes, the Init Session rule, and accessing xApp data.

Firwat Xapps op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Xapps besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Xapps an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/Cognigy/cognigy-plugin/tree/main/plugin/skills/xapps an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Xapps benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Xapps benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Xapps domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Xapps gratis?

Jo. De Skill gëtt vum Cognigy ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇