agentsociety.cityagent.governmentagent¶
Module Contents¶
Classes¶
Configuration for GovernmentAgent. |
|
A government institution agent that handles periodic economic operations such as tax collection. |
Data¶
API¶
- agentsociety.cityagent.governmentagent.__all__¶
[‘GovernmentAgent’]
- class agentsociety.cityagent.governmentagent.GovernmentAgentConfig¶
Bases:
agentsociety.agent.AgentParamsConfiguration for GovernmentAgent.
- class agentsociety.cityagent.governmentagent.GovernmentAgent(id: int, name: str, toolbox: agentsociety.agent.AgentToolbox, memory: agentsociety.memory.Memory, agent_params: Optional[agentsociety.cityagent.governmentagent.GovernmentAgentConfig] = None, blocks: Optional[list[agentsociety.agent.Block]] = None)¶
Bases:
agentsociety.agent.GovernmentAgentBaseA government institution agent that handles periodic economic operations such as tax collection.
Initialization
Initialize the GovernmentAgent.
Args: -
name(str): The name or identifier of the agent. -toolbox(AgentToolbox): The toolbox of the agent. -memory(Memory): The memory of the agent.Description:
Initializes the GovernmentAgent with the provided parameters and sets up necessary internal states.
- ParamsType¶
None
- async reset()¶
Reset the GovernmentAgent.
- async month_trigger()¶
Check if the monthly tax cycle should be triggered based on elapsed time.
Returns: True if the time difference since last trigger exceeds
time_diff, False otherwise.
- async forward()¶
Execute the government’s periodic tax collection and notification cycle.