Add initial setup for TinyTroupe simulation: environment, agents, configuration, and example world interaction

This commit is contained in:
geoffsee
2025-06-22 10:18:48 -04:00
commit e67a7e9e01
11 changed files with 531 additions and 0 deletions

21
agents.py Normal file
View File

@@ -0,0 +1,21 @@
import json
import os
from tinytroupe.agent import TinyPerson
# These are the agents that are loaded into TinyWorlds
def create_aisha():
return TinyPerson.load_specification(load_agent_spec("Aisha"))
def create_diego():
return TinyPerson.load_specification(load_agent_spec("Diego"))
def create_elena():
return TinyPerson.load_specification(load_agent_spec("Elena"))
def create_nakamura():
return TinyPerson.load_specification(load_agent_spec("Nakamura"))
def load_agent_spec(name):
return json.load(open(os.path.join(os.path.dirname(__file__), f'./agents/{name}.agent.json')))