# Messages

A message is a nice way of showing the user some content. You could also use it as a mailbox or something for your game.

First you need to declare your message, it consists on an Identifier, Title, a A subtitle and the message body.

```javascript
var messages={
    "SampleWriting":{
        "Title": "Some sample writing",
        "Subtitle": "From Evelyn",
        "Message":"Just look how easy it is!&lt;br&gt;&lt;img src='img/sample.png'&gt;"
    },
}
```

As you can see, you can also write HTML on them!

Next, to show them up in your game, yo just need the Display Message command.

```javascript
"display message SampleWriting"
```

Each message has a close button so the user is able to close it when he's finished reading it.


---

# 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://developers.monogatari.io/documentation/1.0.0/script/messages.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.
