Skip to main content
The Options system is a foundational feature in Kodexa that enables developers to define flexible, type-safe configuration interfaces throughout the platform. Options provide a declarative way to capture custom information from users while maintaining consistency across all components.

What Are Options?

Options are configuration parameters that allow you to:
  • Capture user input in a structured, validated way
  • Define custom properties for components (assistants, modules, steps)
  • Add configurable fields to taxonomies (data elements)
  • Create dynamic form interfaces without writing UI code
  • Enable users to configure components directly in the platform UI
Think of options as a schema language for user configuration - you describe what you need, and Kodexa automatically generates the appropriate UI controls and validation.

The Options Flow

Example: Simple Assistant with Options

Developer defines (in assistant metadata):
Platform generates: Text input field + numeric input field with validation User configures: Enters “sftp.example.com” and “2222” Code receives: {'hostname': 'sftp.example.com', 'port': 2222}

Where Are Options Used?

Options appear throughout the Kodexa platform:

1. Assistants

Define configuration parameters for assistant behavior:

2. Modules

Configure inference and training behavior:

3. Taxonomies (Data Definitions)

Add custom properties to data elements:
When users label documents, they can set these properties on each labeled instance.

4. Actions

Configure executable actions:

5. Pipeline Steps

Configure processing steps in pipelines:

Core Option Structure

Every option has this basic structure:

Required Fields

  • name: Unique identifier for the option (used in code to access the value)
  • type: Determines which UI control to render and how to validate input
  • label: User-facing display name
  • description: Help text explaining the purpose and usage

Optional Fields

  • required: Boolean indicating if the option must be set (default: false)
  • default: Pre-filled value shown to users
  • possibleValues: Array of allowed values (for dropdowns/selects)
  • showIf: Conditional visibility based on other option values
  • developerOnly: Only show to users with developer privileges
  • featureFlag: Gate option behind a feature flag
  • properties: Additional metadata for option behavior (e.g., collapsible: true)

Option Types Overview

Kodexa supports 24+ option types organized into categories:

Basic Input Types

  • string / text: Single or multi-line text input
  • number: Numeric input with optional min/max constraints
  • boolean: Checkbox or toggle switch
  • select: Dropdown selection from predefined values

Code & Script Types

  • code: Full code editor with syntax highlighting
  • script: Script input (supports multiple languages)

Platform-Specific Types

  • documentStore: Select a document store
  • moduleStore: Select a module store
  • tableStore: Select a data store
  • taxonomyStore: Select a taxonomy (data definition)
  • document: Search and select a specific document
  • workspace: Select a workspace

Taxonomy Types

  • taxon: Select a taxonomy element
  • taxon_label: Select a taxonomy label
  • taxon_with_properties: Select taxonomy + configure properties
  • taxon-lookup: Hierarchical taxonomy search

Status & State Types

  • documentStatus: Select document status
  • attributeStatus: Select attribute status
  • taskStatus: Select task status

Advanced Types

  • cloud-model: Select cloud-based AI model (with caching)
  • cloud-embedding: Select embedding model
  • pipeline: Configure entire pipeline
  • pipelineModuleOptions: Configure multiple modules in pipeline
  • data-form: Select data form configuration

Display Types

  • alert: Display informational message
  • article: Embed knowledge base article

Nested Options (Option Groups)

Options can be nested into groups for better organization:
This creates a collapsible section containing three related options.

Conditional Visibility

Use showIf to show/hide options based on other values:
The showIf field accepts JavaScript expressions evaluated against the current option values.

Possible Values (Constrained Choices)

Limit user input to predefined choices:
Renders as a dropdown with only these three options.

Developer-Only Options

Hide advanced options from regular users:

Accessing Option Values in Code

In Python (Assistants/Modules)

In Metadata (Other Components)

Options can reference each other or be used in expressions:

Best Practices

1. Provide Clear Labels and Descriptions

2. Use Appropriate Types

3. Set Sensible Defaults

5. Use required Judiciously

Only mark options as required if the component truly cannot function without them.

6. Leverage Conditional Visibility

Keep the UI clean by hiding irrelevant options:

How Options Enable Custom Information Capture

The Options system is powerful because it provides declarative configuration:
  1. No UI Code Required: Define options in YAML, get a UI automatically
  2. Type Safety: Platform validates input based on option type
  3. Consistency: Same option types look and behave the same everywhere
  4. Discoverability: Users see configuration options in context
  5. Versioning: Options are part of component metadata (versioned with the component)

Example: Custom Data Capture

Suppose you’re building a custom invoice extraction module. You want users to configure:
  • Which fields are required
  • Validation rules per field
  • Output format preferences
Without options, you’d need to:
  1. Build a custom UI
  2. Handle validation
  3. Store configuration somewhere
  4. Pass configuration to your module code
With options, you simply:
Kodexa generates the UI, validates input, and passes the configuration to your module.

Next Steps

Summary

The Options system is Kodexa’s declarative configuration language. By defining options in metadata, you:
  • Enable users to configure your components without code changes
  • Provide a consistent, validated configuration experience
  • Capture custom information tailored to your use case
  • Keep configuration co-located with component definitions
Options turn configuration from a UI development task into a metadata declaration, allowing you to focus on building functionality rather than forms.