Skip to content

PromptBuilder

new PromptBuilder(config?): PromptBuilder;

Accepts either:

  • PromptBuilderConfig (new fluent API)
  • PromptTemplate (backward compatible - treated as user template sections)
Parameter Type

config

| PromptBuilderConfig | PromptTemplate

PromptBuilder

addPersona(persona): this;
Parameter Type

persona

PersonaConfig

this


build(): string;

string


withAgentDefinition(definition): this;
Parameter Type

definition

AgentDefinition

this


withBrandVoice(brandVoice): this;
Parameter Type

brandVoice

BrandVoiceConfig

this


withKnowledgeContext(context): this;
Parameter Type

context

KnowledgeContext

this


withPersona(persona): this;
Parameter Type

persona

PersonaConfig

this


withPolicyProfile(profile): this;
Parameter Type

profile

PolicyProfile

this


withSessionMemory(memory): this;
Parameter Type

memory

SessionMemory

this


withTemplate(template): this;
Parameter Type

template

PromptTemplate

this


withTools(tools): this;
Parameter Type

tools

ToolSet

this