QApp
Source:
src/AWS/QApps/QApp.ts
An Amazon Q App — a lightweight, purpose-built AI app defined as a flow of cards (text inputs, file uploads, LLM query cards, plugin cards) running inside an Amazon Q Business application environment.
Creating Q Apps
Section titled “Creating Q Apps”Prompt-Driven Q App
import * as AWS from "alchemy/AWS";
const summarizer = yield* AWS.QApps.QApp("Summarizer", { instanceId: qbusinessApp.applicationId, description: "Summarizes pasted text", appDefinition: { cards: [ { textInput: { id: "11111111-1111-4111-8111-111111111111", title: "Source Text", type: "text-input", }, }, { qQuery: { id: "22222222-2222-4222-8222-222222222222", title: "Summary", type: "q-query", prompt: "Summarize the following text: @Source Text", }, }, ], },});File Upload Q App
const analyzer = yield* AWS.QApps.QApp("DocAnalyzer", { instanceId: qbusinessApp.applicationId, appDefinition: { initialPrompt: "Upload a document to analyze", cards: [ { fileUpload: { id: "33333333-3333-4333-8333-333333333333", title: "Document", type: "file-upload", }, }, { qQuery: { id: "44444444-4444-4444-8444-444444444444", title: "Analysis", type: "q-query", prompt: "List the key points of @Document", }, }, ], },});