This section provides hands-on tutorials that teach you the core concepts of Meta Agents Research Environments through practical, runnable examples.
Each tutorial is implemented as a complete scenario that you can run, modify, and learn from.
# Use the ARE CLI to run with an agent
are-run-sscenario_tutorial-adefault--modelLlama-4-Scout-17B-16E-Instruct-FP8--providerllama-api
# Use the ARE CLI to run in oracle mode (without an agent)
are-run-sscenario_tutorial-o
# Run locally with Python in oracle modecd/path/to/are.simulation
python-mare.simulation.scenarios.scenario_tutorial.scenario
Concepts Covered:
- Complete scenario structure and lifecycle
- App initialization and population
- Event creation and dependencies
- File attachments and messaging
- Scenario validation patterns
What You’ll Learn:
This comprehensive tutorial demonstrates a complete scenario workflow involving multiple applications.
You’ll see how to create a realistic scenario where the agent’s task is to forward an email received by the user.
Key Takeaways:
- How to structure a complete scenario class
- Proper app initialization and data population
- Creating realistic event flows with dependencies
- Implementing robust validation logic
# Example from the tutorial@register_scenario("scenario_tutorial")@dataclassclassScenarioTutorial(Scenario):start_time:float|None=0duration:float|None=20definit_and_populate_apps(self,*args,**kwargs)->None:# Initialize multiple appsagui=AgentUserInterface()email_client=EmailClientApp()messaging=MessagingApp()# ... populate with realistic data
Concepts Covered:
- Environment configuration and timing
- Simulation time vs real time
- Environment control (start/pause/resume)
- Time-based event scheduling
What You’ll Learn:
Understanding how Meta Agents Research Environments environments work is crucial for creating effective scenarios.
This tutorial shows you how to configure timing, control execution, and understand the relationship between simulation time and real time.
Key Takeaways:
- How to configure environment timing parameters
- The difference between simulation time and real time
- How to create time-sensitive scenarios
- Environment state monitoring and control
Concepts Covered:
- Scheduled events with specific timing
- Conditional events triggered by environment state
- Event dependencies and chaining
- Different event creation patterns
What You’ll Learn:
Events are the heart of dynamic scenarios.
This tutorial demonstrates the three main types of events and various patterns for creating and scheduling them.
Event Types Demonstrated:
# Scheduled Event - happens at a specific timescheduled_event=Event.from_function(app.some_function,param="value").depends_on(None,delay_seconds=5)# Conditional Event - triggers when condition is metdefcondition(env):returnlen(env.get_app("SomeApp").items)>3condition_check=ConditionCheckEvent.from_condition(condition)conditional_event=Event.from_function(app.other_function).depends_on(condition_check)# Dependent Event - happens after other eventsdependent_event=Event.from_function(app.final_function).depends_on([scheduled_event,conditional_event])
Concepts Covered:
- Complex event dependency graphs
- Parallel and sequential event execution
- Random timing with realistic delays
- Agent validation in complex scenarios
What You’ll Learn:
Real scenarios often involve complex event relationships.
This tutorial shows you how to create sophisticated event graphs where events depend on multiple predecessors,
execute in parallel, or converge at specific points.
Concepts Covered:
- Environment state validation
- Real-time agent validation events
- Milestone and minefield patterns
- Timeout-based validation
What You’ll Learn:
Validation is crucial for measuring agent performance.
This tutorial demonstrates multiple validation patterns, from simple state checks to complex real-time monitoring.
Validation Patterns:
# State Validation - check environment at specific timedefstate_validator(env):app=env.get_app("SomeApp")returnlen(app.items)>expected_countvalidation=ValidationEvent(milestones=[state_validator])# Agent Validation - monitor agent actions in real-timedefagent_validator(env,event):return(event.function_name()=="expected_function"andevent.action.args["param"]=="expected_value")agent_validation=AgentValidationEvent(milestones=[agent_validator],minefields=[unsafe_action_validator],timeout=30)
Create Your Own: Start building scenarios for your specific use cases
The tutorials provide a solid foundation, but the real learning happens when you start creating your own scenarios.
Don’t hesitate to experiment, modify, and build upon these examples!