Skip to content

Platform Settings Reference

Complete reference for the pika-config.ts file that controls global platform configuration.

The pika-config.ts file is the central configuration for your entire Pika Platform instance. It defines:

  • Project naming conventions across all stacks
  • Site-wide feature defaults
  • Global UI and behavior settings
your-pika-project/
└── pika-config.ts
import type { PikaConfig } from 'pika-shared/types/chatbot/chatbot-types';
export const pikaConfig: PikaConfig = {
// Configuration here
};

The configuration is divided into two main sections:

  1. Project Names - Naming conventions for infrastructure stacks
  2. Site Features - Global feature configuration

Define naming conventions for all your infrastructure stacks. Each service gets its own name configuration.

Each project requires five naming formats:

FormatDescriptionExampleUsage
projNameLLowercase, no separatorsmycompanyResource identifiers
projNameKebabCaseLowercase with hyphensmy-companyURLs, file names
projNameTitleCasePascalCaseMyCompanyClass names, CloudFormation resources
projNameCamelcamelCasemyCompanyJavaScript variables
projNameHumanHuman-readableMy CompanyUI display
pika: {
projNameL: 'mycompany',
projNameKebabCase: 'my-company',
projNameTitleCase: 'MyCompany',
projNameCamel: 'myCompany',
projNameHuman: 'My Company'
}

The core Pika service that provides APIs, Lambda functions, and database infrastructure.

pikaChat: {
projNameL: 'mycompanychat',
projNameKebabCase: 'my-company-chat',
projNameTitleCase: 'MyCompanyChat',
projNameCamel: 'myCompanyChat',
projNameHuman: 'My Company Chat'
}

The chat application frontend and infrastructure.

You can add custom service names following the same pattern:

weather: {
projNameL: 'weather',
projNameKebabCase: 'weather',
projNameTitleCase: 'Weather',
projNameCamel: 'weather',
projNameHuman: 'Weather'
}

Global defaults for all features. Individual chat apps can override these settings.

siteFeatures: {
homePage: { /* ... */ },
entity: { /* ... */ },
userDataOverrides: { /* ... */ },
// ... more features
}

Controls the platform home page appearance and navigation.

homePage: {
homePageTitle: string;
welcomeMessage: string;
linksToChatApps: {
userChatAppRules: UserChatAppRule[];
};
}
FieldTypeDescription
homePageTitlestringPage title displayed in browser
welcomeMessagestringWelcome message shown to users
userChatAppRulesUserChatAppRule[]Rules for which users see which chat apps

UserChatAppRule:

{
userTypes: ['internal-user'], // User types who can see links
chatAppUserTypes: ['internal-user', 'external-user'] // Types of apps to show
}

Example:

homePage: {
homePageTitle: 'Acme Corp AI Assistants',
welcomeMessage: 'Welcome! Choose an assistant below.',
linksToChatApps: {
userChatAppRules: [
{
userTypes: ['internal-user'],
chatAppUserTypes: ['internal-user', 'external-user']
}
]
}
}

Configure multi-tenancy with entities (accounts, organizations).

entity: {
enabled: boolean;
attributeName: string;
tableColumnHeaderTitle: string;
displayNameSingular: string;
displayNamePlural: string;
searchPlaceholderText: string;
}
FieldTypeDescription
enabledbooleanEnable entity-based access control
attributeNamestringCustom data field name (e.g., 'accountId')
tableColumnHeaderTitlestringTable column header text
displayNameSingularstringSingular form (e.g., 'Account')
displayNamePluralstringPlural form (e.g., 'Accounts')
searchPlaceholderTextstringPlaceholder for search input

Example:

entity: {
enabled: true,
attributeName: 'organizationId',
tableColumnHeaderTitle: 'Org ID',
displayNameSingular: 'Organization',
displayNamePlural: 'Organizations',
searchPlaceholderText: 'Search organizations...'
}

Allow certain users to override their custom data for testing.

userDataOverrides: {
enabled: boolean;
promptUserIfAnyOfTheseCustomUserDataAttributesAreMissing: string[];
}
FieldTypeDescription
enabledbooleanEnable the user data override feature
promptUserIfAnyOfTheseCustomUserDataAttributesAreMissingstring[]Prompt user if these fields are missing

Example:

userDataOverrides: {
enabled: true,
promptUserIfAnyOfTheseCustomUserDataAttributesAreMissing: [
'accountId',
'accountType',
'region'
]
}

Enable content administrators to view all user sessions for debugging.

contentAdmin: {
enabled: boolean;
}

Example:

contentAdmin: {
enabled: true
}

Show AI execution traces for transparency.

traces: {
enabled: boolean;
userTypes: UserType[];
detailedTraces: {
enabled: boolean;
userTypes: UserType[];
};
}
FieldTypeDescription
enabledbooleanEnable traces feature
userTypesUserType[]User types who can see traces
detailedTraces.enabledbooleanEnable detailed technical traces
detailedTraces.userTypesUserType[]User types who see detailed traces

Example:

traces: {
enabled: true,
userTypes: ['internal-user', 'external-user'],
detailedTraces: {
enabled: true,
userTypes: ['internal-user'] // Only internal users see details
}
}

Display disclaimer messages in chat apps.

chatDisclaimerNotice: {
enabled: boolean;
notice: string;
}

Example:

chatDisclaimerNotice: {
enabled: true,
notice: 'This AI assistant provides general information. For critical decisions, consult a professional.'
}

Enable AI self-correction and response verification.

verifyResponse: {
enabled: boolean;
autoRepromptThreshold: 'A' | 'B' | 'C' | 'D';
userTypes: UserType[];
}
ThresholdMeaning
'A'Accurate and comprehensive
'B'Accurate but incomplete
'C'Accurate with unstated assumptions
'D'Inaccurate

Example:

verifyResponse: {
enabled: true,
autoRepromptThreshold: 'C', // Auto-retry if C or worse
userTypes: ['internal-user']
}

Configure logout button visibility.

logout: {
enabled: boolean;
userTypes: UserType[];
}

Example:

logout: {
enabled: true,
userTypes: ['internal-user', 'external-user']
}

Configure the admin website features.

siteAdmin: {
websiteEnabled: boolean;
supportUserEntityAccessControl: {
enabled: boolean;
};
supportSpecificUserAccessControl: {
enabled: boolean;
};
sessionInsights: {
enabled: boolean;
};
}
FieldDescription
websiteEnabledEnable the admin site
supportUserEntityAccessControl.enabledEnable entity-based access control in admin
supportSpecificUserAccessControl.enabledEnable user-specific access control in admin
sessionInsights.enabledEnable session insights in admin

Example:

siteAdmin: {
websiteEnabled: true,
supportUserEntityAccessControl: {
enabled: true
},
supportSpecificUserAccessControl: {
enabled: true
},
sessionInsights: {
enabled: true
}
}

Configure file upload capabilities.

fileUpload: {
enabled: boolean;
mimeTypesAllowed: string[];
}

Example:

fileUpload: {
enabled: true,
mimeTypesAllowed: [
'text/*',
'application/pdf',
'image/jpeg',
'image/png',
'text/csv'
]
}

Quick suggestion buttons in chat interface.

suggestions: {
enabled: boolean;
suggestions: string[];
maxToShow: number;
randomize: boolean;
randomizeAfter: number;
}
FieldDescription
enabledEnable suggestions feature
suggestionsArray of suggestion texts (usually overridden by chat apps)
maxToShowMaximum suggestions to display
randomizeWhether to randomize order
randomizeAfterRandomize after this many messages

Example:

suggestions: {
enabled: true,
suggestions: [], // Set per chat app
maxToShow: 3,
randomize: true,
randomizeAfter: 0
}

Customize the chat input field placeholder.

promptInputFieldLabel: {
enabled: boolean;
promptInputFieldLabel: string;
}

Example:

promptInputFieldLabel: {
enabled: true,
promptInputFieldLabel: 'Ask me anything...'
}

Global UI behavior settings.

uiCustomization: {
enabled: boolean;
showUserRegionInLeftNav: boolean;
showChatHistoryInStandaloneMode: boolean;
}

Example:

uiCustomization: {
enabled: true,
showUserRegionInLeftNav: true,
showChatHistoryInStandaloneMode: true
}

Enable AI-generated session insights and analytics.

sessionInsights: {
enabled: boolean;
}

Example:

sessionInsights: {
enabled: true
}

Enable custom UI tags and widgets.

tags: {
enabled: boolean;
}

Example:

tags: {
enabled: true
}

Help users craft better prompts.

agentInstructionAssistance: {
enabled: boolean;
}

Example:

agentInstructionAssistance: {
enabled: true
}

Automatically enhance user prompts with additional context.

instructionAugmentation: {
enabled: boolean;
type: 'llm-semantic-directive-search';
}

Example:

instructionAugmentation: {
enabled: true,
type: 'llm-semantic-directive-search'
}

Remember user preferences and context across sessions.

userMemory: {
enabled: boolean;
maxMemoryRecordsPerPrompt: number;
maxKMatchesPerStrategy: number;
}
FieldDescription
enabledEnable user memory feature
maxMemoryRecordsPerPromptMaximum memory records to include per prompt
maxKMatchesPerStrategyMaximum matches per memory retrieval strategy

Example:

userMemory: {
enabled: true,
maxMemoryRecordsPerPrompt: 25,
maxKMatchesPerStrategy: 5
}

Controls which field names are searched when normalizing an account ID out of a user's sessionAttributes. The normalized value is projected onto the top-level session row so admin tables and search results always have a consistent accountId column.

accountIdFieldNames?: string[];
FieldTypeDefaultDescription
accountIdFieldNamesstring[]['accountId', 'account_id']Field names tried in order against sessionAttributes (and the nested account sub-object).

When to use: Override this when your user records store the account identifier under a different or additional field name (e.g., legacy B2B systems using retailerId or supplierId). The default covers the two canonical pika field names; consumers should only extend this list, not replace it.

Example:

pika-config.ts
export const pikaConfig: PikaConfig = {
// ... project names, siteFeatures ...
accountIdFieldNames: ['accountId', 'account_id', 'retailerId', 'supplierId']
};

The value is passed to Lambda functions as the PIKA_ACCOUNT_ID_FIELD_NAMES environment variable (comma-joined). Consumers that do not set this option get the default ['accountId', 'account_id'] behavior with no change to existing sessions.

Controls which customData keys the Strands converse Lambda copies onto an existing session when none of them is present yet, for example the id of a delegated user acting on behalf of the session's owner.

sessionIdentityFieldNames?: string[];
FieldTypeDefaultDescription
sessionIdentityFieldNamesstring[]unset (copies nothing)Custom-data keys backfilled onto an existing session when no key in the list is present on it.

Example:

pika-config.ts
export const pikaConfig: PikaConfig = {
// ... project names, siteFeatures ...
sessionIdentityFieldNames: ['delegateId', 'delegateEmail']
};

The value is passed to the Strands converse Lambda as the PIKA_SESSION_IDENTITY_FIELD_NAMES environment variable (comma-joined). If an account is pinned to the session, a failure to pin it raises, while a failure writing only the identity keys is logged and the existing session is returned.

import type { PikaConfig } from 'pika-shared/types/chatbot/chatbot-types';
export const pikaConfig: PikaConfig = {
pika: {
projNameL: 'acmecorp',
projNameKebabCase: 'acme-corp',
projNameTitleCase: 'AcmeCorp',
projNameCamel: 'acmeCorp',
projNameHuman: 'Acme Corp'
},
pikaChat: {
projNameL: 'acmecorpchat',
projNameKebabCase: 'acme-corp-chat',
projNameTitleCase: 'AcmeCorpChat',
projNameCamel: 'acmeCorpChat',
projNameHuman: 'Acme Corp Chat'
},
siteFeatures: {
homePage: {
homePageTitle: 'Acme Corp AI Assistants',
welcomeMessage: 'Welcome to Acme Corp AI Assistants!',
linksToChatApps: {
userChatAppRules: [
{
userTypes: ['internal-user'],
chatAppUserTypes: ['internal-user', 'external-user']
}
]
}
},
entity: {
enabled: true,
attributeName: 'accountId',
tableColumnHeaderTitle: 'Account ID',
displayNameSingular: 'Account',
displayNamePlural: 'Accounts',
searchPlaceholderText: 'Search for an account...'
},
userDataOverrides: {
enabled: true,
promptUserIfAnyOfTheseCustomUserDataAttributesAreMissing: ['accountId', 'accountType']
},
contentAdmin: {
enabled: true
},
traces: {
enabled: true,
userTypes: ['internal-user'],
detailedTraces: {
enabled: true,
userTypes: ['internal-user']
}
},
verifyResponse: {
enabled: true,
autoRepromptThreshold: 'C',
userTypes: ['internal-user']
},
fileUpload: {
enabled: true,
mimeTypesAllowed: ['text/*', 'application/pdf']
},
userMemory: {
enabled: true,
maxMemoryRecordsPerPrompt: 25,
maxKMatchesPerStrategy: 5
},
sessionInsights: {
enabled: true
},
tags: {
enabled: true
},
strandsConverse: {
enabled: false // opt into Python Strands converse Lambda — see guides/advanced/strands-converse
}
}
};

The configuration is validated at build time. Common errors:

  • Missing required name formats
  • Invalid user types (must be 'internal-user' or 'external-user')
  • Invalid threshold values
  • Type mismatches

After modifying pika-config.ts:

  1. Build - Run pnpm build in the affected service
  2. Test locally - Verify changes with pnpm dev
  3. Deploy - Deploy updated stack with cdk deploy or CI/CD pipeline
  4. Clear caches - Some changes may require clearing Lambda caches