Using AI coding assistants to quickly build applications with Gloo AI.
These days, developers and non-developers are building apps using AI coding assistants like Claude Code, Codex, Lovable, Base44, Antigravity, and Replit Agent. This flow is sometimes called “vibe coding”, a term Andrej Karpathy coined in early 2025. Vibe coding is attractive because:
You can prototype, iterate and create full-stack applications in minutes instead of hours, days, or even weeks.
You don’t need deep expertise on UI/UX, databases, APIs, and so on.
You can focus on what you want your app to do rather than integration details.
Technical expertise is very helpful when you run into errors or need to scale your application for production environments. The right prompting techniques can help you avoid many common pitfalls.
This tutorial shows you how to use these tools to build apps with Gloo AI: how to craft effective prompts and follow best practices for production-ready apps.
Each example follows this structure, so you can adapt it to your needs.
Step 1: Understanding Prompt Structure
Every effective prompt for a Gloo AI application has five components:
Prompt part
What to include
1. Clear Objective
Start with a single sentence describing what you’re building. ❌ Bad: “Make a chat thing” ✅ Good: “Build a chat application that connects to Gloo AI with streaming responses”
2. Architecture Requirements
Specify your tech stack so the AI generates appropriate code. Frontend: React, Vue, Next.js, vanilla JavaScript Backend: Node.js/Express, serverless functions, backend functions, Python/Flask Important: Always separate frontend and backend for secure authentication
3. Authentication Flow
Always include instructions for secure API key authentication: never expose credentials in frontend code. See The authentication flow below.
4. API Interaction Details
Be specific about what the frontend sends to your backend, what your backend sends to Gloo AI (exact endpoint, headers, body), and what your backend returns to the frontend.
5. UI/UX Requirements
Describe the user experience: visual layout (chat bubbles, forms, cards), interactive elements (buttons, inputs, dropdowns), feedback mechanisms (loading states, errors, success messages) and responsive design needs.
The authentication flow
Never expose credentials in frontend code. See API Key Security for the full set of practices. The figure below shows the flow for a properly authenticated Gloo AI API call.
Every prompt must include instructions for this, for example:
Use API key authentication:1. Backend reads GLOO_API_KEY from environment variables2. Use Authorization: Bearer {GLOO_API_KEY} for all API calls3. NEVER expose GLOO_API_KEY to frontend
Practice: Before using the examples below, try writing a one-sentence objective for an app you want to build. This helps you choose the right example to start from.
Step 2: Choose Your Starting Point
Pick one of the three tested prompts below for common use cases. If you’re new to this approach, start with Example 1 (Chat Application). Each example includes:
When to use this pattern
Which platforms we’ve tested on
The complete prompt ready to copy
Example 1: Streaming chat
Example 2: Tool use
Example 3: AI Overviews
What you’ll get: A chat app with real-time, typewriter-style AI responsesWhen to use this:
Want immediate feedback as AI generates responses
Need to handle long responses gracefully
Want users to see progress in real-time
Key concept:Streaming shows response chunks as they’re generated instead of waiting for the complete response.Tested on: Antigravity, Bolt.new, Claude Code, Codex, Lovable, Replit Agent, v0.devThe Prompt:Copy the entire prompt below into your coding assistant:
# Gloo AI Streaming ChatBuild a chat app with real-time streaming responses from Gloo AI.API key authentication in backend; frontend receives SSE stream.**Auth:**Use API key authentication:1. Backend reads GLOO_API_KEY from environment variables2. Use Authorization: Bearer {GLOO_API_KEY} for all API calls3. NEVER expose GLOO_API_KEY to frontend**Streaming flow:**Frontend initiates:POST /api/chat/streamBody: { "message": "..."}Backend calls Gloo with streaming:POST https://platform.ai.gloo.com/ai/v2/guarded/chat/completionsAuthorization: Bearer {GLOO_API_KEY}Content-Type: application/jsonBody:```json{ "messages": [ { "role": "user", "content": "User's message" } ], "model": "gloo-anthropic-claude-opus-5.5", "stream": true}```Backend forwards SSE to frontend:- Parse Gloo's streaming response chunks- Forward as Server-Sent Events- Accumulate full message- Send suggestions at end**UI Requirements:**- Typewriter effect for AI responses- Cancel stream button- Smooth markdown rendering as chunks arrive- Show typing indicator
The prompt contains all five components:
Component
Where in Prompt
Example Text
1. Clear Objective
First sentence
”Build a chat app with real-time streaming responses from Gloo AI.”
2. Architecture Requirements
Second sentence
”API key authentication in backend; frontend receives SSE stream.”
3. Authentication Flow
”Auth:” section
”Use API key authentication: 1. Backend reads GLOO_API_KEY from env and sends it as a Bearer token…“
4. API Interaction Details
”Streaming flow:” section
Frontend initiates: POST /api/chat/stream Backend calls Gloo AI: POST https://.../ai/v2/guarded/chat/completions Backend forwards SSE chunks to frontend
5. UI/UX Requirements
”UI Requirements:” section
”- Typewriter effect for AI responses…”
Because each component is separate and specific, the assistant knows exactly what to build, how to structure it, how to authenticate, which APIs to call, and what the UI should look like.
What you’ll get: An application that returns structured, predictable JSON responses.When to use this:
You need consistent data formats (not free-form text)
Building forms, assessments, or data extraction tools
Need machine-readable output for downstream processing
Want type-safe responses with validation
Key concept: Tool use forces the AI to follow a JSON schema you define, perfect for applications that need predictable outputs.Tested on: Antigravity, Bolt.new, Claude Code, Codex, LovableExample Use Cases:
Personal growth plans
Recipe generation with structured ingredients
Data extraction from text into structured format
The prompt below builds a goal-setting assistant that returns a structured growth plan for a user’s goal.The Prompt:
# Gloo AI Goal-Setting AssistantBuild a goal-setting assistant that takes a user’s goal and returns astructured growth plan with actionable steps and timelines. Use GlooAI's completions with tool use feature to get structured, predictableJSON responses.**Auth:**Use API key authentication:1. Backend reads GLOO_API_KEY from environment variables2. Use Authorization: Bearer {GLOO_API_KEY} for all API calls3. NEVER expose GLOO_API_KEY to frontend**API flow:**Frontend sends:{ "goal": "User's goal or question", "toolType": "growth_plan" // or other structured output types}Backend calls Gloo with tool definition:POST https://platform.ai.gloo.com/ai/v2/guarded/chat/completionsAuthorization: Bearer {GLOO_API_KEY}Content-Type: application/jsonBody:{ "model": "gloo-anthropic-claude-opus-5.5", "messages": [ { "role": "system", "content": "You are a helpful assistant that creates personalized growth plans." }, { "role": "user", "content": "I want to grow in my faith" } ], "tools": [ { "type": "function", "function": { "name": "create_growth_plan", "description": "Generate a structured personal growth plan", "parameters": { "type": "object", "properties": { "title": { "type": "string", "description": "A clear, inspiring title for the growth plan" }, "areas": { "type": "array", "items": { "type": "object", "properties": { "area": { "type": "string", "description": "Specific area of growth" }, "actions": { "type": "array", "items": { "type": "string" }, "description": "Concrete action steps" } }, "required": ["area", "actions"] }, "description": "Different areas of growth with specific actions" }, "timeline": { "type": "string", "description": "Suggested timeline for the plan" } }, "required": ["title", "areas", "timeline"] } } } ], "tool_choice": "required" // Force AI to use the tool}Response structure:{ "id": "chatcmpl-abc123", "choices": [ { "finish_reason": "tool_calls", "index": 0, "message": { "content": null, "role": "assistant", "tool_calls": [ { "id": "call_xyz789", "type": "function", "function": { "name": "create_growth_plan", "arguments": "{\"title\":\"Faith Growth Journey\",\"areas\":[{\"area\":\"Daily Prayer\",\"actions\":[\"Set aside 15 minutes each morning\",\"Use a prayer journal\"]},{\"area\":\"Scripture Study\",\"actions\":[\"Read one chapter daily\",\"Join a Bible study group\"]}],\"timeline\":\"30 days\"}" } } ] } } ], "created": 1755118870, "model": "gloo-anthropic-claude-opus-5.5", "object": "chat.completion", "usage": { "completion_tokens": 391, "prompt_tokens": 1631, "total_tokens": 2022 }}Backend parses and returns to frontend:{ "title": "Faith Growth Journey", "areas": [ { "area": "Daily Prayer", "actions": [ "Set aside 15 minutes each morning", "Use a prayer journal" ] }, { "area": "Scripture Study", "actions": [ "Read one chapter daily", "Join a Bible study group" ] } ], "timeline": "30 days"}**UI Requirements:**- Input form for user's goal/question- Display structured output in formatted cards/sections- Show loading state during API call- Handle and display schema validation errors- Option to regenerate with different parameters- Export structured data as JSON or CSV
Try spotting the 5 prompt components in the prompt above. Hint: Look at Example 1’s breakdown.
What you’ll get: An AI Overview feature that retrieves relevant snippets and generates a grounded answer with inline citations.
You want a search-first experience with synthesized answers
You need source-aware responses with explicit citation mapping
You want a UI pattern similar to AI overview cards
Key concept: Retrieve relevant snippets first, then ground a Completions v2 response only in those sources.Tested on: Antigravity, Bolt.new, Claude Code, Codex, Lovable, Replit AgentThe Prompt:
# Gloo AI OverviewBuild an AI Overview feature that takes a user's search query, retrieves relevant faith-based content snippets, and generates a synthesized AI answer with inline source citations.- Frontend (ex: React)- Backend (ex: serverless functions or Node.js/Express)**Auth:**Use API key authentication:1. Backend reads GLOO_API_KEY from environment variables2. Use Authorization: Bearer {GLOO_API_KEY} for all API calls3. NEVER expose GLOO_API_KEY to frontend**API flow:**Frontend sends:```json{ "query": "What is my purpose in life?"}```Step 1 — Backend fetches relevant sources from Gloo:```POST https://platform.ai.gloo.com/ai/v1/data/items/recommendations/verboseAuthorization: Bearer {GLOO_API_KEY}Content-Type: application/jsonBody:{ "query": "What is my purpose in life?", "collection": "GlooProd", "tenant": "{your_tenant}", "publishers": ["{your_publisher}"], "max_snippet_count_overall": 5, "certainty_threshold": 0.5}Response structure:[ { "item_id": "...", "item_title": "Finding True Happiness", "item_url": "", "uuids": [ { "uuid": "...", "snippet": "# Finding True Happiness...", "certainty": 0.703 } ] }]Note: item_url may be empty or contain a link.```From the response, extract up to 5 sources. For each source, capture:- item_title — used for citation tooltip- item_url — used for citation link- The first snippet from uuids[] — used as context for the AIStep 2 — Backend generates a grounded AI answer:```POST https://platform.ai.gloo.com/ai/v2/guarded/chat/completionsAuthorization: Bearer {GLOO_API_KEY}Content-Type: application/jsonBody:{ "messages": [ { "role": "system", "content": "You are a helpful assistant. Answer the user's question using ONLY the provided sources. Insert a citation marker like [1], [2], etc. inline immediately after each sentence or claim that draws from a source. Use only the sources given. Be concise." }, { "role": "user", "content": "Sources:\\n[1] {item_title_1}: {snippet_1}\\n[2] {item_title_2}: {snippet_2}\\n...\\n\\nQuestion: {query}" } ], "model": "gloo-anthropic-claude-opus-5.5"}```Backend returns to frontend:```json{ "answer": "The key to happiness, from a Christian perspective, is found in a relationship with God. [1] God's grace is unconditional. [2] This lasting joy is rooted in understanding one's identity as a beloved child of God. [3]", "sources": [ { "index": 1, "title": "Finding True Happiness", "url": "https://..." }, { "index": 2, "title": "God's Unconditional Grace", "url": "https://..." }, { "index": 3, "title": "Finding Joy", "url": "https://..." } ]}```**UI Requirements:**- Display a search bar at the top with a clear (×) and submit button- Below the search bar, show an AI Overview card with: - A header row with a star/sparkle icon, the label "AI Overview" - Render the answer text with each [N] marker replaced by a URL link icon - Each link icon should be hoverable — on hover, show a tooltip with the source title and a link to url - Show a loading skeleton while waiting for the response- Display a disclaimer below the answer: "AI-generated answer. Please verify critical facts."- Show an error banner if either API call fails
Tips for your coding assistant
Each AI coding assistant has different strengths. Some pointers for getting the best results:
Use assistants like ChatGPT to create a detailed project requirements document (PRD) first. Review and split into phases for implementation.
Upload screenshots or sketches instead of describing layouts.
Stick to the tool’s default stack to avoid friction.
Use automatically created checkpoints to revert to a previous version if needed.
Iterate in small steps rather than requesting complete rewrites.
Go into plan mode before coding.
Break projects into short, reviewable steps or components.
Review results often, request refinements after each pass.
Start fresh sessions or limit irrelevant history to reduce confusion.
Be clear about what “done” means (ex: passing unit tests, zero lint errors, responsive design).
Define a high-level goal (e.g., “Implement search bar”) instead of small tasks.
Utilize Agent Manager for parallelizing and overseeing tasks.
Request Artifacts like Screenshots or Browser Recordings for verification.
Step 3: Generate Your Application
After pasting a prompt into your AI coding assistant:
1
Set up your Gloo AI credentials
Enter your Gloo AI credentials if prompted during code generation. This typically applies to coding assistants that generate code online such as Lovable and Replit Agent.
Enter your credentials as instructed after code generation. This typically applies to assistants that create code locally such as Claude Code and Codex.
These values are used in the recommendations API call.Find these values in Gloo AI Studio:
Navigate to the “Manage Organizations” page.
In your organization’s row, click on “View Publishers”.
Note the publisher name.
The tenant identifier is derived from the publisher name by removing any spaces. For example, if your publisher name is “Faith Matters,” the tenant identifier would be “FaithMatters.”
Enter the two values as environment variables or when prompted by your AI coding assistant.
3
Review the generated code
Check that API key authentication is in the backend only
Verify environment variables are properly configured
Ensure error handling is present for 401, 429, 500 errors
Confirm the API key is loaded from environment variables
4
Start the application
Online coding tools will automatically start your app in a Preview tab.For locally generated code:
Follow instructions (typically in a README) to install dependencies
Start the backend and frontend servers
Step 4: Test Your Application
Once your app is running, check that it’s working well.
Example 1: Streaming chat
Example 2: Tool use
Example 3: AI Overviews
Enter a message and ensure the results are streamed in. You should see something like this:
Streaming chat generated with Lovable
Streaming chat generated with Codex
Because these coding models are generative, the app UI varies with each run, even with identical prompts. The functionality should still match your specifications.
Enter a test goal, for example “I want to grow in faith”. You should see something similar to the following:
Tool use app generated with Bolt
Tool use app generated with Claude Code
Enter a search query (for example, “What is my purpose in life?”). Verify that:
The UI shows a loading skeleton while waiting
The answer includes inline citation markers rendered as link icons
Hovering each link icon shows the source title and link
You should see something similar to the following:
Search app generated with Replit Agent
Search app generated with Antigravity
Iterate if Needed
If something isn’t right, use follow-up prompts:
“Add error handling for network timeouts”
“Make the UI mobile-responsive”
“Add a loading skeleton instead of a spinner”
“Change the color scheme to match our brand”
Step 5: Add advanced patterns
For more complex applications, ask your AI coding assistant to implement these patterns, either in your original prompt or in a follow-up prompt.
Pattern 1: API Key Loading
Implement API key loading:- Load GLOO_API_KEY once at startup from environment variables- Reuse the same key for every API call- Never log the API key- Keep the key only in backend memory
Short version: “Load GLOO_API_KEY from environment variables and reuse it for every request”For why each of these matters, see API Key Security.
Pattern 2: Comprehensive Error Handling
Implement comprehensive error handling:401 Unauthorized:- API key invalid, missing, or revoked- Verify GLOO_API_KEY is set correctly- Return error to user (do not retry — a static key won't become valid)429 Rate Limited:- Retry only when error.retryable is true and the request is safe to repeat- Wait for Retry-After first when present; otherwise back off with jitter- At most 2 retries when a user is waiting; at most 5 requests in total for background work (see Error Handling and Retries)- Show user-friendly message about temporary limit- Queue requests if possible- Log rate limit occurrences500 Server Error:- Show user-friendly error message- Log full error details for debugging- Retry only when error.retryable is true (2013 PROVIDER_INFERENCE_ERROR is; 3001 INTERNAL_ERROR is not)- If retry fails, fail gracefullyNetwork Errors:- Retry with exponential backoff- At most 2 retries when a user is waiting; at most 5 requests in total for background work- Timeout after 30 seconds- Show connection error message
Short version: “Implement comprehensive error handling: no retry for 401; for 429, retry only when error.retryable is true, honoring Retry-After before exponential backoff”To check what the generated code does against Gloo’s retry rules, such as which errors are retryable and how to honor Retry-After, see Error Handling and Retries.
Pattern 3: Client-Side Rate Limiting
Implement client-side rate limiting:- Track requests per user in Redis or memory- Implement sliding window (e.g., 100 requests/hour per user)- Return 429 with retry-after header when limit hit- Show rate limit status in UI (e.g., "47/100 requests remaining")- Queue requests when approaching limit- Allow burst requests with token bucket algorithm
Short version: “Implement sliding window rate limiting with 100 requests per hour per user”Practice: Try adding one of these patterns to Example 1 (Chat Application) by appending the instruction to the prompt or using it in a follow-up prompt.
Troubleshooting
Common issues with these examples, and with AI coding assistants in general:
503 errors when backend calls API
Verify the endpoint being used in the code.
Provide the coding assistant with links to relevant resources, such as the API reference or related tutorial documentation.
500 errors calling completions with tool use
Verify the endpoint being used in the code.
Verify that the model being used supports tool use.
Found a better way to structure a prompt? Share it with us.
Generated an innovative application? We’d love to see it.
This is a new way to learn. Please let us know:
Which prompts worked best for you?
Which AI coding assistant you prefer?
What examples you’d like to see added?
Next steps
Congratulations! You learned how to structure effective prompts for AI coding assistants, secure your Gloo AI API calls, and test the results on example use cases.
Tutorials
Review other tutorials where you can work directly with code.
API Reference
Check out the API documentation for complete API reference.
Error Handling and Retries
Check the generated code against Gloo’s retry rules.
API Key Security
Keep your key on the server and out of source control.
⌘I
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Gloo","colors":{"primary":"#00C980","light":"#33D89A","dark":"#007A4E"},"logo":{"light":"https://mintcdn.com/gloo-b243725a/6UEVtMrmK4zuVXLK/logo/logo-gloo-studio_dark.png?fit=max\u0026auto=format\u0026n=6UEVtMrmK4zuVXLK\u0026q=85\u0026s=e55c999bcee79d2a8c71201276d7ac04","dark":"https://mintcdn.com/gloo-b243725a/6UEVtMrmK4zuVXLK/logo/logo-gloo-studio_light.png?fit=max\u0026auto=format\u0026n=6UEVtMrmK4zuVXLK\u0026q=85\u0026s=d694bd564bd25770372866144835907f"},"favicon":"https://mintcdn.com/gloo-b243725a/kKkk4V16R7WUzhYp/images/favicon.png?fit=max\u0026auto=format\u0026n=kKkk4V16R7WUzhYp\u0026q=85\u0026s=44f053bd96986ec1e7eb58d2c05b2f70","api":{"playground":{"proxy":false}},"navbar":{"links":[{"href":"/getting-started/support","label":"Get help"}],"primary":{"type":"button","label":"Gloo AI Studio","href":"https://studio.ai.gloo.com/"}},"fonts":{"heading":{"family":"F37 Jan","weight":700,"source":"fonts/f37jan/F37Jan-Bold.woff2","format":"woff2"},"body":{"family":"F37 Jan","weight":400,"source":"fonts/f37jan/F37Jan-Regular.woff2","format":"woff2"}},"contextual":{"options":["copy","claude","chatgpt"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Status","icon":"heart-pulse","href":"https://status.ai.gloo.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gloo-b243725a","hasAudioNarration":false,"actualSubdomain":"gloo-b243725a","customDomains":["docs.gloo.com"],"gitSource":{"type":"github","owner":"tangogroup","repo":"gloo","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":"","_id":"6aeb9b92936e725d0bbcad36"},"feedback":{"thumbs":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af742c93e3caf0ce37022de","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Documentation","count":67},{"language":"default","tag":"API Reference","count":48},{"language":"default","tag":"Learning Center","count":43},{"language":"default","tag":"Legacy","count":29},{"language":"default","tag":"Tutorials","count":28},{"language":"default","tag":"Responses \u0026 Completions","count":18},{"language":"default","tag":"Best Practices","count":17},{"language":"default","tag":"Inference and APIs","count":16},{"language":"default","tag":"Content","count":15},{"language":"default","tag":"Data Engine","count":13}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"snippets/forge-palette.css","content":":root{--forge-purple: #9b8ab8;--forge-blue: #7a9ab8;--forge-red: #c46060;--forge-gold: #b8a87a;--forge-green: #6aab78;--forge-orange: #d4915a;--forge-bg-page: #0a0907;--forge-bg-panel: #110f0c;--forge-bg-panel-emph: #1a1715;--forge-border: #2a2520;--forge-text-muted: #5c5450;--forge-text-body: #8a8078;--forge-text-emph: #e8e2da}.forge-diagram{color-scheme:light dark;max-width:100%;overflow:hidden}.forge-diagram-scroll{overflow-x:auto;overscroll-behavior-inline:contain}.forge-diagram__title{color:#0f172a;font-weight:700}.forge-diagram__summary{color:#334155;font-size:0.875rem;line-height:1.5rem;margin-top:0.25rem}.forge-flow{display:flex;gap:1.75rem;list-style:none;margin:1rem 0 0;min-width:max-content;overflow-x:auto;padding:0 0 0.5rem}.forge-flow__step{background:#fff;border:1px solid #cbd5e1;border-top:4px solid var(--forge-blue);border-radius:0.75rem;display:grid;gap:0.25rem;min-width:11rem;padding:1rem;position:relative}.forge-flow__step+.forge-flow__step::before{color:#64748b;content:\"→\";font-size:1.25rem;left:-1.15rem;position:absolute;top:50%;transform:translate(-50%, -50%)}.forge-flow__step strong{color:#0f172a}.forge-flow__step span{color:#334155;font-size:0.875rem}.forge-flow__step small{color:#475569}.forge-tone-workforce{border-top-color:var(--forge-purple)}.forge-tone-substrate{border-top-color:var(--forge-blue)}.forge-tone-governance{border-top-color:var(--forge-red)}.forge-tone-observability{border-top-color:var(--forge-gold)}.forge-tone-production{border-top-color:var(--forge-green)}.forge-tone-operations{border-top-color:var(--forge-orange)}html.dark .forge-diagram__title,html.dark .forge-flow__step strong{color:#fafaf9}html.dark .forge-diagram__summary,html.dark .forge-flow__step span{color:#d6d3d1}html.dark .forge-flow__step small{color:#a8a29e}html.dark .forge-flow__step{background:#151310;border-color:#57534e}@media (max-width: 640px){.forge-diagram-responsive{display:flex;min-width:max-content}}@media (forced-colors: active){.forge-diagram *{forced-color-adjust:auto}}@media (prefers-reduced-motion: reduce){.forge-diagram *,.forge-diagram *::before,.forge-diagram *::after{scroll-behavior:auto;transition:none}}"},{"filePath":"forge-api-layout.css","content":"@media (max-width: 400px){body:has(#sidebar a[aria-current=\"page\"][href^=\"/forge/\"]) .api-section-heading>div:first-child{flex-wrap:wrap;gap:0.5rem}}"}]}
{"page":{"pagePath":"tutorials/vibe-coding","slug":"/tutorials/vibe-coding","pageMetadata":{"title":"AI-Assisted Development","public":true,"description":"Using AI coding assistants to quickly build applications with Gloo AI.","href":"/tutorials/vibe-coding"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Using AI coding assistants to quickly build applications with Gloo AI.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,CardGroup,CodeBlock,Frame,Heading,Info,Note,OptimizedImage,Step,Steps,Tab,Table,Tabs,Tip}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`These days, developers and non-developers are building apps using AI coding assistants like Claude Code, Codex, Lovable, Base44, Antigravity, and Replit Agent. This flow is sometimes called “vibe coding”, a term Andrej Karpathy coined in early 2025. Vibe coding is attractive because:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`You can prototype, iterate and create full-stack applications in minutes instead of hours, days, or even weeks.`}),`\n`,_jsx(_components.li,{children:`You don’t need deep expertise on UI/UX, databases, APIs, and so on.`}),`\n`,_jsx(_components.li,{children:`You can focus on what you want your app to do rather than integration details.`}),`\n`]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`Technical expertise is very helpful when you run into errors or need to scale your application for production environments. The right prompting techniques can help you avoid many common pitfalls.`})}),`\n`,_jsx(_components.p,{children:`This tutorial shows you how to use these tools to build apps with Gloo AI: how to craft effective prompts and follow best practices for production-ready apps.`}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`Before starting, ensure you have:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`A Gloo AI Studio account`}),`\n`,_jsxs(_components.li,{children:[`Your API key from the `,_jsx(_components.a,{href:`/studio/manage-api-credentials`,children:`API Keys page`}),`. Keep it on your server and out of source control; see `,_jsx(_components.a,{href:`/best-practices/api-key-security`,children:`API Key Security`})]}),`\n`,_jsx(_components.li,{children:`Access to an AI coding assistant (Bolt.new, Lovable, Replit Agent, Claude Code, Codex, etc.)`}),`\n`,_jsx(_components.li,{children:`Basic understanding of web applications (frontend + backend)`}),`\n`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`If you prefer to code manually, start with our `,_jsx(_components.a,{href:`/tutorials/authentication`,children:`Authentication Tutorial`}),` and other hands-on tutorials.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`what-you’ll-build`,children:`What you’ll build`}),`\n`,_jsx(_components.p,{children:`One of three apps, generated by your AI coding assistant from a tested prompt:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Example`}),_jsx(_components.th,{children:`What you’ll get`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Example 1: Chat application`})}),_jsxs(_components.td,{children:[`A chat app with real-time, typewriter-style AI responses (`,_jsx(_components.a,{href:`/ai-learning-center/gloo-ai-104/streaming-responses`,children:`streaming`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Example 2: Completions with tool use`})}),_jsx(_components.td,{children:`An application that returns structured, predictable JSON responses`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Example 3: AI Overviews`})}),_jsx(_components.td,{children:`A search-first feature that retrieves relevant snippets and writes a grounded answer with inline citations`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`how-this-tutorial-works`,children:`How this tutorial works`}),`\n`,_jsxs(_components.p,{children:[`Instead of code to copy, this tutorial gives you `,_jsx(_components.strong,{children:`prompts`}),` that generate the code for you.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`The process:`})}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Choose your use case (chat app, `,_jsx(_components.a,{href:`/ai-learning-center/gloo-ai-104/tools-and-mcp`,children:`tool use`}),`, etc.)`]}),`\n`,_jsx(_components.li,{children:`Copy the prompt from this tutorial`}),`\n`,_jsx(_components.li,{children:`Paste into your AI coding assistant (Bolt.new, Lovable, Replit Agent, Claude Code, Codex, etc.)`}),`\n`,_jsx(_components.li,{children:`Generate the app`}),`\n`,_jsx(_components.li,{children:`Test and deploy the generated app`}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`What makes a good prompt:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Clear objective (what you’re building)`}),`\n`,_jsx(_components.li,{children:`Specific architecture (React, Vue, serverless, etc.)`}),`\n`,_jsx(_components.li,{children:`Complete authentication pattern (API key as Bearer token)`}),`\n`,_jsx(_components.li,{children:`Exact API endpoints and request/response formats`}),`\n`,_jsx(_components.li,{children:`UI/UX requirements (mobile-responsive, loading states, etc.)`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Each example follows this structure, so you can adapt it to your needs.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-1-understanding-prompt-structure`,children:`Step 1: Understanding Prompt Structure`}),`\n`,_jsx(_components.p,{children:`Every effective prompt for a Gloo AI application has five components:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Prompt part`}),_jsx(_components.th,{children:`What to include`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`1. Clear Objective`})}),_jsxs(_components.td,{children:[`Start with a single sentence describing what you’re building.`,_jsx(`br`,{}),`❌ Bad: “Make a chat thing”`,_jsx(`br`,{}),`✅ Good: “Build a chat application that connects to Gloo AI with streaming responses”`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`2. Architecture Requirements`})}),_jsxs(_components.td,{children:[`Specify your tech stack so the AI generates appropriate code.`,_jsx(`br`,{}),`Frontend: React, Vue, Next.js, vanilla JavaScript`,_jsx(`br`,{}),`Backend: Node.js/Express, serverless functions, backend functions, Python/Flask`,_jsx(`br`,{}),`Important: Always separate frontend and backend for secure authentication`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`3. Authentication Flow`})}),_jsxs(_components.td,{children:[`Always include instructions for secure API key authentication: never expose credentials in frontend code. See `,_jsx(_components.a,{href:`#the-authentication-flow`,children:`The authentication flow`}),` below.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`4. API Interaction Details`})}),_jsx(_components.td,{children:`Be specific about what the frontend sends to your backend, what your backend sends to Gloo AI (exact endpoint, headers, body), and what your backend returns to the frontend.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`5. UI/UX Requirements`})}),_jsx(_components.td,{children:`Describe the user experience: visual layout (chat bubbles, forms, cards), interactive elements (buttons, inputs, dropdowns), feedback mechanisms (loading states, errors, success messages) and responsive design needs.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`the-authentication-flow`,children:`The authentication flow`}),`\n`,_jsxs(_components.p,{children:[`Never expose credentials in frontend code. See `,_jsx(_components.a,{href:`/best-practices/api-key-security`,children:`API Key Security`}),` for the full set of practices. The figure below shows the flow for a properly authenticated Gloo AI API call.`]}),`\n`,_jsxs(Frame,{children:[_jsx(OptimizedImage,{className:`mint-block dark:mint-hidden`,src:`https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-light.svg?fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=3b84bda709240823f7ebb451dd892630`,alt:`Authenticated Gloo AI API flow`,\"data-og-width\":`846`,width:`846`,\"data-og-height\":`490`,height:`490`,\"data-path\":`images/vibe-coding-api-flow-light.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-light.svg?w=280\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=97259d000766baecc67dd74bb917cee3 280w, https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-light.svg?w=560\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=61991355828521a0e1428993b2903034 560w, https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-light.svg?w=840\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=28587bb43add433520c018b274124b42 840w, https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-light.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=ccb1e90d82023cc667f9de73b38857ca 1100w, https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-light.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=ba1523d87ae2281dfcd39744f3985d55 1650w, https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-light.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=d7497aab47cea9b6b3800a787797754a 2500w`}),_jsx(OptimizedImage,{className:`mint-hidden dark:mint-block`,src:`https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-dark.svg?fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=da60fcff80d46897b1290c1a69d922b4`,alt:`Authenticated Gloo AI API flow`,\"data-og-width\":`846`,width:`846`,\"data-og-height\":`490`,height:`490`,\"data-path\":`images/vibe-coding-api-flow-dark.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-dark.svg?w=280\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=f441e1afcbdf553e471e21ce42e92334 280w, https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-dark.svg?w=560\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=f88c8bce8aa897f8fc0d49db38867071 560w, https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-dark.svg?w=840\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=bc64734ae0f6ec81af7cfd53cb3d8295 840w, https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-dark.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=b10ff0347cf80d1a5012b24acbe4e4c3 1100w, https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-dark.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=b033343640c670af8706a7011556e2e5 1650w, https://mintcdn.com/gloo-b243725a/kx6hKm14xej9awIM/images/vibe-coding-api-flow-dark.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=kx6hKm14xej9awIM\u0026q=85\u0026s=348cb8d033f958e79d1059a0a46e2532 2500w`})]}),`\n`,_jsx(_components.p,{children:`Every prompt must include instructions for this, for example:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Use API key authentication:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. Backend reads GLOO_API_KEY from environment variables`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. Use Authorization: Bearer {GLOO_API_KEY} for all API calls`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`3. NEVER expose GLOO_API_KEY to frontend`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Practice:`}),` Before using the examples below, try writing a one-sentence objective for an app you want to build. This helps you choose the right example to start from.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-2-choose-your-starting-point`,children:`Step 2: Choose Your Starting Point`}),`\n`,_jsx(_components.p,{children:`Pick one of the three tested prompts below for common use cases. If you’re new to this approach, start with Example 1 (Chat Application). Each example includes:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`When to use this pattern`}),`\n`,_jsx(_components.li,{children:`Which platforms we’ve tested on`}),`\n`,_jsx(_components.li,{children:`The complete prompt ready to copy`}),`\n`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Example 1: Streaming chat`,id:`example-1%3A-streaming-chat`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What you’ll get:`}),` A chat app with real-time, typewriter-style AI responses`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`When to use this:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Want immediate feedback as AI generates responses`}),`\n`,_jsx(_components.li,{children:`Need to handle long responses gracefully`}),`\n`,_jsx(_components.li,{children:`Want users to see progress in real-time`}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Key concept:`}),` `,_jsx(_components.a,{href:`/ai-learning-center/gloo-ai-104/streaming-responses`,children:`Streaming`}),` shows response chunks as they’re generated instead of waiting for the complete response.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Tested on:`}),` Antigravity, Bolt.new, Claude Code, Codex, Lovable, Replit Agent, v0.dev`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`The Prompt:`})}),_jsx(_components.p,{children:`Copy the entire prompt below into your coding assistant:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`48`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`48`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Gloo AI Streaming Chat`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Build a chat app with real-time streaming responses from Gloo AI.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`API key authentication in backend; frontend receives SSE stream.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`**Auth:**`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Use API key authentication:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`1.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Backend reads GLOO_API_KEY from environment variables`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`2.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Use Authorization: Bearer {GLOO_API_KEY} for all API calls`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`3.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` NEVER expose GLOO_API_KEY to frontend`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`**Streaming flow:**`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Frontend initiates:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`POST /api/chat/stream`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Body: { \"message\": \"...\"}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Backend calls Gloo with streaming:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`POST https://platform.ai.gloo.com/ai/v2/guarded/chat/completions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Authorization: Bearer {GLOO_API_KEY}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Body:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```json\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"User's message\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gloo-anthropic-claude-opus-5.5\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"stream\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```\"})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Backend forwards SSE to frontend:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Parse Gloo's streaming response chunks`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Forward as Server-Sent Events`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Accumulate full message`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Send suggestions at end`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`**UI Requirements:**`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Typewriter effect for AI responses`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Cancel stream button`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Smooth markdown rendering as chunks arrive`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Show typing indicator`})]}),`\n`]})})}),_jsx(_components.p,{children:`The prompt contains all five components:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Component`}),_jsx(_components.th,{children:`Where in Prompt`}),_jsx(_components.th,{children:`Example Text`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`1. Clear Objective`})}),_jsx(_components.td,{children:`First sentence`}),_jsx(_components.td,{children:`”Build a chat app with real-time streaming responses from Gloo AI.”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`2. Architecture Requirements`})}),_jsx(_components.td,{children:`Second sentence`}),_jsx(_components.td,{children:`”API key authentication in backend; frontend receives SSE stream.”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`3. Authentication Flow`})}),_jsx(_components.td,{children:`”Auth:” section`}),_jsxs(_components.td,{children:[`”Use API key authentication:`,_jsx(`br`,{}),`1. Backend reads GLOO_API_KEY from env and sends it as a Bearer token…“`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`4. API Interaction Details`})}),_jsx(_components.td,{children:`”Streaming flow:” section`}),_jsxs(_components.td,{children:[`Frontend initiates:`,_jsx(`br`,{}),` `,_jsx(_components.code,{children:`POST /api/chat/stream`}),_jsx(`br`,{}),`Backend calls Gloo AI:`,_jsx(`br`,{}),` `,_jsx(_components.code,{children:`POST https://.../ai/v2/guarded/chat/completions`}),_jsx(`br`,{}),`Backend forwards SSE chunks to frontend`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`5. UI/UX Requirements`})}),_jsx(_components.td,{children:`”UI Requirements:” section`}),_jsx(_components.td,{children:`”- Typewriter effect for AI responses…”`})]})]})]}),_jsx(_components.p,{children:`Because each component is separate and specific, the assistant knows exactly what to build, how to structure it, how to authenticate, which APIs to call, and what the UI should look like.`})]}),_jsxs(Tab,{title:`Example 2: Tool use`,id:`example-2%3A-tool-use`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What you’ll get:`}),` An application that returns structured, predictable JSON responses.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`When to use this:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`You need consistent data formats (not free-form text)`}),`\n`,_jsx(_components.li,{children:`Building forms, assessments, or data extraction tools`}),`\n`,_jsx(_components.li,{children:`Need machine-readable output for downstream processing`}),`\n`,_jsx(_components.li,{children:`Want type-safe responses with validation`}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Key concept:`}),` Tool use forces the AI to follow a `,_jsx(_components.a,{href:`/ai-learning-center/gloo-ai-104/structured-output`,children:`JSON schema`}),` you define, perfect for applications that need predictable outputs.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Tested on:`}),` Antigravity, Bolt.new, Claude Code, Codex, Lovable`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example Use Cases:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Personal growth plans`}),`\n`,_jsx(_components.li,{children:`Recipe generation with structured ingredients`}),`\n`,_jsx(_components.li,{children:`Data extraction from text into structured format`}),`\n`]}),_jsx(_components.p,{children:`The prompt below builds a goal-setting assistant that returns a structured growth plan for a user’s goal.`}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`The Prompt:`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`149`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`149`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Gloo AI Goal-Setting Assistant`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Build a goal-setting assistant that takes a user’s goal and returns a`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`structured growth plan with actionable steps and timelines. Use Gloo`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`AI's completions with tool use feature to get structured, predictable`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`JSON responses.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`**Auth:**`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Use API key authentication:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`1.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Backend reads GLOO_API_KEY from environment variables`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`2.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Use Authorization: Bearer {GLOO_API_KEY} for all API calls`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`3.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` NEVER expose GLOO_API_KEY to frontend`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`**API flow:**`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Frontend sends:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"goal\": \"User's goal or question\",`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"toolType\": \"growth_plan\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` // or other structured output types`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Backend calls Gloo with tool definition:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`POST https://platform.ai.gloo.com/ai/v2/guarded/chat/completions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Authorization: Bearer {GLOO_API_KEY}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Body:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"model\": \"gloo-anthropic-claude-opus-5.5\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"role\": \"system\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"content\": \"You are a helpful assistant that creates personalized growth plans.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"role\": \"user\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"content\": \"I want to grow in my faith\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"tools\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"type\": \"function\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"function\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"name\": \"create_growth_plan\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"description\": \"Generate a structured personal growth plan\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"parameters\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"type\": \"object\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"title\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"type\": \"string\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"description\": \"A clear, inspiring title for the growth plan\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"areas\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"type\": \"array\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"items\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"type\": \"object\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"properties\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"area\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"type\": \"string\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"description\": \"Specific area of growth\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"actions\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"type\": \"array\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"items\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"type\": \"string\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"description\": \"Concrete action steps\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"required\": [\"area\", \"actions\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"description\": \"Different areas of growth with specific actions\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"timeline\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"type\": \"string\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"description\": \"Suggested timeline for the plan\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"required\": [\"title\", \"areas\", \"timeline\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"tool_choice\": \"required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` // Force AI to use the tool`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Response structure:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"id\": \"chatcmpl-abc123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"choices\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"finish_reason\": \"tool_calls\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"index\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"message\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"content\": null,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"role\": \"assistant\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"tool_calls\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"id\": \"call_xyz789\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"type\": \"function\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"function\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"name\": \"create_growth_plan\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"arguments\": \"{\\\\\"title\\\\\":\\\\\"Faith Growth Journey\\\\\",\\\\\"areas\\\\\":[{\\\\\"area\\\\\":\\\\\"Daily Prayer\\\\\",\\\\\"actions\\\\\":[\\\\\"Set aside 15 minutes each morning\\\\\",\\\\\"Use a prayer journal\\\\\"]},{\\\\\"area\\\\\":\\\\\"Scripture Study\\\\\",\\\\\"actions\\\\\":[\\\\\"Read one chapter daily\\\\\",\\\\\"Join a Bible study group\\\\\"]}],\\\\\"timeline\\\\\":\\\\\"30 days\\\\\"}\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"created\": 1755118870,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"model\": \"gloo-anthropic-claude-opus-5.5\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"object\": \"chat.completion\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"usage\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"completion_tokens\": 391,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"prompt_tokens\": 1631,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"total_tokens\": 2022`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Backend parses and returns to frontend:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"title\": \"Faith Growth Journey\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"areas\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"area\": \"Daily Prayer\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"actions\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"Set aside 15 minutes each morning\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"Use a prayer journal\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"area\": \"Scripture Study\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"actions\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"Read one chapter daily\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"Join a Bible study group\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"timeline\": \"30 days\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`**UI Requirements:**`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Input form for user's goal/question`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Display structured output in formatted cards/sections`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Show loading state during API call`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Handle and display schema validation errors`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Option to regenerate with different parameters`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Export structured data as JSON or CSV`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Try spotting the 5 prompt components in the prompt above. `,_jsx(_components.strong,{children:`Hint`}),`: Look at Example 1’s breakdown.`]})]}),_jsxs(Tab,{title:`Example 3: AI Overviews`,id:`example-3%3A-ai-overviews`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What you’ll get:`}),` An AI Overview feature that retrieves relevant snippets and generates a `,_jsx(_components.a,{href:`/ai-learning-center/gloo-ai-103/the-generation-step#grounded-vs-ungrounded-generation`,children:`grounded answer`}),` with inline citations.`]}),_jsx(Info,{children:_jsxs(_components.p,{children:[`This example uses `,_jsx(_components.a,{href:`/api-guides/item-recommendations`,children:`item recommendations`}),` functionality that requires your `,_jsx(_components.a,{href:`/getting-started/glossary#organization`,children:`organization`}),` to have `,_jsx(_components.a,{href:`/api-guides/content#what-is-data-engine`,children:`Data Engine`}),` access, as well as content uploaded to your content library.`]})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`When to use this:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`You want a search-first experience with synthesized answers`}),`\n`,_jsx(_components.li,{children:`You need source-aware responses with explicit citation mapping`}),`\n`,_jsx(_components.li,{children:`You want a UI pattern similar to AI overview cards`}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Key concept:`}),` Retrieve relevant snippets first, then ground a Completions v2 response only in those sources.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Tested on:`}),` Antigravity, Bolt.new, Claude Code, Codex, Lovable, Replit Agent`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`The Prompt:`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`118`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`118`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Gloo AI Overview`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Build an AI Overview feature that takes a user's search query, retrieves relevant faith-based content snippets, and generates a synthesized AI answer with inline source citations.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Frontend (ex: React)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Backend (ex: serverless functions or Node.js/Express)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`**Auth:**`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Use API key authentication:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`1.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Backend reads GLOO_API_KEY from environment variables`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`2.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Use Authorization: Bearer {GLOO_API_KEY} for all API calls`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`3.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` NEVER expose GLOO_API_KEY to frontend`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`**API flow:**`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Frontend sends:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```json\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"query\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"What is my purpose in life?\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```\"})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Step 1 — Backend fetches relevant sources from Gloo:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`POST https://platform.ai.gloo.com/ai/v1/data/items/recommendations/verbose`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Authorization: Bearer {GLOO_API_KEY}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Body:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"query\": \"What is my purpose in life?\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"collection\": \"GlooProd\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"tenant\": \"{your_tenant}\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"publishers\": [\"{your_publisher}\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"max_snippet_count_overall\": 5,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"certainty_threshold\": 0.5`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Response structure:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"item_id\": \"...\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"item_title\": \"Finding True Happiness\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"item_url\": \"\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"uuids\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"uuid\": \"...\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"snippet\": \"# Finding True Happiness...\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"certainty\": 0.703`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Note: item_url may be empty or contain a link.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```\"})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`From the response, extract up to 5 sources. For each source, capture:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` item_title — used for citation tooltip`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` item_url — used for citation link`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` The first snippet from uuids[] — used as context for the AI`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Step 2 — Backend generates a grounded AI answer:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`POST https://platform.ai.gloo.com/ai/v2/guarded/chat/completions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Authorization: Bearer {GLOO_API_KEY}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Body:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"role\": \"system\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"content\": \"You are a helpful assistant. Answer the user's question using ONLY the provided sources. Insert a citation marker like [1], [2], etc. inline immediately after each sentence or claim that draws from a source. Use only the sources given. Be concise.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"role\": \"user\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"content\": \"Sources:\\\\\\\\n[1] {item_title_1}: {snippet_1}\\\\\\\\n[2] {item_title_2}: {snippet_2}\\\\\\\\n...\\\\\\\\n\\\\\\\\nQuestion: {query}\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \"model\": \"gloo-anthropic-claude-opus-5.5\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```\"})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Backend returns to frontend:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```json\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"answer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The key to happiness, from a Christian perspective, is found in a relationship with God. [1] God's grace is unconditional. [2] This lasting joy is rooted in understanding one's identity as a beloved child of God. [3]\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sources\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Finding True Happiness\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"God's Unconditional Grace\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Finding Joy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:\"```\"})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`**UI Requirements:**`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Display a search bar at the top with a clear (×) and submit button`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Below the search bar, show an AI Overview card with:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` A header row with a star/sparkle icon, the label \"AI Overview\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Render the answer text with each [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`N`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] marker replaced by a URL link icon`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Each link icon should be hoverable — on hover, show a tooltip with the source title and a link to url`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Show a loading skeleton while waiting for the response`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Display a disclaimer below the answer: \"AI-generated answer. Please verify critical facts.\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Show an error banner if either API call fails`})]}),`\n`]})})})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`tips-for-your-coding-assistant`,children:`Tips for your coding assistant`}),`\n`,_jsx(_components.p,{children:`Each AI coding assistant has different strengths. Some pointers for getting the best results:`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Base44 / Bolt.new / Lovable / Replit Agent / v0.dev`,id:`base44-%2F-bolt-new-%2F-lovable-%2F-replit-agent-%2F-v0-dev`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Use assistants like ChatGPT to create a detailed project requirements document (PRD) first. Review and split into phases for implementation.`}),`\n`,_jsx(_components.li,{children:`Upload screenshots or sketches instead of describing layouts.`}),`\n`,_jsx(_components.li,{children:`Stick to the tool’s default stack to avoid friction.`}),`\n`,_jsx(_components.li,{children:`Use automatically created checkpoints to revert to a previous version if needed.`}),`\n`,_jsx(_components.li,{children:`Iterate in small steps rather than requesting complete rewrites.`}),`\n`]})}),_jsx(Tab,{title:`Claude Code / Codex`,id:`claude-code-%2F-codex`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Go into plan mode before coding.`}),`\n`,_jsx(_components.li,{children:`Break projects into short, reviewable steps or components.`}),`\n`,_jsx(_components.li,{children:`Review results often, request refinements after each pass.`}),`\n`,_jsx(_components.li,{children:`Start fresh sessions or limit irrelevant history to reduce confusion.`}),`\n`,_jsx(_components.li,{children:`Be clear about what “done” means (ex: passing unit tests, zero lint errors, responsive design).`}),`\n`]})}),_jsx(Tab,{title:`Antigravity`,id:`antigravity`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Define a high-level goal (e.g., “Implement search bar”) instead of small tasks.`}),`\n`,_jsx(_components.li,{children:`Utilize Agent Manager for parallelizing and overseeing tasks.`}),`\n`,_jsx(_components.li,{children:`Request Artifacts like Screenshots or Browser Recordings for verification.`}),`\n`]})})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-3-generate-your-application`,children:`Step 3: Generate Your Application`}),`\n`,_jsx(_components.p,{children:`After pasting a prompt into your AI coding assistant:`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Set up your Gloo AI credentials`,children:[_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Enter your Gloo AI credentials if prompted during code generation. This typically applies to coding assistants that generate code online such as Lovable and Replit Agent.`}),`\n`,_jsx(_components.li,{children:`Enter your credentials as instructed after code generation. This typically applies to assistants that create code locally such as Claude Code and Codex.`}),`\n`]}),_jsxs(_components.p,{children:[`Get your credentials from `,_jsx(_components.a,{href:`https://studio.ai.gloo.com/`,children:`Gloo AI Studio`}),` > API Keys.`]})]}),_jsxs(Step,{title:`Enter your publisher and tenant (Example 3 only)`,children:[_jsx(_components.p,{children:`Example 3 (Building AI Overviews) needs two more values before your app will work:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Publisher`}),` — name of your `,_jsx(_components.a,{href:`/studio/manage-publishers`,children:`publisher`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Tenant`}),` — `,_jsx(_components.a,{href:`/getting-started/glossary#tenant`,children:`tenant`}),` identifier`]}),`\n`]}),_jsx(_components.p,{children:`These values are used in the recommendations API call.`}),_jsxs(_components.p,{children:[`Find these values in `,_jsx(_components.a,{href:`https://studio.ai.gloo.com/`,children:`Gloo AI Studio`}),`:`]}),_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Navigate to the “Manage Organizations” page.`}),`\n`,_jsx(_components.li,{children:`In your organization’s row, click on “View Publishers”.`}),`\n`,_jsx(_components.li,{children:`Note the publisher name.`}),`\n`,_jsx(_components.li,{children:`The tenant identifier is derived from the publisher name by removing any spaces. For example, if your publisher name is “Faith Matters,” the tenant identifier would be “FaithMatters.”`}),`\n`]}),_jsx(_components.p,{children:`Enter the two values as environment variables or when prompted by your AI coding assistant.`})]}),_jsx(Step,{title:`Review the generated code`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Check that API key authentication is in the backend only`}),`\n`,_jsx(_components.li,{children:`Verify environment variables are properly configured`}),`\n`,_jsx(_components.li,{children:`Ensure error handling is present for 401, 429, 500 errors`}),`\n`,_jsx(_components.li,{children:`Confirm the API key is loaded from environment variables`}),`\n`]})}),_jsxs(Step,{title:`Start the application`,children:[_jsx(_components.p,{children:`Online coding tools will automatically start your app in a Preview tab.`}),_jsx(_components.p,{children:`For locally generated code:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Follow instructions (typically in a README) to install dependencies`}),`\n`,_jsx(_components.li,{children:`Start the backend and frontend servers`}),`\n`]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-4-test-your-application`,children:`Step 4: Test Your Application`}),`\n`,_jsx(_components.p,{children:`Once your app is running, check that it’s working well.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Example 1: Streaming chat`,id:`example-1%3A-streaming-chat-2`,children:[_jsx(_components.p,{children:`Enter a message and ensure the results are streamed in. You should see something like this:`}),_jsx(Frame,{caption:`Streaming chat generated with Lovable`,children:_jsx(OptimizedImage,{className:`mint-block`,src:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-lovable.png?fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=3bb10199b88ad2da25ec21bb355c4cbb`,alt:`Example 1: Streaming Chat in Action - Lovable`,\"data-og-width\":`2862`,width:`2862`,\"data-og-height\":`1803`,height:`1803`,\"data-path\":`images/vibe-coding-streaming-chat-lovable.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-lovable.png?w=280\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=5b6e6737b9d459aebf6ddaeeb1954fe5 280w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-lovable.png?w=560\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=8e362dbe418432881a054eeda7c72c0f 560w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-lovable.png?w=840\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=3c0a1be5329da91e346ea9358feee3e3 840w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-lovable.png?w=1100\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=a17aecb788c9beac8589ac9f6f5fd652 1100w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-lovable.png?w=1650\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=891d48c2c9e99260d9e8ef4141fb6dca 1650w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-lovable.png?w=2500\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=d13ad8434c38478a43db3ac0be50687c 2500w`})}),_jsx(`br`,{}),_jsx(Frame,{caption:`Streaming chat generated with Codex`,children:_jsx(OptimizedImage,{className:`mint-block`,src:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-codex.png?fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=7d3e25f158cd9e0c105fb105e50ea0f9`,alt:`Example 1: Streaming Chat in Action - Codex`,\"data-og-width\":`3367`,width:`3367`,\"data-og-height\":`1706`,height:`1706`,\"data-path\":`images/vibe-coding-streaming-chat-codex.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-codex.png?w=280\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=ea67ae817c60c3479b9e68677d872a0f 280w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-codex.png?w=560\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=f5af1a5567f3d7265e649b150c8d9d66 560w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-codex.png?w=840\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=a0f3b1aa1ed47038ecbd6f959e6a3d61 840w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-codex.png?w=1100\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=3a5477497a8917e5f204846bab977a72 1100w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-codex.png?w=1650\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=6171fbda84a393935f1f6f9dffde00e7 1650w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-streaming-chat-codex.png?w=2500\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=21ef67b63651448ffa4214aaa325101d 2500w`})}),_jsx(Note,{children:_jsx(_components.p,{children:`Because these coding models are generative, the app UI varies with each run, even with identical prompts. The functionality should still match your specifications.`})})]}),_jsxs(Tab,{title:`Example 2: Tool use`,id:`example-2%3A-tool-use-2`,children:[_jsx(_components.p,{children:`Enter a test goal, for example “I want to grow in faith”. You should see something similar to the following:`}),_jsx(Frame,{caption:`Tool use app generated with Bolt`,children:_jsx(OptimizedImage,{className:`mint-block`,src:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-bolt.png?fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=3d1f1494837913478de0de33f3061342`,alt:`Example 2: Tool Use in Action - Bolt`,\"data-og-width\":`2903`,width:`2903`,\"data-og-height\":`1753`,height:`1753`,\"data-path\":`images/vibe-coding-tool-use-bolt.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-bolt.png?w=280\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=f2cf2a13ed16fdaa0423b15416770fd3 280w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-bolt.png?w=560\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=d180a8d341b911a7124175995ac3c908 560w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-bolt.png?w=840\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=e3e8740efe06d25901fea6fe77b9aa63 840w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-bolt.png?w=1100\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=459169c092660ab388dec7db32bd4b86 1100w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-bolt.png?w=1650\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=e0a615c84a16238fc4b50cf1da6a15da 1650w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-bolt.png?w=2500\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=94f9351405eeb0d5e7c197010b3dddd3 2500w`})}),_jsx(Frame,{caption:`Tool use app generated with Claude Code`,children:_jsx(OptimizedImage,{className:`mint-block`,src:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-claude-code.png?fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=7ef4179ccfbd439c12af5508b4f8e3c6`,alt:`Example 2: Tool Use in Action - Claude Code`,\"data-og-width\":`3285`,width:`3285`,\"data-og-height\":`1703`,height:`1703`,\"data-path\":`images/vibe-coding-tool-use-claude-code.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-claude-code.png?w=280\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=99c20c284b38df646a0e19fb5051f80e 280w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-claude-code.png?w=560\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=fa2c5130aa1b9c089a56e26243903dc1 560w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-claude-code.png?w=840\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=7a2f93b8c8ce1077d40acbcfbdc88706 840w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-claude-code.png?w=1100\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=06c2f763cc137ca9c0cfa86faa41d4bc 1100w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-claude-code.png?w=1650\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=a0fa471e40d6ec414a200455bd1e1bf0 1650w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-tool-use-claude-code.png?w=2500\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=8f4f07195ed5bb2cbd30836860575ec1 2500w`})})]}),_jsxs(Tab,{title:`Example 3: AI Overviews`,id:`example-3%3A-ai-overviews-2`,children:[_jsx(_components.p,{children:`Enter a search query (for example, “What is my purpose in life?”). Verify that:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The UI shows a loading skeleton while waiting`}),`\n`,_jsx(_components.li,{children:`The answer includes inline citation markers rendered as link icons`}),`\n`,_jsx(_components.li,{children:`Hovering each link icon shows the source title and link`}),`\n`]}),_jsx(_components.p,{children:`You should see something similar to the following:`}),_jsx(Frame,{caption:`Search app generated with Replit Agent`,children:_jsx(OptimizedImage,{className:`mint-block`,src:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-replit.png?fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=9d0eed3ce8a335fac186f4cc7ee97d55`,alt:`Example 3: Search in Action - Replit Agent`,\"data-og-width\":`1362`,width:`1362`,\"data-og-height\":`748`,height:`748`,\"data-path\":`images/vibe-coding-search-replit.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-replit.png?w=280\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=091d6a53751a5528a4ed4f3d72890f6a 280w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-replit.png?w=560\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=475b4843f7ba091f9637820b95298179 560w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-replit.png?w=840\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=c88e2508a9bf6edb00ae067901ab8198 840w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-replit.png?w=1100\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=e3f959e6a460454110f02aff4e20d868 1100w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-replit.png?w=1650\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=273ac3b8a71b878d2cd0c1928329184c 1650w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-replit.png?w=2500\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=43758347318b42d548dec1d72438c4b8 2500w`})}),_jsx(Frame,{caption:`Search app generated with Antigravity`,children:_jsx(OptimizedImage,{className:`mint-block`,src:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-antigravity.png?fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=635784f860d648acf9581c0e657f05fa`,alt:`Example 3: Search in Action - Antigravity`,\"data-og-width\":`1781`,width:`1781`,\"data-og-height\":`854`,height:`854`,\"data-path\":`images/vibe-coding-search-antigravity.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-antigravity.png?w=280\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=6e67ed04e0000d365e27f1fc256c65be 280w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-antigravity.png?w=560\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=a0f890f1e4cf458c4eb202da883dc24e 560w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-antigravity.png?w=840\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=4c9c96c2597bcf5826e95e25ef24de49 840w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-antigravity.png?w=1100\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=7a46d409fc70144baf79f9ba09402fa2 1100w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-antigravity.png?w=1650\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=80ca0d80f43291dccadc85dfc1cc7768 1650w, https://mintcdn.com/gloo-b243725a/jE9dQaM0JjfzD3rz/images/vibe-coding-search-antigravity.png?w=2500\u0026fit=max\u0026auto=format\u0026n=jE9dQaM0JjfzD3rz\u0026q=85\u0026s=933e20bffcdda8ec8b7d5425a7aec430 2500w`})})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`iterate-if-needed`,children:`Iterate if Needed`}),`\n`,_jsx(_components.p,{children:`If something isn’t right, use follow-up prompts:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`“Add error handling for network timeouts”`}),`\n`,_jsx(_components.li,{children:`“Make the UI mobile-responsive”`}),`\n`,_jsx(_components.li,{children:`“Add a loading skeleton instead of a spinner”`}),`\n`,_jsx(_components.li,{children:`“Change the color scheme to match our brand”`}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`step-5-add-advanced-patterns`,children:`Step 5: Add advanced patterns`}),`\n`,_jsx(_components.p,{children:`For more complex applications, ask your AI coding assistant to implement these patterns, either in your original prompt or in a follow-up prompt.`}),`\n`,_jsx(Heading,{level:`3`,id:`pattern-1-api-key-loading`,children:`Pattern 1: API Key Loading`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Implement API key loading:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Load GLOO_API_KEY once at startup from environment variables`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Reuse the same key for every API call`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Never log the API key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Keep the key only in backend memory`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Short version:`}),` “Load GLOO_API_KEY from environment variables and reuse it for every request”`]}),`\n`,_jsxs(_components.p,{children:[`For why each of these matters, see `,_jsx(_components.a,{href:`/best-practices/api-key-security`,children:`API Key Security`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`pattern-2-comprehensive-error-handling`,children:`Pattern 2: Comprehensive Error Handling`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`26`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`26`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Implement comprehensive error handling:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`401 Unauthorized:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` API key invalid, missing, or revoked`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Verify GLOO_API_KEY is set correctly`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Return error to user (do not retry — a static key won't become valid)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`429 Rate Limited:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Retry only when error.retryable is true and the request is safe to repeat`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Wait for Retry-After first when present; otherwise back off with jitter`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` At most 2 retries when a user is waiting; at most 5 requests in total for background work (see Error Handling and Retries)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Show user-friendly message about temporary limit`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Queue requests if possible`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Log rate limit occurrences`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`500 Server Error:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Show user-friendly error message`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Log full error details for debugging`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Retry only when error.retryable is true (2013 PROVIDER_INFERENCE_ERROR is; 3001 INTERNAL_ERROR is not)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` If retry fails, fail gracefully`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Network Errors:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Retry with exponential backoff`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` At most 2 retries when a user is waiting; at most 5 requests in total for background work`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Timeout after 30 seconds`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Show connection error message`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Short version:`}),` “Implement comprehensive error handling: no retry for 401; for 429, retry only when error.retryable is true, honoring Retry-After before exponential backoff”`]}),`\n`,_jsxs(_components.p,{children:[`To check what the generated code does against Gloo’s retry rules, such as which errors are retryable and how to honor `,_jsx(_components.code,{children:`Retry-After`}),`, see `,_jsx(_components.a,{href:`/best-practices/error-handling-and-retries`,children:`Error Handling and Retries`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`pattern-3-client-side-rate-limiting`,children:`Pattern 3: Client-Side Rate Limiting`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Implement client-side rate limiting:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Track requests per user in Redis or memory`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Implement sliding window (e.g., 100 requests/hour per user)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Return 429 with retry-after header when limit hit`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Show rate limit status in UI (e.g., \"47/100 requests remaining\")`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Queue requests when approaching limit`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Allow burst requests with token bucket algorithm`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Short version:`}),` “Implement sliding window rate limiting with 100 requests per hour per user”`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Practice:`}),` Try adding one of these patterns to Example 1 (Chat Application) by appending the instruction to the prompt or using it in a follow-up prompt.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsx(_components.p,{children:`Common issues with these examples, and with AI coding assistants in general:`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`503 errors when backend calls API`,id:`503-errors-when-backend-calls-api`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Verify the endpoint being used in the code.`}),`\n`,_jsx(_components.li,{children:`Provide the coding assistant with links to relevant resources, such as the API reference or related tutorial documentation.`}),`\n`]})}),_jsx(Accordion,{title:`500 errors calling completions with tool use`,id:`500-errors-calling-completions-with-tool-use`,children:_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Verify the endpoint being used in the code.`}),`\n`,_jsx(_components.li,{children:`Verify that the model being used supports tool use.`}),`\n`,_jsxs(_components.li,{children:[`Try the API call directly in `,_jsx(_components.a,{href:`/api-reference/completions/v2`,children:`the playground`}),`.`]}),`\n`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`give-us-feedback`,children:`Give us feedback`}),`\n`,_jsx(_components.p,{children:`We’d love to hear from you:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Found a better way to structure a prompt? Share it with us.`}),`\n`,_jsx(_components.li,{children:`Generated an innovative application? We’d love to see it.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`This is a new way to learn. Please let us know:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Which prompts worked best for you?`}),`\n`,_jsx(_components.li,{children:`Which AI coding assistant you prefer?`}),`\n`,_jsx(_components.li,{children:`What examples you’d like to see added?`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsx(_components.p,{children:`Congratulations! You learned how to structure effective prompts for AI coding assistants, secure your Gloo AI API calls, and test the results on example use cases.`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Tutorials`,icon:`code`,href:`/tutorials/overview`,children:_jsx(_components.p,{children:`Review other tutorials where you can work directly with code.`})}),_jsx(Card,{title:`API Reference`,icon:`book`,href:`/api-reference/general/overview`,children:_jsx(_components.p,{children:`Check out the API documentation for complete API reference.`})}),_jsx(Card,{title:`Error Handling and Retries`,icon:`life-ring`,href:`/best-practices/error-handling-and-retries`,children:_jsx(_components.p,{children:`Check the generated code against Gloo’s retry rules.`})}),_jsx(Card,{title:`API Key Security`,icon:`shield-check`,href:`/best-practices/api-key-security`,children:_jsx(_components.p,{children:`Keep your key on the server and out of source control.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"AI-Assisted Development","public":true,"description":"Using AI coding assistants to quickly build applications with Gloo AI.","href":"/tutorials/vibe-coding"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"What you’ll build","slug":"what-you’ll-build","depth":2,"children":[{"title":"How this tutorial works","slug":"how-this-tutorial-works","depth":3,"children":[]}]},{"title":"Step 1: Understanding Prompt Structure","slug":"step-1-understanding-prompt-structure","depth":2,"children":[{"title":"The authentication flow","slug":"the-authentication-flow","depth":3,"children":[]}]},{"title":"Step 2: Choose Your Starting Point","slug":"step-2-choose-your-starting-point","depth":2,"children":[{"title":"Tips for your coding assistant","slug":"tips-for-your-coding-assistant","depth":3,"children":[]}]},{"title":"Step 3: Generate Your Application","slug":"step-3-generate-your-application","depth":2,"children":[]},{"title":"Step 4: Test Your Application","slug":"step-4-test-your-application","depth":2,"children":[{"title":"Iterate if Needed","slug":"iterate-if-needed","depth":3,"children":[]}]},{"title":"Step 5: Add advanced patterns","slug":"step-5-add-advanced-patterns","depth":2,"children":[{"title":"Pattern 1: API Key Loading","slug":"pattern-1-api-key-loading","depth":3,"children":[]},{"title":"Pattern 2: Comprehensive Error Handling","slug":"pattern-2-comprehensive-error-handling","depth":3,"children":[]},{"title":"Pattern 3: Client-Side Rate Limiting","slug":"pattern-3-client-side-rate-limiting","depth":3,"children":[]}]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]},{"title":"Give us feedback","slug":"give-us-feedback","depth":2,"children":[]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"dynamicCss":".mint-block {\n display: block\n}\n.mint-hidden {\n display: none\n}\n.dark\\:mint-block:is(.dark *) {\n display: block\n}\n.dark\\:mint-hidden:is(.dark *) {\n display: none\n}","subdomain":"gloo-b243725a","siteName":"Gloo","title":"AI-Assisted Development - Gloo","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-11T20:26:44.453Z","originalFileLocation":"tutorials/vibe-coding.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Using AI coding assistants to quickly build applications with Gloo AI.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Gloo\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gloo-b243725a/E9tcQ27KykgznjKS/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/gloo-b243725a/E9tcQ27KykgznjKS/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gloo-b243725a/E9tcQ27KykgznjKS/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gloo-b243725a/E9tcQ27KykgznjKS/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gloo-b243725a/E9tcQ27KykgznjKS/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gloo-b243725a/E9tcQ27KykgznjKS/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gloo-b243725a/E9tcQ27KykgznjKS/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/gloo-b243725a/E9tcQ27KykgznjKS/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/gloo-b243725a/E9tcQ27KykgznjKS/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"AI-Assisted Development - Gloo\">\u003cmeta data-mint-head property=\"og:description\" content=\"Using AI coding assistants to quickly build applications with Gloo AI.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Gloo\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gloo.com/tutorials/vibe-coding\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gloo-b243725a.mintlify.site/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=AI-Assisted+Development\u0026amp;description=Using+AI+coding+assistants+to+quickly+build+applications+with+Gloo+AI.\u0026amp;theme=497206027fd8620dc19fa877\u0026amp;signature=635f63d27c2afa229883f7fbbb26d2f48619ac0d48771c32366046add4dc432c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"AI-Assisted Development - Gloo\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Using AI coding assistants to quickly build applications with Gloo AI.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gloo-b243725a.mintlify.site/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=AI-Assisted+Development\u0026amp;description=Using+AI+coding+assistants+to+quickly+build+applications+with+Gloo+AI.\u0026amp;theme=497206027fd8620dc19fa877\u0026amp;signature=635f63d27c2afa229883f7fbbb26d2f48619ac0d48771c32366046add4dc432c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/gloo-b243725a/E9tcQ27KykgznjKS/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Gloo\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#00C980\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gloo.com/tutorials/vibe-coding\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/tutorials/vibe-coding.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gloo.com/#organization\",\"name\":\"Gloo\",\"url\":\"https://docs.gloo.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gloo-b243725a/6UEVtMrmK4zuVXLK/logo/logo-gloo-studio_dark.png?fit=max\u0026auto=format\u0026n=6UEVtMrmK4zuVXLK\u0026q=85\u0026s=e55c999bcee79d2a8c71201276d7ac04\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gloo.com#website\",\"name\":\"Gloo\",\"url\":\"https://docs.gloo.com\",\"publisher\":{\"@id\":\"https://docs.gloo.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gloo.com/tutorials/vibe-coding#webpage\",\"url\":\"https://docs.gloo.com/tutorials/vibe-coding\",\"name\":\"AI-Assisted Development\",\"description\":\"Using AI coding assistants to quickly build applications with Gloo AI.\",\"dateModified\":\"2026-11-11T20:26:44.453Z\",\"isPartOf\":{\"@id\":\"https://docs.gloo.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gloo.com/tutorials/vibe-coding#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gloo.com/tutorials/vibe-coding#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get Started\",\"item\":\"https://docs.gloo.com/tutorials/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI-Assisted Development\",\"item\":\"https://docs.gloo.com/tutorials/vibe-coding\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.gloo.com/tutorials/vibe-coding#article\",\"headline\":\"AI-Assisted Development\",\"name\":\"AI-Assisted Development\",\"description\":\"Using AI coding assistants to quickly build applications with Gloo AI.\",\"url\":\"https://docs.gloo.com/tutorials/vibe-coding\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gloo.com/tutorials/vibe-coding#webpage\"},\"dateModified\":\"2026-11-11T20:26:44.453Z\",\"publisher\":{\"@id\":\"https://docs.gloo.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gloo.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Gloo\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Gloo\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/tutorials/vibe-coding.md","siteName":"Gloo","nav":{"global":{"anchors":[{"anchor":"Status","icon":"heart-pulse","href":"https://status.ai.gloo.com"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/getting-started/overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/general/overview"}]},{"tab":"Tutorials","groups":[{"group":"Get Started","public":true,"pages":[{"title":"Tutorials Overview","sidebarTitle":"Overview","href":"/tutorials/overview"},{"title":"Authentication with Gloo AI","description":"Learn how to authenticate with the Gloo AI API using an API key.","href":"/tutorials/authentication"},{"title":"AI-Assisted Development","public":true,"href":"/tutorials/vibe-coding"}]},{"group":"Responses \u0026 Completions","public":true,"pages":[{"title":"Build with Direct Responses","description":"Make your first Direct Responses call, choose a model from the live catalog, stream answers, hold a multi-turn conversation, and let the model call one of your functions.","href":"/tutorials/direct-responses"},{"title":"Using the Guarded Responses API","href":"/tutorials/responses"},{"title":"Understand Images with Claude","sidebarTitle":"Understand Images","href":"/tutorials/understand-images"},{"title":"Answer from your content with Grounded Responses","href":"/tutorials/grounded-responses"},{"title":"Use Claude through the Anthropic Messages endpoint","sidebarTitle":"Anthropic Messages","href":"/tutorials/anthropic-messages"},{"title":"Control reasoning effort","sidebarTitle":"Reasoning","href":"/tutorials/reasoning"},{"title":"Using the Completions API","href":"/tutorials/completions-v2"},{"title":"Streaming AI Responses in Real Time","href":"/tutorials/completions-streaming"},{"title":"Completions with Tool Use","href":"/tutorials/completions-tool-use"},{"title":"Building a Knowledge-Grounded Chatbot with RAG","href":"/tutorials/completions-grounded"},{"title":"Working with Bible Translations, Reliably","href":"/tutorials/bible-translation"}]},{"group":"Production","public":true,"pages":[{"title":"Cut Cost and Latency with Prompt Caching","sidebarTitle":"Prompt Caching","href":"/tutorials/prompt-caching"},{"title":"Build a Resilient Client","sidebarTitle":"Resilient Client","href":"/tutorials/resilient-client"}]},{"group":"Content","public":true,"pages":[{"title":"Upload Files to Data Engine","href":"/tutorials/upload-files"},{"group":"Build an End-to-End RAG Pipeline","public":true,"pages":[{"title":"Part 1: Set Up the Pipeline","href":"/tutorials/rag-pipeline-part-1"},{"title":"Part 2: Content Lifecycle","href":"/tutorials/rag-pipeline-part-2"},{"title":"Part 3: Verification, Error Handling \u0026 Resilience","href":"/tutorials/rag-pipeline-part-3"}]}]},{"group":"Search \u0026 Recommendations","public":true,"pages":[{"title":"Building Custom Search with the Search API","href":"/tutorials/search"},{"title":"Building Custom Recommendations","href":"/tutorials/recommendations"}]},{"group":"Embeddings","public":true,"pages":[{"title":"Semantic Search with the Embeddings API","href":"/tutorials/embeddings"}]},{"group":"Decisions","public":true,"pages":[{"title":"Triage Support Tickets with System One","sidebarTitle":"System One Decisions","href":"/tutorials/system-one"},{"title":"System One Examples","sidebarTitle":"System One Examples","href":"/tutorials/system-one-examples"}]},{"group":"Legacy","public":true,"pages":[{"title":"Using the Completions V1 API (Deprecated)","href":"/tutorials/completions-v1"},{"title":"Building Interactive Chat (Retired)","href":"/tutorials/chat"},{"title":"Realtime Upload (Deprecated)","href":"/tutorials/realtime-ingestion"}]}]},{"tab":"Best Practices","pages":[{"title":"Best Practices","href":"/best-practices/overview"}]},{"tab":"Learning Center","pages":[{"title":"Learning Center","href":"/ai-learning-center/gloo-ai-101/ai-overview"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]},{"tab":"Forge Platform","icon":"layer-group","hidden":true,"pages":[{"title":"Forge Platform","href":"/forge"}]},{"tab":"Forge API","icon":"code","hidden":true,"pages":[{"title":"Forge API","href":"/forge/reference"}]},{"tab":"Forge Console","icon":"display","hidden":true,"pages":[{"title":"Forge Console","href":"/forge/console"}]}]},"basePath":"","title":"AI-Assisted Development - Gloo","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-D0FT0qQs.js","DynamicMarkdown-CQM9Bhbv.js","zoom-image-lightbox-BQ4tbj_9.js","lightbox-handle-r17bVUz3.js"]}