r/MachineLearningJobs • • Oct 23 '26

ScriptFlow

I built a procedural memory system for AI agents — solve a task once, reuse it next time

I've been exploring a problem with LLM agents: why should an agent have to figure out how to solve the same task every time it encounters it?

Agents can use tools, complete workflows, and solve complex tasks. But unless we explicitly build a mechanism to retain and reuse successful procedures, we often end up paying for the same reasoning again and again.

So I built procedural-memory, a small Python library that lets agents learn reusable skills from successful tool-call sequences.

How it works

The idea is straightforward:

  1. An agent receives a request.
  2. The system checks whether a matching procedure already exists.
  3. If it finds one, it replays the saved tool calls.
  4. Otherwise, the agent solves the task normally.
  5. After a successful execution, the procedure can be stored as a reusable skill.

The goal is to avoid repeating reasoning when a previously solved task can be handled by replaying an existing procedure.

The library doesn't try to replace an agent's reasoning. It provides a way to reuse the results of that reasoning when the same kind of task comes up again.

Try it out

GitHub: https://github.com/GrappinoRoot/scriptflow

PyPI: https://pypi.org/project/scriptflow-procedural-memory/

Install it with:

pip install scriptflow-procedural-memory

This is an early-stage project, and I'm interested in feedback from people building AI agents, tool-use systems, and agent memory architectures.

A question for the community:

How are you currently handling reusable workflows in your agents? Do you rely on prompt-based memory, workflow engines, cached tool calls, skills, or something else?

4 Upvotes

0 comments sorted by