Mistral vibe dreaming

AI · Development · LLM · Mistral · Vibe

2 minutes

I’m using Mistral Vibe as my “AI CLI” when doing LLM-aided development. Sometimes I use local models, sometimes their cloud models, it depends on the sensitivity of what I’m working on. I grew a bit tired of having to repeat what I was working on when picking up each project again though and this post describes what I did to get a more pleasant LLM-experience.

By default, Vibe logs the content from all different sessions under one common directory: ~/.vibe/logs/sessions/session_yyyymmdd…/messages.jsonl. However, this can be changed in the config to the local directory from where you start Vibe instead:

[session_logging]
save_dir = "./.vibe/logs/session"
session_prefix = "session"
enabled = true

After having done this, we now get project-specific data under each project directory. Now we can do the fun part - let the model run automatically every night to dream, that is, summarize the events of the last day for long term storage. For that I’ve created a skill (.vibe/skills/dream/SKILL.md) with the following content:

---
name: dream
description: Extract knowledge from the days work
license: CC0
compatibility: Python 3.12+
user-invocable: true
allowed-tools:
  - read_file
  - grep
  - write_file
---

# Dream Skill

Find the latest knowledge file in ./knowledge/, summarize its contents.
Then go through all the folders in ./logs/session/ that matches yesterday's
date and summarize the most important things from the included messages.jsonl
file. Ignore any other dates. Write down the total summary as a file named
`knowledge_` followed by todays date in YYYYmmdd format in the ./knowledge/ folder.

…and as you can see, this references the latest earlier created knowledge file too, which means we get some form of memory of previous events from the development, although gradually disappearing with time unless very important. The final part is to make sure Vibe makes use of the latest knowledge file when we start a new session, which I do with a simple directive in AGENTS.md:

Always inspect the latest knowledge file in .vibe/knowledge/ at the start of a new session.

Finally, create a systemd timer or cronjob that runs vibe --prompt "/dream" during the night (tip: remove the session file from that run afterwards) and that’s it. This has helped, IMHO, with picking up projects where I last was.