class council.contexts.ContextBase(store: AgentContextStore, execution_context: ExecutionContext, budget: Budget)[source]#

Bases: object

base class for context.

It provides a secured and monitored access to the data generated during the execution. The actual data are stored in the underlying class:AgentContextStore`.

property budget: Budget#

the budget

property chat_history: ChatHistory#

the chat history

execution_log_to_dict() Dict[str, Any][source]#

returns the execution log as a dictionary

execution_log_to_json() str[source]#

returns the execution as a JSON string

property iteration_count: int#

the number of iteration for this execution

property log_entry: ExecutionLogEntry#

the log entry

new_log_entry(monitored: Monitored) ExecutionLogEntry[source]#

creates a new log entry from this context