
    #i                    R    d Z ddlmZ ddlmZ ddlmZmZ erddlm	Z	 dd
Z
ddZdS )zStateless Agent executor.    )annotations)TYPE_CHECKING)AgentConfigScratchpadEntry)	LLMCliententrieslist[ScratchpadEntry]returnstrc                    | sdS g }| D ]'}|                     d|j         d|j                    (d                    |          S )a  Format scratchpad entries into a readable summary.

    Args:
        entries: List of ScratchpadEntry objects from the shared whiteboard.

    Returns:
        A newline-joined string of "[agent_name]: content" lines,
        or "No discussion yet." when the list is empty.
    zNo discussion yet.[z]: 
)append
agent_namecontentjoin)r   linesentrys      0/root/projects/multi-agents-meeting/src/agent.pyformat_scratchpad_summaryr      sc      $##E ? ?=)==em==>>>>99U    configr   promptscratchpad_summaryclientr   c                R    d| d| }|                     | j        d|dg          S )a  Execute a single Agent turn.

    The Agent sees its own system_prompt, a summary of the current
    whiteboard, and the specific prompt from PM.

    Args:
        config: AgentConfig holding the agent's name, role, and system_prompt.
        prompt: The specific question or task sent by the PM router.
        scratchpad_summary: Pre-formatted string of the shared whiteboard state.
        client: Any object satisfying the LLMClient Protocol.

    Returns:
        The agent's text response from the LLM.
    z## Current Meeting Whiteboard

z

## Your Task

user)roler   )systemmessages)chatsystem_prompt)r   r   r   r   user_contents        r   	run_agentr$      sW    *	$,> 	$ 	$!	$ 	$ 
 ;;#!l;;<    r   N)r   r	   r
   r   )
r   r   r   r   r   r   r   r   r
   r   )__doc__
__future__r   typingr   
src.modelsr   r   src.llm_clientr   r   r$    r   r   <module>r+      s      " " " " " "             3 3 3 3 3 3 3 3 )((((((   $     r   