Skip to main content

App > Design > AI > BrainBot Context

Provide custom context that guides BrainBot's responses to your team members

Written by Jason Liang

The App > Design > AI > BrainBot Context page lets you supply BrainBot — brainCloud's built-in AI assistant — with custom background information about your app. When a team member asks BrainBot a question in the portal, BrainBot incorporates this context into its response. Without custom context, BrainBot answers using only its general brainCloud knowledge; with it, responses can be tailored to your specific game, architecture, and operational guidelines.

What Is BrainBot Context and Why Does It Matter?

BrainBot is an AI assistant embedded throughout the brainCloud portal. Team members can ask it questions about the portal, cloud code, data structures, and more. By default, BrainBot has no knowledge specific to your app — it does not know your game's name, its architecture, which environment is production, or any special conventions your team uses.

The context you write here is injected into BrainBot's system prompt every time it answers a question for your app. This means you can:

  • Describe your game — tell BrainBot what your game is, its genre, and how it uses brainCloud services. BrainBot can then give answers that are relevant to your specific use case rather than generic brainCloud guidance.

  • Add production environment warnings — instruct BrainBot to remind team members that certain apps are live production environments and that changes should be made with caution or via a staging app first.

  • Document naming conventions and architecture decisions — describe any non-obvious conventions your team uses (e.g. script naming patterns, custom global property categories, segment naming schemes) so BrainBot gives advice consistent with your codebase.

  • Provide cross-app relationships — if your app is part of a parent/child or peer service setup, describe the relationships so BrainBot understands the broader architecture when answering questions.

Context is written in Markdown format. Use headings, bullet points, and emphasis to organise the information clearly — the better structured it is, the more effectively BrainBot can use it.

Viewing and Editing the Context

When you open the page, the current context is displayed in a read-only Markdown editor. If no context has been set yet, the message "Context not set." is shown.

Click Edit to enter editing mode. The editor becomes writable and, if no context currently exists, is pre-populated with an example template to guide you:

Example structure:

  • A # Game Description section describing the game's genre and how it uses brainCloud.

  • A # Production section warning BrainBot that this is a live app and that cloud code changes should be made in a development copy first.

The editor supports full Markdown syntax with syntax highlighting. Word-wrap is enabled so long lines are readable without horizontal scrolling. There are no autocomplete suggestions — you are writing free-form instructions, not code.

When you are done writing, click Save to persist the context. A success notification confirms the update. Click Cancel to discard all changes and return to the previous saved content.

Tips for Writing Effective Context

Use clear Markdown headings — organise your context into named sections (e.g. # Game Overview, # Environment Notes, # Naming Conventions). This helps BrainBot locate the most relevant section when answering a specific question.

Be explicit about production warnings — if this app is live, write a dedicated section that explicitly tells BrainBot to warn users before suggesting changes. For example: "This is the live production app. Always remind team members to test changes in [staging app name] first and never make cloud code edits directly here."

Reference other apps by name and ID — if your production app has a paired development app, name both in the context so BrainBot can refer to them correctly: "Development app: My Game Dev (appId: 123456). Production app: My Game (appId: 789012)."

Describe non-obvious data structures — if your global properties follow a naming convention like FEAT_[FEATURE_NAME]_ENABLED, document this so BrainBot understands when it sees those names.

Keep it focused — BrainBot context is injected on every query, so excessively long context can dilute its effectiveness. Aim for the most important information rather than exhaustive documentation.

Actions

  • Edit — enters editing mode. Disabled if you lack write access to the DESIGN_PORTAL_BRAINBOT_CONTEXT permission.

  • Save — persists the context. Disabled until a change has been made in the editor.

  • Cancel — discards all changes and returns to view mode with the previously saved content.

Permissions

Viewing the current context requires the DESIGN_PORTAL_BRAINBOT_CONTEXT permission. Editing requires write access to that permission. Team members without write access can read the context but cannot modify it.

Did this answer your question?