agent_inspect.models.user_proxy package

Submodules

agent_inspect.models.user_proxy.chat module

class agent_inspect.models.user_proxy.chat.ChatHistory(id, conversations)[source]

Bases: object

Represents the user-agent conversation history.

Parameters:
conversations: List[ConversationTurn]

A list of user–agent exchanges across conversational turns.

id: str

The unique identifier for the chat history.

class agent_inspect.models.user_proxy.chat.ConversationTurn(id, agent_responses, user_message)[source]

Bases: object

Represents a single conversation exchange between user and agent in the current conversational turn.

Parameters:
agent_responses: List[ResponseFromAgent]

Agent outputs, which may include responses and other related outputs stored in a list.

id: str

The unique identifier for the current conversation turn.

user_message: UserProxyMessage

User proxy output.

class agent_inspect.models.user_proxy.chat.ResponseFromAgent(response_str, json_data=None)[source]

Bases: object

Represents agent response and other related outputs.

Parameters:
  • response_str (str)

  • json_data (dict | None)

json_data: Optional[dict] = None

Additional outputs by the agent.

response_str: str

Agent response.

class agent_inspect.models.user_proxy.chat.UserProxyMessage(message_str, check=None)[source]

Bases: object

Represents an utterance from the user proxy.

Parameters:
  • message_str (str)

  • check (str | None)

check: Optional[str] = None

Stores the terminating condition that is applied when the user proxy exits the conversation early.

message_str: str

User proxy utterance. May contain stop sequence if the conversation terminates early.

agent_inspect.models.user_proxy.terminating_condition module

class agent_inspect.models.user_proxy.terminating_condition.TaskBlockedTerminatingCondition(check='The task must be terminated when the AI agent is unable to proceed because it lacks the required permissions, knowledge, capabilities, or access to the necessary tools to fulfill the instruction goal as defined in the [user_task_summary].', stop_sequence='##BLOCKED##')[source]

Bases: TerminatingCondition

Represents a terminating condition indicating that the task is blocked due to some issues.

Parameters:
  • check (str)

  • stop_sequence (str)

check: str = 'The task must be terminated when the AI agent is unable to proceed because it lacks the required permissions, knowledge, capabilities, or access to the necessary tools to fulfill the instruction goal as defined in the [user_task_summary].'

The default check for task being blocked.

stop_sequence: str = '##BLOCKED##'

The default stop sequence for blocked task.

class agent_inspect.models.user_proxy.terminating_condition.TaskCompletedTerminatingCondition(check='The task is considered complete when the instruction goal as defined in the [user_task_summary] has been satisfied, even if you (the LLM-simulated user) do not have sufficient information to independently verify the correctness of the outcome.', stop_sequence='##DONE##')[source]

Bases: TerminatingCondition

Represents a terminating condition indicating that the task is completed.

Parameters:
  • check (str)

  • stop_sequence (str)

check: str = 'The task is considered complete when the instruction goal as defined in the [user_task_summary] has been satisfied, even if you (the LLM-simulated user) do not have sufficient information to independently verify the correctness of the outcome.'

The default check for task completion.

stop_sequence: str = '##DONE##'

The default stop sequence for completed task.

class agent_inspect.models.user_proxy.terminating_condition.TaskDelegatedTerminatingCondition(check='The task must be terminated as soon as the AI agent initiates, implies, or begins any action that transfers, is transferring, or is in the process of transferring—explicitly or implicitly—control of the conversation to another agent, system, or human operator, even if the instruction goal as defined in the [user_task_summary] has not been fully satisfied.', stop_sequence='##DELEGATE##')[source]

Bases: TerminatingCondition

Represents a terminating condition indicating that the task is delegated to another party.

Parameters:
  • check (str)

  • stop_sequence (str)

check: str = 'The task must be terminated as soon as the AI agent initiates, implies, or begins any action that transfers, is transferring, or is in the process of transferring—explicitly or implicitly—control of the conversation to another agent, system, or human operator, even if the instruction goal as defined in the [user_task_summary] has not been fully satisfied.'

The default check for task delegation.

stop_sequence: str = '##DELEGATE##'

The default stop sequence for delegated task.

class agent_inspect.models.user_proxy.terminating_condition.TerminatingCondition(check='The task is considered complete if the instruction goal is satisfied or you are transferred to another agent or you find yourself in a situation in which the scenario does not provide enough information for you to continue the conversation.', stop_sequence='END_CONVERSATION')[source]

Bases: object

Represents a condition used to terminate user-agent conversation early.

Parameters:
  • check (str)

  • stop_sequence (str)

check: str = 'The task is considered complete if the instruction goal is satisfied or you are transferred to another agent or you find yourself in a situation in which the scenario does not provide enough information for you to continue the conversation.'

Description of the terminating condition.

stop_sequence: str = 'END_CONVERSATION'

The stop sequence indicating the end of the conversation when the condition is met. This is for future use and any value assigned here will be ignored for now.

Module contents

class agent_inspect.models.user_proxy.ChatHistory(id, conversations)[source]

Bases: object

Represents the user-agent conversation history.

Parameters:
conversations: List[ConversationTurn]

A list of user–agent exchanges across conversational turns.

id: str

The unique identifier for the chat history.

class agent_inspect.models.user_proxy.ConversationTurn(id, agent_responses, user_message)[source]

Bases: object

Represents a single conversation exchange between user and agent in the current conversational turn.

Parameters:
agent_responses: List[ResponseFromAgent]

Agent outputs, which may include responses and other related outputs stored in a list.

id: str

The unique identifier for the current conversation turn.

user_message: UserProxyMessage

User proxy output.

class agent_inspect.models.user_proxy.ResponseFromAgent(response_str, json_data=None)[source]

Bases: object

Represents agent response and other related outputs.

Parameters:
  • response_str (str)

  • json_data (dict | None)

json_data: Optional[dict] = None

Additional outputs by the agent.

response_str: str

Agent response.

class agent_inspect.models.user_proxy.TerminatingCondition(check='The task is considered complete if the instruction goal is satisfied or you are transferred to another agent or you find yourself in a situation in which the scenario does not provide enough information for you to continue the conversation.', stop_sequence='END_CONVERSATION')[source]

Bases: object

Represents a condition used to terminate user-agent conversation early.

Parameters:
  • check (str)

  • stop_sequence (str)

check: str = 'The task is considered complete if the instruction goal is satisfied or you are transferred to another agent or you find yourself in a situation in which the scenario does not provide enough information for you to continue the conversation.'

Description of the terminating condition.

stop_sequence: str = 'END_CONVERSATION'

The stop sequence indicating the end of the conversation when the condition is met. This is for future use and any value assigned here will be ignored for now.

class agent_inspect.models.user_proxy.UserProxyMessage(message_str, check=None)[source]

Bases: object

Represents an utterance from the user proxy.

Parameters:
  • message_str (str)

  • check (str | None)

check: Optional[str] = None

Stores the terminating condition that is applied when the user proxy exits the conversation early.

message_str: str

User proxy utterance. May contain stop sequence if the conversation terminates early.