Planning and Action
While large language models (LLMs) are capable of generating reasonable immediate actions based on context, intelligent agents also need the ability to plan over extended periods to ensure that their behavior remains coherent and believable over time.
A plan describes a sequence of future actions, helping the agent maintain consistency in its behavior. Each plan includes information such as location, start time, and duration. For example, Owen, who is focused on studying the impact of Web3 on the town, may decide to spend several hours in the library as a deadline approaches.
Similar to reflections, plans are stored in the memory stream and are included in the retrieval process. This enables the agent to synthesize and weigh its observations, reflections, and pre-existing plans when deciding how to act. Plans can also be revised mid-course if new information arises or priorities change.
Once a plan is formed, it is stored in the memory stream and recursively decomposed into more granular actions. Initially, these are broken into hourly blocks. For example:
1:00 PM โ Brainstorm research ideas for the paper
2:00 PM โ Search for supporting materials
3:00 PM โ Take a short break and have a snack
These blocks can then be further broken down into smaller 5โ15 minute segments, such as:
3:00 PM โ Eat a snack (e.g., a piece of fruit)
3:05 PM โ Take a short walk around the library
3:15 PM โ Spend a few minutes tidying the workspace
This recursive breakdown process can be adjusted to match the desired granularity of behavior simulation โ allowing agents to simulate detailed and context-sensitive daily routines.
๐ Reaction and Plan Update
Generative agents operate in a continuous action loop. At each step, they perceive their environment and store the resulting observations in their memory stream. These observations are then used to prompt the language model to decide whether the agent should continue following its current plan or respond to a new situation.If the situation warrants a reaction, the agentโs existing plan is re-evaluated and regenerated starting from the point of interruption.Finally, if the triggered action involves interaction between agents, the system generates a dialogue between them as part of the reaction process.
Last updated