Skip to main content

portia.introspection_agents.introspection_agent

BaseIntrospectionAgent is the interface for all introspection agents.

PreStepIntrospectionOutcome Objects

class PreStepIntrospectionOutcome(PortiaEnum)

The Outcome of the introspection.

PreStepIntrospection Objects

class PreStepIntrospection(BaseModel)

The outcome of a pre-step introspection.

BaseIntrospectionAgent Objects

class BaseIntrospectionAgent(ABC)

Interface for introspection.

This class defines the interface for introspection. By introspection we mean looking at the state of a plan run and making decisions about whether to continue.

Attributes:

  • config Config - Configuration settings for the PlanningAgent.

__init__

def __init__(config: Config) -> None

Initialize the BaseIntrospectionAgent with configuration.

Arguments:

  • config Config - The configuration to initialize the BaseIntrospectionAgent.

pre_step_introspection

@abstractmethod
def pre_step_introspection(plan: Plan,
plan_run: PlanRun) -> PreStepIntrospection

pre_step_introspection is introspection run before a plan happens..