Input: {"body":{"messages":[{"content":"Extract the following information from the input:\n{ \n/** The name of the feature */\nfeature?: string\n; \n/** The parent feature */\nparent?: string | null\n; \n/** The description of the feature */\ndescription?: string\n }\n====\n\n• Extract all things that looks like a Botpress feature in the provided input. You must extract a minimum of one element.\n• You may have multiple elements, or zero elements in the input.\n• You must extract each element separately.\n• Each element must be a JSON object with exactly the format: ■json_start■{ \"feature\": ..., \"parent\": ..., \"description\": ... }■json_end■\n• If there are no elements to extract, respond with ■ZERO_ELEMENTS■.\n• When you are done extracting all elements, type \"■NO_MORE_ELEMENT■\" to finish.\n• For example, if you have zero elements, the output should look like this: ■ZERO_ELEMENTS■■NO_MORE_ELEMENT■\n• For example, if you have two elements, the output should look like this: ■json_start■{ ... }■json_end■■json_start■{ ... }■json_end■■NO_MORE_ELEMENT■\n• You may ignore any fields that are not present in the input. All keys are optional.","role":"system"},{"content":"Here's an example to help you understand the format:\n\n<|start_schema|>\nArray<{ name: string, age: number }>\n<|end_schema|>\n\n<|start_instructions|>\nExtract all people\n<|end_instructions|>\n\n<|start_input|>\nThe story goes as follow.\nOnce upon a time, there was a person named Alice who was 30 years old.\nThen, there was a person named Bob who was 25 years old.\nThe end.\n<|end_input|>","role":"user","type":"text"},{"content":"■json_start■\n{\n  \"name\": \"Alice\",\n  \"age\": 30\n}\n■json_end■\n■json_start■\n{\n  \"name\": \"Bob\",\n  \"age\": 25\n}\n■json_end■■NO_MORE_ELEMENT■","role":"assistant","type":"text"},{"content":"Here's an example to help you understand the format:\n\n<|start_schema|>\n{ \n/** The name of the feature */\nfeature?: string\n; \n/** The parent feature */\nparent?: string | null\n; \n/** The description of the feature */\ndescription?: string\n }\n<|end_schema|>\n\n<|start_instructions|>\nExtract all things that looks like a Botpress feature in the provided input. You must extract a minimum of one element.\n<|end_instructions|>\n\n<|start_input|>\n`\nCreating an indexed file\n[](#creating-an-indexed-file)\nIf you need to index a file for semantic search you can use the `index` parameter when creating the file.\nJavaScript\n`const file = await client.uploadFile({\nkey: 'test.txt',\ncontent: 'This is a test file',\nindex: true,\n})\n`\nSupported file formats\n[](#supported-file-formats)\nThe following file formats are supported for indexing:\n| Format   | File Extension | MIME Type       |\n| -------- | -------------- | --------------- |\n| PDF      | .pdf           | application/pdf |\n| HTML     | .html          | text/html       |\n| Text     | .txt           | text/plain      |\n| Markdown | .md            | text/markdown   |\nNotes on indexing:\n[](#notes-on-indexing)\n* The file it will initially have a status of \"indexing\\_pending\" and will be indexed asynchronously. The time it takes to index the file will depend on the file size and the current load on the system.\n* You can check the status of the file by calling the [Get File](../docs/api-documentation/#get-file) endpoint and checking that the `file.status` property has changed to \"indexing\\_completed\".\n* If the indexing failed the status will be set to \"indexing\\_failed\" and the reason of the failure will be available in the `failedStatusReason` property of the file.\nGetting the file's metadata\n[](#getting-the-files-metadata)\nTo get the details of a file you can use the [Get File](../docs/api-documentation/#get-file) API endpoint.\nYou can also use this endpoint to retrieve a new temporary pre-signed URL to download a file if the previous pre-signed URL has already expired.\nUsing the Botpress ClientCalling the API directly\n` const file = await client.getFile('YOUR_FILE_ID')\n`\n`` const result = await fetch('https://api.botpress.cloud/v1/files/YOUR_FILE_ID', {\nmethod: 'GET',\nheaders: {\nAuthorization: `Bearer ${process.env.BOTPRESS_PAT}`,\n},\n})\nconst response = await result.json()\nconst file = response.file\n``\nListing existing files of a bot\n[](#listing-existing-files-of-a-bot)\nTo list all the files of a bot you can use the [List Files](../docs/api-documentation/#list-files) API endpoint.\nUsing the Botpress ClientCalling the API directly\n`const res = await client.listFiles()\nconst files = res.data.files\n`\n`` const result = await fetch('https://api.botpress.cloud/v1/files', {\nmethod: 'GET',\nheaders: {\nAuthorization: `Bearer ${process.env.BOTPRESS_PAT}`,\n},\n})\nconst response = await result.json()\nconst files = response.files\n``\nFiltering by tags\n[](#filtering-by-tags)\nIf you need to filter files by tags, you can just pass the `tags` parameter which should be an object with key-value pairs of tags a file must have in order to be returned. Tag filtering works in an \"AND\" fashion, so only the files that have all the specified tags will be returned.\nUsing the Botpress ClientCalling the API Directly\n`const res = await client.listFiles({\ntags: {\ncategory: 'Sales',\n},\n})\n`\n`` const tags = {\ncategory: 'Sales',\n}\nconst result = await fetch('https://api.botpress.cloud/v1/files?tags=' + encodeURIComponent(JSON.stringify(tags)), {\nmethod: 'GET',\nheaders: {\nAuthorization: `Bearer ${process.env.BOTPRESS_PAT}`,\n},\n})\n``\n> ## ���\n>\n> Calling the API Directly\n>\n> If you're making the HTTP request directly to the API please note that you'll need to pass the tags parameter as a JSON-serialized, URL-encoded string (the Botpress Client handles this automatically for you).\nPagination\n[](#pagination)\nThe [List Files](../docs/api-documentation/#list-files) API endpoint will return by default the 20 most recent files your bot has. If you need to list older files you can use the `nextToken` property returned in the API response to retrieve the next page (if any) of files. The `nextToken` will be included for each page if there are files remaining to be listed.\nFor example:\nJavaScript\n`let res = await client.listFiles()\nconst files = res.data.files\n// You can put this in a loop to retrieve all the files if needed.\nif (res.data.nextToken) {\nres = await client.listFiles({ nextToken: res.data.nextToken })\nfiles.push(...res.data.files)\n}\n`\nUpdating the file metadata\n[](#updating-the-file-metadata)\nOnly the tags and access policies of a file can be updated.\nHere's an example of how to update the access policies and tags of a file using the Botpress Client:\nUsing the Botpress ClientCalling the API Directly\n`` await client.updateFile({\nid: 'YOUR_FILE_ID',\naccessPolicies: ['integrations'], // This value will replace the existing access policies of the file.\ntags: {\n// This acts as a \"patch\" or partial update, so only the tags specified here will be updated, the rest will remain unchanged. If you need to delete an existing tag, you can set it to a `null` value.\ncategory: 'Support', // This tag will be updated.\nknowledgeBaseName: null, // This tag will be deleted.\nsubcategory: 'Technical', // This tag will be added.\n// Any other tags not specified here will remain unchanged.\n},\n})\n``\n`` await fetch(\n'https://api.botpress.cloud/v1/files/YOUR_FILE_ID',\n{\nmethod: 'PUT',\nheaders: {\nAuthorization: `Bearer ${process.env.BOTPRESS_PAT}`,\n},\nbody: {\naccessPolicies: ['integrations'], // This value will replace the existing access policies of the file.\ntags: {\n// This acts as a \"patch\" or partial update, so only the tags specified here will be updated, the rest will remain unchanged. If you need to delete an existing tag, you can set it to a `null` value.\ncategory: 'Support', // This tag will be updated.\nknowledgeBaseName: null, // This tag will be deleted.\nsubcategory: 'Technical', // This tag will be added.\n// Any other tags not specified here will remain unchanged.\n},\n},\n}\n)\n``\nUpdating file content\n[](#updating-file-content)\nIf you need to update the content of a file, you can create a new file with the updated content and then delete the old file. The file ID will change in this case.\nDeleting a file\n[](#deleting-a-file)\nTo delete a file you can use the \"Delete File\" API endpoint.\nUsing the Botpress ClientCalling the API Directly\n`await client.deleteFile('YOUR_FILE_ID')\n`\n`` await fetch('https://api.botpress.cloud/v1/files/YOUR_FILE_ID', {\nmethod: 'DELETE',\nheaders: {\nAuthorization: `Bearer ${process.env.BOTPRESS_PAT}`,\n},\n})\n``\nSearching files\n[](#searching-files)\nTo run a semantic search on your bot's files you can use the [Search Files](/api-documentation/#search-files) API endpoint. This is particularly useful for RAG (Retrieval Augmented Generation) implementations.\nUsing the Botpress ClientCalling the API Directly\n`const res = await client.searchFiles({\nquery: 'what are the most popular products of your company?', // This is the natural language query (e.g. a user's question) to be used for running a semantic search on the files of the bot.\ncontextDepth: 1, // Optional (default: 0), allows you prepend and append the surrounding context to each matching passage in the search results\ntags: {\n// Optional, allows you to only search files that match the specified tags. Useful if you only want to search a subset of the bot's files.\ncategory: 'Support',\nsubcategory: 'Technical',\n},\nlimit: 30, // Default is 20, maximum is 50 results\n})\nconst passages = res.data.passages\nfor (const passage of passages) {\n// You can use passage.content here to retrieve the content (including surrounding context, if any) of each matching passage\n}\n`\n`` const params = new URLSearchParams({\nquery: 'what are the most popular products of your company?',\ntags: JSON.stringify({\ncategory: 'Support',\nsubcategory: 'Technical',\n}),\n})\nconst result = await fetch('https://api.botpress.cloud/v1/files/search?' + params.toString(), {\nmethod: 'GET',\nheaders: {\nAuthorization: `Bearer ${process.env.BOTPRESS_PAT}`,\n},\n})\nconst response = await result.json()\nconst passages = response.passages\n``\nYou can check the [API reference](/api-documentation/#search-files) for more details on the properties available for each passage object returned in the response.\nUsing the search results for RAG\n[](#using-the-search-results-for-rag)\nYou can use the search results to provide relevant information to a chatbot for generating a response to a user's question.\nHere's an example of a simple RAG (Retrieval Augmented Generation) implementation that shows how you can use the ChatGPT large language model (through the OpenAI API) and the search results provided by our API to answer a user's question:\nJavaScript\n`` import OpenAI from 'openai' // You'll need to install this package first using your favorite package manager\nconst openai = new OpenAI({ apiKey: 'YOUR_OPENAI_API_KEY' })) // Change this for your own OpenAI API key\nconst userQuestion = 'Which are the most popular products of your company?' // This will come from the user's input\nconst res = await client.searchFiles({\nquery: userQuestion,\ncontextDepth: 1, // This number can be increased to pass more context to the model for each matching passage\n})\nconst relevantInformation = res.data.passages.map(passage => passage.content).join(\"\\n\\n----------\\n\\n\")\nconst answer = await openai.chat.completions.create({\nmodel: 'gpt-3.5-turbo', //  This can be changed for any other OpenAI model available here: https://platform.openai.com/docs/models\nmessages: [\n{\nrole: 'system',\n// You can change the text below to include any additional instructions to the model\ncontent: \"You are a helpful assistant that answers the user's question based only on the relevant information you are provided along with the question.\",\n},\n{\nrole: 'user',\ncontent: `## RELEVANT INFORMATION: \\n\\n ${relevantInformation}\\n\\n` +\n`## ANSWER THE FOLLOWING USER'S QUESTION: \\n\\n ${userQuestion}`,\n},\n],\n})\n``\nSecurity\n[](#security)\nAccess Policies\n[](#access-policies)\nA file can have a list of special access policies:\n* `public_content`: Unauthenticated users can read contents (but not metadata) of the file through a unique permanent URL provided by the API for each file. Without this policy the file URL returned by the API will be temporary and will expire after a short period of time.\n* `integrations`: Grants read, search, list access to all integrations of the bot that owns the file.\nPermissions\n[](#permissions)\n| Principal                                            | Permissions                                                                                |\n| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |\n| Public (unauthenticated/unauthorized users)          | Can only download files that have the public\\_content access policy.                                                      |\n| Bot                                                  | Owns and manages its files with full permissions to access and manage them, regardless of the user that created the file. |\n| Integration                                          | Has all permissions on the files that were created by that integration for the bot they are installed on.                 |\n| Viewer workspace member                              | Can read, search, and list all files for the bot, regardless of creator, but cannot create or delete files.               |\n| Developer, Manager or Administrator workspace member | Has all permissions on the bot's files, regardless of creator.                                                            |\n| Billing Manager workspace member                     | No permissions on files.                                                                                |\n> ## ���\n>\n> Note\n>\n> The [List Files](../docs/api-documentation/#list-files) API endpoint will filter out files that are not accessible to the user calling that API endpoint.\nPricing\n[](#pricing)\nThere are two types of storage: File Storage and Vector DB Storage. All files count toward your workspace's File Storage usage. Indexed files also count toward your workspace's Vector DB Storage usage.\nFor full details on pricing please check our [Pricing page](https://botpress.com/pricing).\nQuotas/Limits\n[](#quotaslimits)\n* Maximum file size: 100 MB\n* Rate limits: [same as all other endpoints](../docs/preventing-abuse) of our public API\n* Tags  \n   * As defined in the [Limits and Quotas of Botpress Cloud](../docs/limits-and-quotas-of-botpress-cloud)\n* Search  \n   * Query: 1 KB maximum  \n   * Maximum number of results: 50\nUpdated 2 months ago\n---\n* [Table of Contents](#)\n* * [Getting Started](#getting-started)  \n   * [Examples](#examples)  \n   * [Creating and uploading a file](#creating-and-uploading-a-file)  \n         * [In an Execute Card in your bot](#in-an-execute-card-in-your-bot)  \n         * [In a custom script using the Botpress Client](#in-a-custom-script-using-the-botpress-client)  \n         * [In a custom script using an HTTP client](#in-a-custom-script-using-an-http-client)  \n         * [Adding tags to a file](#adding-tags-to-a-file)  \n         * [Creating a public file](#creating-a-public-file)  \n         * [Creating an indexed file](#creating-an-indexed-file)  \n         * [Getting the file's metadata](#getting-the-files-metadata)  \n         * [Listing existing files of a bot](#listing-existing-files-of-a-bot)  \n         * [Updating the file metadata](#updating-the-file-metadata)  \n         * [Deleting a file](#deleting-a-file)  \n         * [Searching files](#searching-files)  \n   * [Security](#security)  \n         * [Access Policies](#access-policies)  \n         * [Permissions](#permissions)  \n   * [Pricing](#pricing)  \n   * [Quotas/Limits](#quotaslimits)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nFind\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Find\nQuickly search through your bot's content, workflows, and configurations.\n[ Suggest Edits](/edit/find)\nThe Find function in Botpress Studio is a powerful tool that helps you quickly search through your bot’s content, workflows, and configurations. It allows you to locate specific elements, such as nodes, actions, text, or variables, within your bot project, making it easier to navigate and edit complex bots.\nKey Features of the Find Function\n[](#key-features-of-the-find-function)\n* **Quick Search:** Instantly locate items like specific nodes, cards. actions, intents, or text within your flows and content.\n* **Contextual Results:** Provides contextual search results, showing where the found items are located within the bot’s structure.\n* **Navigation:** Click on a search result to jump directly to that element within the Botpress Studio.\n* **Keyword Highlighting:** Highlights occurrences of your search term in the workflows, helping you see exactly where changes are needed.\nUpdated about 1 month ago\n---\n* [Table of Contents](#)\n* * [Key Features of the Find Function](#key-features-of-the-find-function)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nHome\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Home\nDashboard in the Studio displaying your bot's global settings and instructions.\n[ Suggest Edits](/edit/home-2)\n> ## ���\n>\n> Home display\n>\n> The homepage only appears when your Start node is connected to an Autonomous Node.\n>\n> It's meant to be used alongside the Autonomous Node to manage its behaviour, global settings, and what resources or channels it has access to.\nFrom the Home menu located in the Studio, you can configure your agent's global settings. These are broken down into the following categories:\nInstructions\n[](#instructions)\nThe Instructions section is where you define the primary role or persona of your bot. This setting influences how the bot interprets and responds to user inputs by giving it a specific context or role to operate within.\n**Instruction Field**: Enter the role or persona that you want your bot to assume. For example, \"You are an IT support professional. This setting tailors the bot's responses to align with the specified role, ensuring that the bot provides relevant and context-appropriate answers.\nFor example, if you set the instruction as \"You are an IT support professional,\" the bot will prioritize technical support-related responses, guiding users through troubleshooting steps, and providing IT-related advice.\n---\nChannels\n[](#channels)\nThe Channels section allows you to enable and configure the platforms where your bot will be active. This is crucial for determining how and where users can interact with your bot.\nAvailable channels shows you which deployment channels are already active. You can add new channels by clicking on the \"+ Add channel\" button to enable additional channels for your bot. This can include other messaging platforms, social media integrations, or custom channels.\n---\nKnowledge Bases\n[](#knowledge-bases)\nThe \"Knowledge Bases\" section is where you manage the sources of information that your bot can reference to answer user questions. These sources can include documents, websites, tables, and other forms of structured or unstructured data.\nToggle the switch in this section to enable or disable the bot’s access to specific knowledge bases. You can create new Knowledge Base files directly from within this interface.\n---\nCapabilities\n[](#capabilities)\nThe \"Capabilities\" section defines the actions your bot can perform based on its enabled agents, integrations, and workflows. This provides you with an overview of all of your bot's functional abilities.\nClicking on any of the capabilities listed here, or the 'Edit Main Flow' button, will take you to the part of the workflow where you can make changes to this configuration.\n---\nAgents\n[](#agents)\nThe \"Agents\" section is where you manage Agents, the specialized modules that enhance your bot’s capabilities. These agents can provide specific functions, such as summarization or advanced knowledge querying.\nThis section lists your bot's available or enabled Agents. Click on the \"+ Add\" button to integrate new agents that provide additional functionality to your bot. This could include agents for language translation, sentiment analysis, or other specialized tasks.\nUpdated about 1 month ago\n---\n* [Table of Contents](#)\n* * [Instructions](#instructions)  \n   * [Channels](#channels)  \n   * [Knowledge Bases](#knowledge-bases)  \n   * [Capabilities](#capabilities)  \n   * [Agents](#agents)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nConversation History\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Conversation History\n[ Suggest Edits](/edit/getting-the-conversation-history-from-within-your-bot)\nBotpress Cloud provides you with several different ways to export a conversation to external services, each one has its use cases and advantages. Let's take a look at them.\nUsing the Summary Agent\n[](#using-the-summary-agent)\nThe [Summary Agent](../docs/agents#summary-agent) listens to all new messages in the conversation to build a summary and a transcript.\n* The summary is available at `conversation.SummaryAgent.summary` and contains an explanation of what happened in conversation, like \"The user asked for the opening hours and the bot answered by saying the business works 24/7\". You can choose how detailed the summary is by setting the max tokens in the Agent settings.\n* The transcript is available at `conversation.SummaryAgent.transcript` and contains the history of the conversation going back a certain amount of turns. You can set that amount of turns in the Summary Agent settings. If you set it to 0, the transcript will contain all messages.\nAdvantages\n[](#advantages)\nThe `summary` variable is useful if you don't need to have many details about the conversation, especially because some of them get lengthy and if you may not want all that data. The `transcript` variable is the best way to have the full history of the conversation in a single text without needing [Hooks](../docs/hooks) or other workarounds. Using the Summary Agent for exporting conversations is also great because you have access to the history during the very conversation so you don't need to make manual or scheduled requests to our API from external services.\nDisadvantages\n[](#disadvantages)\nThe disadvantage of using the Summary Agent for exporting conversations is that after the amount of messages surpasses the max amount of turns for the transcript, you won't have the full conversation anymore (You can mitigate this by setting the max amount to 0). Another disadvantage is that the Agent only has access to the\ncurrent session, so if the user is resuming a conversation, you won't have the previous messages in the history. To get the whole conversation at any moment, use the [API method for exporting conversations](../docs/exporting-raw-conversations-with-the-botpress-api)\nUsing Hooks\n[](#using-hooks)\n[Hooks](../docs/hooks) are functions that are executed under the hood every time there's a new message from the user or from the bot. You can create hooks that build the conversation history as it happens. They work similarly to the Summary Agent but with hooks you can customize how the history is built and there's no limitation for its size (with the exception of the 128KB max session size).\nAdvantages\n[](#advantages-1)\nThis solution is useful if you need to have all details about the conversation. It also allows you to build the history however you like - adding more information than only the message and actor.\nDisadvantages\n[](#disadvantages-1)\nThe disadvantage of using Hooks is that it requires some work to set up and you only have access to the current session, so if the user is resuming a conversation, you\nwon't have the previous messages in the history. To get the whole conversation at any moment, use the [API method for exporting conversations](../docs/exporting-raw-conversations-with-the-botpress-api)\nSetting up the Hooks\n[](#setting-up-the-hooks)\n1. Create a hook under \"Before Incoming Message\" in the \"Hooks\" section with the following code:\nJavaScript\n`` if (!event.state.session.fullHistory) {\nevent.state.session.fullHistory = ''\n}\nevent.state.session.fullHistory = event.state.session.fullHistory + `user:  ${event.payload.text}` + '\\n'\n``\n1. Create a hook under \"Before Outgoing Message\" with the following code:\nJavaScript\n`` if (!event.state.session.fullHistory) {\nevent.state.session.fullHistory = ''\n}\nevent.state.session.fullHistory = event.state.session.fullHistory + `bot: ${outgoingEvent.payload.text}` + '\\n'\n``\nSending the Conversation History\n[](#sending-the-conversation-history)\nNow that you have the conversation history, you can add an [Execute Code card](../docs/execute-code) to manipulate the variable as you prefer, for example sending it to an API or [via email](../docs/tips-tricks#send-emails-using-sendgrid-api):\nJavaScript\n`await axios.post('https://my-api-url.com', {\n// keep only the desired variable below\nconversation: event.state.session.fullHistory OR conversation.SummaryAgent.summary OR conversation.SummaryAgent.transcript\nuser: user.name\n})\n`\n> ## ���\n>\n> Info\n>\n> You could add this card to the [Conversation End](../studio/workflows/#conversation-end) workflow so that the full session is sent when the conversation ends. (The bot will only enter the End flow if there's a explicit Transition to an End node)\nUpdated about 1 month ago\n---\n* [Table of Contents](#)\n* * [Using the Summary Agent](#using-the-summary-agent)  \n         * [Advantages](#advantages)  \n         * [Disadvantages](#disadvantages)  \n   * [Using Hooks](#using-hooks)  \n         * [Advantages](#advantages-1)  \n         * [Disadvantages](#disadvantages-1)  \n         * [Setting up the Hooks](#setting-up-the-hooks)  \n   * [Sending the Conversation History](#sending-the-conversation-history)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nFlow Logic\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)  \n   * [Utilities](/docs/utilities)\n## integrations\n* [Usage](/docs/using-integrations)  \n   * [Asana](/docs/asana-integration)  \n   * [HITL](/docs/hitl-1)  \n   * [Instagram](/docs/instagram)  \n   * [Intercom](/docs/intercom)  \n   * [Line](/docs/line)  \n   * [Messenger](/docs/messenger)  \n   * [Microsoft Teams](/docs/microsoft-teams)  \n   * [Notion](/docs/notion)  \n   * [Slack](/docs/slack)  \n   * [Sunshine Conversations](/docs/sunshine-conversations)  \n   * [Telegram](/docs/telegram)  \n   * [Trello](/docs/trello)  \n   * [Twilio](/docs/twilio)  \n   * [Viber](/docs/viber)  \n   * [Vonage](/docs/vonage)  \n   * [Webhook](/docs/webhook)  \n   * [WhatsApp](/docs/whatsapp)  \n         * [Manual Configuration](/docs/manual-configuration)  \n   * [Zapier](/docs/zapier)  \n   * [Zendesk](/docs/zendesk)\n* [Building](/docs/building-integrations)  \n   * [Getting Started](/docs/getting-started-1)  \n         * [Getting Started](/docs/getting-started-1)  \n         * [Adding Messaging Channel Capabilities](/docs/adding-messaging-channel-capabilities)  \n         * [Adding Actions & Triggers to Botpress Studio](/docs/adding-actions-triggers-to-botpress-studio)  \n         * [Publish your integration on Botpress Hub](/docs/publish-your-integration-on-botpress-hub)  \n   * [Use Your Own LLM](/docs/llm-interfaces)  \n   * [Connect a live agent platform with Botpress](/docs/hitl)  \n   * [Moving Parts](/docs/moving-parts)  \n   * [CLI](/docs/cli)  \n   * [SDK](/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)\n/docs/sdk)  \n   * [Key Concepts](/docs/key-concepts)  \n         * [Architecture](/docs/architecture)  \n         * [Tags](/docs/tags)  \n         * [Channels](/docs/channels)  \n         * [Configuration](/docs/configuration)  \n         * [User](/docs/user)  \n         * [Conversations](/docs/conversations-1)  \n         * [Messages](/docs/messages)  \n         * [Event](/docs/event)  \n         * [States](/docs/states-1)  \n         * [Actions](/docs/actions)  \n         * [Definitions](/docs/definitions)  \n         * [Secrets](/docs/secrets)  \n         * [ZUI - Zod schema UI components in Botpress \\[BETA\\]](/docs/zui-zod-schema-ui-components-in-botpress)  \n   * [How to](/docs/states)  \n         * [States](/docs/states)  \n         * [Register & Unregister](/docs/register-unregister)  \n         * [Integrations Actions](/docs/integrations)  \n         * [Integration Events](/docs/integration-events)  \n         * [Handler](/docs/handler)  \n         * [Logging](/docs/logging)  \n         * [Building a Custom Integration](/docs/building-a-custom-integration)\n## Webchat\n* [Webchat](/docs/webchat)  \n   * [Webflow](/docs/webflow)  \n   * [Wix](/docs/wix)  \n   * [Wordpress](/docs/wordpress)\n* [Webchat v1 (deprecated)](/docs/web-chat-v1old)  \n   * [Controlling Web Chat using JavaScript](/docs/controlling-web-chat-using-javascript)  \n   * [Styling your webchat](/docs/chatbot-button)  \n         * [Chatbot Button](/docs/chatbot-button)  \n         * [Chat Header](/docs/chat-header)  \n         * [User Input Area](/docs/user-input-area)  \n         * [Show Bot Info](/docs/show-bot-info)  \n   * [Embedding Webchat](/docs/react-app)  \n         * [React App](/docs/react-app)  \n         * [React Native App](/docs/react-native-app)  \n         * [Web Chat Iframe](/docs/web-chat-iframe)  \n         * [Full Screen Chatbot](/docs/full-screen-chatbot)\n* [Webchat v2](/docs/embedded-webchat)  \n   * [Embedded Webchat](/docs/embedded-webchat)  \n         * [Custom CSS Reference](/docs/custom-css-reference)  \n   * [React Components](/docs/react-js)  \n   * [Webchat Client](/docs/webchat-client)\n## Botpress APIs\n* [Files API](/docs/files-api)\n* [Chat API](/docs/chat-api)\n## Appendix\n* [Safety](/docs/safety)  \n   * [Preventing Abuse](/docs/preventing-abuse)  \n   * [Brand Safety Framework](/docs/brand-safety-framework)\n* [Exporting Data](/docs/exporting-data)  \n   * [Raw Conversations](/docs/exporting-raw-conversations-with-the-botpress-api)  \n   * [Conversation History](/docs/getting-the-conversation-history-from-within-your-bot)  \n   * [Streaming Analytics](/docs/streaming-analytics-from-within-your-bot-with-hooks)  \n   * [Compiled Bot Analytics](/docs/exporting-compiled-bot-analytics-with-the-botpress-api)\nPowered by\n# Flow Logic\nCards that move the user along a defined path under certain conditions.\n[ Suggest Edits](/edit/flow-logic)\nOverview\n[](#overview)\nFlow Logic Cards are essential tools that help control the flow and decision-making within your chatbot's conversation. They enable you to add logic and structure to your bot’s behavior, making it possible to guide the conversation based on user input, bot state, or external factors.\nThese Cards allow you to create dynamic, interactive, and context-aware bots that respond intelligently to different scenarios.\nFlow Logic Card Types\n[](#flow-logic-card-types)\nThere are two default types of flow logic cards available to you in the Card Tray.\nIntent\n[](#intent)\nThe Intent Card is used to direct the conversation flow based on the user's recognized intent. Intents are predefined categories of user input that represent what the user wants to achieve, such as booking an appointment, asking for help, or providing feedback. When an Intent Card is triggered, it checks if the user’s input matches any of the defined intents and routes the conversation accordingly.\nThere are two ways to define the intent you want to trigger using this card:\n1. By selecting a predefined intent from your Library, or;\n2. By defining an inline intent that only exists for this card.\nExpression\n[](#expression)\nThe Expression Card evaluates custom expressions or conditions written in JavaScript to make decisions within the flow. This Card allows you to create more granular control based on specific criteria, such as checking variable values, user input, or any other custom logic. Expression Cards are versatile and can be used to incorporate complex decision-making within your bot.\nThere are two ways to define conditions for transition:\n1. Use AI to generate custom JavaScript based on a specific prompt, or;\n2. Disable the AI-generation tool by clicking on the star icon and manually input the JavaScript code.\n| Example           | Description                                                                                |\n| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| User Input        | To check if the user entered a value between 1 and 10, you can use \\*\\*User Input\\*\\* Example: \\*user input is between 1 & 10\\*                                                                                |\n| User Variable     | To retrieve a value from the user variable, you can use \\*\\*\\`user.{variable name}\\`\\*\\* Example: \\*user language is English\\*                                                                                |\n| Workflow Variable | To check a workflows variable, you can use \\*\\*\\`workflow.{variable name}\\`\\*\\* Example: \\*workflow variable supportEmail contains Botpress\\*                                                                    |\n| Intents           | You can combine multiple checks together, for example you can check if an intent is of type \"affirmative\", and its confidence is more than 50%.  Example: \\*intent is affirmative and intent confidence is 50%\\* |\n| Advanced          | You can use an advanced javascript expression to move from one node to the next when the expression satisfies the condition.                                                                                |\nUpdated about 1 month ago\n---\n* [Table of Contents](#)\n* * [Overview](#overview)  \n         * [Flow Logic Card Types](#flow-logic-card-types)[Jump to Content](#content)\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\n---\n[![Botpress](https://files.readme.io/c8cb63b6d586cd66085b4c960570959a424c7050c5ffeb0aeaf31711e2e1b2ac-small-BPLOGO_new_dark_1.png)](https://botpress.com)\nGuides\nMoon (Dark Mode)Sun (Light Mode)\n[Guides](/docs)[API Reference](/reference)[Changelog](/changelog)\nHome\nSearch\n## Home\n* [Botpress Documentation](/docs/home)\n## Getting Started\n* [Build](/docs/build)\n* [Deploy](/docs/deploy)\n* [Monitor](/docs/monitor)\n## DASHBOARD\n* [Workspace](/docs/workspace)  \n   * [Home](/docs/home-1)  \n   * [Members](/docs/members)  \n   * [Audits](/docs/audits)  \n   * [Your integrations](/docs/your-integrations)  \n   * [Usage](/docs/usage-2)  \n   * [Settings](/docs/settings)  \n   * [Profile Setting](/docs/user-profile)\n* [Bot](/docs/bot)  \n   * [Overview](/docs/overview-1)  \n   * [Integrations](/docs/integrations-1)  \n   * [Webchat](/docs/webchat-1)  \n   * [Logs](/docs/logs)  \n   * [Conversations](/docs/conversations)  \n   * [Analytics](/docs/analytics-1)  \n   * [Events](/docs/events-2)  \n   * [Issues](/docs/issues)  \n   * [Configuration variables](/docs/configuration-variables-1)\n## STUDIO\n* [Interface](/docs/interface)  \n   * [Nodes](/docs/nodes)  \n   * [Home](/docs/home-2)  \n   * [Flows](/docs/studio-interface-flows)  \n   * [Knowledge Base](/docs/knowledge-base)  \n   * [Tables](/docs/tables)  \n   * [Agents](/docs/agents)  \n         * [Summary Agent](/docs/summary-agent)  \n         * [Personality Agent](/docs/personality-agent)  \n         * [Policy Agent](/docs/policy-agent)  \n         * [Translator Agent](/docs/translator-agent)  \n         * [Knowledge Agent](/docs/knowledge-agent)  \n         * [HITL Agent](/docs/hitl-agent)  \n         * [Vision Agent](/docs/vision-agent)  \n         * [Analytics Agent](/docs/analytics-agent)  \n   * [Library](/docs/library)  \n   * [Hooks](/docs/hooks)  \n   * [Integrations](/docs/integrations-3)  \n   * [Schemas](/docs/schemas)  \n   * [Card Hub](/docs/card-hub)  \n   * [Versions](/docs/versions-1)  \n   * [Chatbot Settings](/docs/chatbot-settings-1)  \n   * [Find](/docs/find)  \n   * [Variables](/docs/variables)  \n   * [Card Tray](/docs/card-tray)  \n   * [Debugger, Logs & JSON](/docs/debugger-logs-json)  \n   * [Emulator](/docs/emulator)  \n   * [Keyboard Shortcuts](/docs/keyboard-shortcuts)  \n   * [Commands](/docs/studio-commands)  \n   * [Studio Preferences](/docs/studio-preferences)  \n   * [Import & Export](/docs/import-export-bots)\n* [Cards](/docs/cards)  \n   * [Send Messages](/docs/send-messages)  \n   * [Execute](/docs/execute)  \n   * [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n        \n* [Webchat](/docs/webchat-2)  \n   * [Flow Logic](/docs/flow-logic)  \n   * [AI](/docs/ai)  \n         * [AI Task](/docs/ai-task-1)  \n         * [AI Transition](/docs/ai-transition)  \n         * [AI Generate Text](/docs/ai-generate-text)  \n   * [Capture Information](/docs/capture-information)  \n   * [Events](/docs/events-3)  \n   * [Agents](/docs/agents-2)\n<|end_input|>","role":"user","type":"text"}],"meta":{"integrationName":"zai","promptCategory":"zai:zai.extract","promptSource":"zai:zai.extract:default"},"model":"fast","signal":{},"stopSequences":["■NO_MORE_ELEMENT■"]},"method":"POST","url":"https://api.botpress.cloud/v2/cognitive/generate-text"}

Output:
■json_start■{ "feature": "Creating an indexed file", "parent": null, "description": "If you need to index a file for semantic search you can use the `index` parameter when creating the file." }■json_end■
■json_start■{ "feature": "Supported file formats", "parent": null, "description": "The following file formats are supported for indexing: PDF (.pdf), HTML (.html), Text (.txt), Markdown (.md)." }■json_end■■json_start■{ "feature": "Notes on indexing", "parent": null, "description": "When a file is uploaded with indexing enabled it initially has a status of \"indexing_pending\" and will be indexed asynchronously; the status changes to \"indexing_completed\" or \"indexing_failed\"." }■json_end■
■json_start■{ "feature": "Getting the file's metadata", "parent": null, "description": "Use the Get File API endpoint to retrieve file details, including status and metadata." }■json_end■
■json_start■{ "feature": "Listing existing files of a bot", "parent": null, "description": "Use the List Files API endpoint to list all files belonging to a bot." }■json_end■
■json_start{ "feature": "Filtering by tags", "parent": null, "description": "Pass a `tags` object to filter files; filtering works in an AND fashion, returning only files that match all specified tags." }■json_end■
■json_start{ "feature": "Pagination", "parent": null, "description": "List Files returns the 20 most recent files by default; use the `nextToken` property to retrieve subsequent pages." }■json_end■
■json_start{ "feature": "Updating the file metadata", "parent": null, "description": "Only the tags and access policies of a file can be updated via the Update File API." }■json_end■
■json_start{ "feature": "Deleting a file", "parent": null, "description": "Use the Delete File API endpoint (or client.deleteFile) to remove a file." }■json_end■
■json_start{ "feature": "Searching files", "parent": null, "description": "Run a semantic search on bot files using the Search Files API endpoint, optionally filtering by tags and context depth." }■json_end■
■json_start{ "feature": "Security", "parent": null, "description": "Defines access policies and permissions for files, controlling who can read, search, list, or modify files." }■json_end■
■json_start{ "feature": "Access Policies", "parent": "Security", "description": "`public_content` allows unauthenticated users to read file contents; `integrations` grants read/search/list access to all bot integrations." }■json_end■
■json_start{ "feature": "Permissions", "parent": "Security", "description": "Specifies permissions for various principals such as Public, Bot, Integration, Viewer workspace member, Developer/Manager/Administrator, and Billing Manager." }■json_end■