> For the complete documentation index, see [llms.txt](https://doc.botpot.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.botpot.ai/fundamentals/specialized-game-concepts/get-action-ref-data.md).

# Get action: ref data

Reference data is data that doesn't change throughout the game, but is needed for the bot to calculate its actions.&#x20;

## Examples

### Wordle

<figure><img src="/files/9k66T98VSYEGMWksyh0K" alt="" width="186"><figcaption><p>Wordle game</p></figcaption></figure>

In a word game like Wordle where the bot needs to guess a 5 letter word, the bot needs to know a list of all 5 letter words. Here is [ref\_data.json](https://d22cv6d99w4a17.cloudfront.net/wordle/ref_data.json) for Wordle. The proto schema for it is:

```protobuf
message refData {
  repeated string words = 1;
}
```

The bot can access ref\_data by:

{% tabs %}
{% tab title="Python" %}

```python
def get_action(state, ref_data, api):
    words = ref_data["words"]
    # ... Pick from one of these words
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
function getAction({state, refData, api}) {
  let words = refData["words"];
  // ... Pick from one of these words
}
```

{% endtab %}
{% endtabs %}

### Risk

<figure><img src="/files/cGMOu2ABUQiFaWT1mSH6" alt=""><figcaption><p>A game involving a map</p></figcaption></figure>

This game has a more complex example of [ref\_data.json](https://d22cv6d99w4a17.cloudfront.net/risk/ref_data.json). This map does not change throughout the game. A bot needs to know which areas are connected to determine what actions it should take.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://doc.botpot.ai/fundamentals/specialized-game-concepts/get-action-ref-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
