prebuilt.gtla.models

Classes

AgentAction

Model representing an agent's action decision.

AgentOutput

Model representing the output from an agent's action.

Module Contents

class prebuilt.gtla.models.AgentAction(/, **data: Any)

Bases: pydantic.BaseModel

Model representing an agent’s action decision.

action

The specific action to be taken (e.g., “search_calendar”, “analyze_tasks”)

Type:

str

thought

The reasoning process behind the action choice

Type:

str

tool

The specific tool to be used for the action (if needed)

Type:

Optional[str]

action_input

Input parameters for the action

Type:

Optional[Dict]

Examples

>>> action = AgentAction(
...     action="search_calendar",
...     thought="Need to check schedule conflicts",
...     tool="calendar_search",
...     action_input={"date_range": "next_week"}
... )
action: str
action_input: dict | None = None
thought: str
tool: str | None = None
class prebuilt.gtla.models.AgentOutput(/, **data: Any)

Bases: pydantic.BaseModel

Model representing the output from an agent’s action.

observation

The result or observation from executing the action

Type:

str

output

Structured output data from the action

Type:

Dict

Examples

>>> output = AgentOutput(
...     observation="Found 3 free time slots next week",
...     output={
...         "free_slots": ["Mon 2PM", "Wed 10AM", "Fri 3PM"],
...         "conflicts": []
...     }
... )
observation: str
output: dict