Skip to content
Courses/Agents and automation/OOM and memory management

OOM and memory management

Many agents work in demos but fail in production because they accumulate tool results, API responses, and long conversations within the same context.

  • Identify why OOM occurs in agents and long-running workflows.
  • Separate context, persistent state, logs, and heavy results.
  • Apply limits, queues, and alerts before the system dies without explanation.

Common causes

  • Storing complete tool responses in the agent state.
  • Putting entire documents into context instead of chunks and references.
  • Retries that duplicate messages, results, and traces.
  • n8n workflows running in a single process without separate workers.
  • Huge buffers instead of streaming or batch processing.
Terminal
politica_memoria:
  max_tool_result_chars: 6000
  guardar_en_contexto:
    - resumen
    - ids
    - citas
  guardar_fuera:
    - html completo
    - pdf extraido
    - respuestas api largas
  si_supera_limite:
    - persistir_blob
    - resumir
    - enlazar_por_id
    - continuar
Complete Aulafy mapSee how this lesson fits without leaving your path.

Complete Aulafy map

How all courses connect

This is not a checklist. Start with the foundation, choose an outcome, and go deeper only when your project needs more control.

  1. 1Understand
  2. 2Apply or build
  3. 3Operate with confidence
01

Choose an application

Turn the foundation into a visible outcome: a website, a business improvement, media, or an interactive experience.

Continue into the technical branch when you need to maintain code, data, or infrastructure.

02

Build with code

Prepare your environment, work with coding agents, and run models while keeping control of your projects.

This branch prepares you to design and operate reliable AI systems.

03

Take systems to production

Combine retrieval, agents, evaluation, security, deployment, and model adaptation when the problem requires it.

You do not need every course: choose the component your system needs and return as it grows.

View full catalogue