Uh oh! We couldn’t find any match.

Please try other search keywords.

Bixby Developer Center


Bixby Language Keys

Models are written in the Bixby Language, a simple declarative language.in *.bxb files. It is a structured data format like XML or JSON, with an emphasis on:

  • Readability: Quotation marks, commas, and other needless punctuation is minimized.
  • Author-friendly: A format that is suitable for both manual and automated creation, such as declarative domain-specific languages.
  • Simplicity: The data model is even simpler than JSON. All data values are strings.
  • Schema support: Data model simplicity makes schema specification simpler.

In addition to data definition, modeling for Bixby supports conditionals and simple programming directives, as seen in the RollDice action above. Conditionals are defined in Expression Language.

Bixby Language Conventions

In general, for all files in the *.bxb format, use the following conventions:

  • Keys are lowercase-dash-separated
  • Values are enclosed in parentheses
  • Indent 2 spaces

In addition, for modeling, use the following conventions:

  • Concept and action names are of the form capsule.UpperCamelCaseName
  • Property and input names are lowerCamelCase
  • Constant values (such as cardinality, features, etc.): UpperCamelCase

Models (concepts and actions) can be either qualified or unqualified:

  • A qualified model refers to its organization name, capsule, and if fully qualified, version: viv.gratuity.CalculateTip, 2.5.5-viv.gratuity.ServiceBillTotal.
  • An unqualified model leaves out organization, capsule, and version number: CalculateTip, ServiceBillTotal.

When referring to local concepts and actions (ones defined within the current capsule), it is preferable to use only the unqualified model name. This keeps your code, training utterances, and stories more portable, without tying them to a specific version number, organization, or capsule name.

Here is an example illustrating all these conventions:

indexed-structure (FlightReservation) {
description (A flight reservation with a specific itinerary.)
feature (Archived)
property (reservationId) {
type (FlightReservationId)
property (itinerary) {
type (FlightSolution)
property (passengers) {
type (FlightPassenger)
max (Many)
index (byOrigin) {
key (itinerary.trips.origin)
index (byDestination) {
key (itinerary.trips.destination)


Strings can be in one of two forms: quote delimited and unquoted literal.

  • Quoted string values are delimited by the double quote mark ("). The following characters can be escaped in a string with a backslash (\):

    • \0: null character

    • \t: tab

    • \b: backspace

    • \n: newline

    • \f: form feed

    • \r: carriage return

    • \": double quote mark

    • \': single quote mark

    • \\: (unescaped) backslash

      In many contexts, quoted strings can contain Expression Language functions. This is a valid string with embedded EL:

      expression ("The next #{value(moonName)} is on #{value(date)}")
  • Unquoted string values are delimited only by their enclosing parentheses:

    description (A flight reservation with a specific itinerary.)

    Unquoted strings are literal values. You cannot embed EL, and the backslash character will not escape the next character.


Single quote marks (') are not string delimiters. Writing key ('String') will yield the actual string 'String', with quote marks included. This also means that while key ("") will yield an empty string, key ('') will yield a string of two single quote marks!

Other Requirements

  • Documents must be UTF-8 encoded. Null bytes (0x00) are not permitted.
  • Tokens can be separated by one or more whitespace characters: space (0x20), tab (0x09), newline (0x0A), or carriage return (0x0D).
  • All characters are valid for key names except whitespace characters and the following:
    ( ) { } " ' \
  • String values can be either delimited by double quotes (") or unquoted:
    • Unquoted strings cannot contain the following characters { } " ' \
    • Quoted strings can contain special characters, but must be escaped by the backslash character (\): "The \"backslash\" character is \\"