# Story Tracker

**URL:** <https://forum.rasa.com/t/story-tracker/49370>\
**Category:** Rasa Open Source\
**Created:** [November 21, 2021, 5:41am UTC](https://forum.rasa.com/t/story-tracker/49370 "2021-11-21T05:41:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rifat](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/rifat/32/17305_2.png) [@Rifat](https://forum.rasa.com/u/Rifat)\
**Post date:** [November 21, 2021, 5:41am UTC](https://forum.rasa.com/t/story-tracker/49370/1 "2021-11-21T05:41:46Z")

</div>

Hi, I’m trying to find the story tracker (The current tracker state of a story). I mean the current intent or action rasa is firing from which story. Here is a basic story

```auto
- story: interactive_story_2
  steps:
  - intent: goodbye
  - action: utter_ask_for_review
  - intent: affirm
  - action: utter_show_C-sat_rating
  - intent: inform
    entities:
    - rating: '3'
  - slot_was_set:
    - rating: '3'
  - action: action_thanks

```

Suppose, after getting goodbye from the user, rasa will fire the `utter_ask_for_review` action (or it could be a form), and hence I want to know this, using the tracker in the action.py file as well as the story name too, in this situation it is `interactive_story_2`. Is it possible? and want to know How does Rasa converts a story into the current tracker state?

Thanks

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [November 23, 2021, 5:23am UTC](https://forum.rasa.com/t/story-tracker/49370/2 "2021-11-23T05:23:43Z")

</div>

I’m not sure I understand your question but I think you want to know how to look back at tracker events to determine something like what the last bot utterance was. The tracker consists of a series of events described [here](https://rasa.com/docs/action-server/events/). If you want a custom action to look back in the past events for something specific, like the last bot utterance, your custom action would do something like this:

```auto
        for e in reversed(tracker.events):
            if e.get("event") == 'bot':
                utter_action = e.get('metadata', {}).get('utter_action')
                logger.debug(f"utter_action: {utter_action}")
                break

```
