Skip to main content

PromptManager

Trait PromptManager 

Source
pub trait PromptManager: Send + Sync {
    // Required methods
    fn assemble_prompt<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session: &'life1 mut Session,
        config: &'life2 AgentLoopConfig,
    ) -> Pin<Box<dyn Future<Output = PromptAssemblyOutput> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn refresh_external_memory<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        session: &'life1 mut Session,
        config: &'life2 AgentLoopConfig,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn refresh_task_list(&self, session: &mut Session);
}
Expand description

Manages system prompt assembly.

Responsible for composing the effective system prompt from base prompt, workspace context, instruction context, env context, skill context, tool guide, and external memory sections.

Required Methods§

Source

fn assemble_prompt<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session: &'life1 mut Session, config: &'life2 AgentLoopConfig, ) -> Pin<Box<dyn Future<Output = PromptAssemblyOutput> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Assemble the full system prompt for the given session and config.

Source

fn refresh_external_memory<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session: &'life1 mut Session, config: &'life2 AgentLoopConfig, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Refresh external memory injection into an existing system message.

Source

fn refresh_task_list(&self, session: &mut Session)

Refresh the task list section in the system prompt.

Implementors§