# Example: Building a MythOS Simulation

Here’s a practical example of how to create and interact with a MythOS agent using Python. This snippet demonstrates the creation of a Product Manager agent in a startup simulation.

```python
from mythos import Agent, Simulation

# Initialize a simulation
sim = Simulation(scenario="Startup in Crisis")

# Create an agent
product_manager = Agent(
    role="Product Manager",
    traits=["analytical", "conflict-avoidant"],
    goals=["improve team morale", "launch new feature"]
)

# Agent observes the environment
context = product_manager.observe_environment()
print(context)
# Output: "Team morale is low. Resources are limited. Deadline approaching."

# Agent communicates with the CEO
response = product_manager.speak_to(agent="CEO", message="Propose team-building event to boost morale.")
print(response)
# Output: "CEO: Approved, but keep costs under $500."

# Agent adapts strategy based on feedback
product_manager.modify_strategy(new_priority="cost-effective morale boost")
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mythos-docs.gitbook.io/mythos-docs/example-building-simulation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
