AgentContextStore#

class council.contexts.AgentContextStore(chat_history: ChatHistory)[source]#

Bases: object

Actual data storage used during the execution of an council.agents.Agent

property cancellation_token: CancellationToken#

the cancellation token

chain_iterations(name: str) Iterable[MessageCollection][source]#

returns all the messages generated by a chain, across all iterations :param name: the name of the chain

property chat_history: ChatHistory#

the chat history

property current_iteration: AgentIterationContextStore#

the current iteration in the context :returns: Data storage for the execution of iteration :rtype: AgentIterationContextStore

property evaluation_history: Iterable[Sequence[ScoredChatMessage]]#

returns the result of all evaluations so far

property execution_log: ExecutionLog#

the execution log

property iterations: Sequence[AgentIterationContextStore]#

the storage for each execution iteration in the context

new_iteration() None[source]#

add a new iteration store in the context. It automatically becomes the current iteration.