Skip to content

tutorial

Chapter 0 of 6

Tool Scope and Memory Scope in Rasa Mantle

by Rod Rivera Published

Decide where a tool belongs and where a memory field belongs — and build a bank agent that makes the caller verify exactly once.

You call your bank, prove who you are, and get transferred. The next department asks you to prove who you are all over again.

That is not a policy decision. It is an architecture leak: nothing is shared between the two systems, so the second one starts from nothing. The same leak shows up in agents, and Mantle gives you two tools for closing it — tool scope and memory scope.

This tutorial builds Sterling, a small Meridian Bank agent with three skills, and uses it to answer four questions:

  1. When should a tool be local to a skill, and when should it be global?
  2. What belongs in project memory rather than a skill’s own memory?
  3. What is the difference between public and private skill memory?
  4. What makes a skill folder portable to another agent?

What you will end up with

you  my passphrase is bluebird
bot  Welcome back, Dana Okafor. You are now signed in.

you  what is the balance on 10029384
bot  The balance on account 10029384 is 2418.55 GBP.

you  send 25 pounds to Sam Rivera
bot  To confirm, you want to send 25 pounds to Sam Rivera. Is that correct?

One passphrase. The balance and the transfer both run without re-verifying, because the authentication skill wrote the customer id into project memory and the other skills’ tools read it back.

The shape of the project

Idea Where it lives
Local tool skills/<skill>/tools.py — auto-discovered
Global tool tools/<module>.py + import_tools: in the skill
Project memory memory.yml at the project root
Skill memory skills/<skill>/memory.yml, split public / private

Before you start

You need Python 3.11 or 3.12, uv, a Rasa Pro Developer Edition licence, and an OpenAI API key. The agent is text-only on purpose: the subject is architecture, not speech.

Every command and transcript here was run against rasa-pro==3.20.0.dev1.