Genie design patterns

Every genie has one or more design patterns. Building with patterns intentionally means you can explain and maintain your architecture.

This page provides information on the eleven design patterns available for genie builds and explains how to use the decision matrix to select the right design pattern.

What is a design pattern

A design pattern is a reusable architectural approach that solves a recurring problem in a known context. Patterns are architectural choices you make at design time before you write a job description, build a skill, and ingest data into a knowledge base.

Eleven genie design patterns

PatternDescription
Deterministic flowThe skill sequence is fixed in the job description before execution. The LLM processes output between steps and converses with the user, but the overall flow doesn't vary.
Event routerA central genie receives events from multiple sources and routes each one to the appropriate skill or skill chain based on pre-defined criteria in the prompt.
Guided skill chainingEach skill output determines which skill runs next. The flow is conditional and runtime-determined rather than pre-specified in the job description.
Dynamic input builderA single skill adapts to variable input schemas at runtime by fetching the schema definition before building the payload. This eliminates the need for one skill per ticket category or form type.
Query generationObject definitions and relationships are loaded into the knowledge base. The LLM generates the required query at runtime from user intent rather than using a pre-defined query.
Persistent state and data enrichmentThe genie stores and retrieves domain-specific data beyond conversational history, enabling reporting over time, stateful workflows, and consistent scoring across sessions.
Information summarizationThe genie collects data from multiple sources and synthesizes it into a single, structured response.
Controlled data volumeThe genie applies filters, aggregation, and pagination before returning data to the LLM to prevent context window overflow when working with large datasets.
Record systemThe genie acts as a lightweight record system using Data tables for CRUD operations when an external system is unavailable or unnecessary.
App Event-triggeredAn external business event triggers a genie workflow. Two modes: continue an existing conversation or start a new one.
Genie as MCP serverA genie exposed as an MCP server can be called from Claude, ChatGPT, custom UIs, or other agents.

Genie design pattern decision matrix

Find the row that best matches your use case across all four dimensions to select your starting pattern:

PatternWorkflow characteristicsDecision makingHuman interactionSkill input characteristics
Deterministic flowPre-defined, fixed stepsNot required for steps. Validation may apply.User reviews step input and outputDerived. Can be dynamic.
Event routerInitiated from events. Multiple subscribers.Pre-defined criteria for routingAnyAny
Guided skill chainingPre-defined steps. Complex branching may apply.Dynamic. Driven from skill outputs.User reviews step input and outputAny
Dynamic input builderAnyUses knowledge bases or skills to resolve schemaUser reviews step input and outputDynamic and derived at runtime
Query generationAnyUses knowledge bases or skills to generate queryUser reviews step input and outputDynamic and derived at runtime
Persistent state and data enrichmentAnyUses knowledge bases or skills before persistingAnyAny
Information summarizationMultiple sources. Pre-defined criteria.Uses knowledge bases or skillsNo intermediate review. Summarize only.Any
Controlled data volumeMultiple sources. Pre-defined criteria to filter data.Uses knowledge bases or skillsNo intermediate review. Summarize only.Required filters applied to limit output
Record systemPre-defined definition and scope of applicationUses knowledge bases or skills before persistingUser reviews step input and outputAny
App Event-triggeredInitiated from external eventsSteps decided based on events and criteriaAnyAny
Genie as MCP serverInitiated from external events or client callsUses knowledge bases or skillsAnyAny

Combine patterns for real-world use cases

Most genies use more than one pattern. The patterns are composable. A single genie might use Guided skill chaining as the primary flow, Controlled data volume when a skill returns a large dataset, and Persistent state to store the workflow outcome for reporting.

Identify your primary pattern first. The primary pattern determines the job description structure and the overall skill sequencing logic. Secondary patterns influence how specific skills are designed and how data is handled at specific points in the flow.

Last updated: