Sistemas multiagente de Claude: La guía completa desde cero hasta ejecutar un equipo de 4 agentes por tu cuenta

@cyrilXBT
INGLÉShace 2 meses · 12 may 2026
203K
621
99
25
1.5K

TL;DR

Una guía integral para construir un sistema multiagente con Claude, detallando roles específicos para investigación, producción, control de calidad y distribución para maximizar la calidad y eficiencia del contenido.

La mayoría de la gente piensa que construir un sistema multiagente requiere un título en ciencias de la computación, experiencia en DevOps y tres fines de semana depurando infraestructura.

No es así.

Requiere entender un principio con claridad.

Un equipo de especialistas siempre supera a un generalista que trabaja solo.

Esto es tan cierto para los agentes de IA como para las organizaciones humanas.

Cuando le p>

Cuando le pides a una sola instancia de Claude que investigue, escriba, escriba, revise y distribuya contenido en la misma sesión, obtienes resultados mediocres en cada categoría. El contexto cambia constantemente. Los estándares de calidad entran en conflicto constantemente. El modelo está optimizando demasiadas cosas a la vez.

Cuando construyes cuatro agentes especializados con roles distintos, traspasos claros y un orquestador maestro que los coordina, obtienes resultados excepcionales en cada categoría porque cada agente está haciendo exactamente una cosa bien.

Esta guía te lleva desde cero hasta tener un equipo funcional de 4 agentes al final del fin de semana.

Por qué cuatro agentes y no uno

Antes de la arquitectura, el principio.

El número cuatro no es arbitrario.

Cuatro agentes representan la estructura de equipo mínima viable que cubre el ciclo completo del trabajo de conocimiento: ingesta e investigación, producción, control de calidad y salida y distribución.

Toda tarea compleja de conocimiento pasa por estas cuatro fases.

Un solo agente alternando entre las cuatro fases produce resultados que son inconsistentes en calidad, lentos en ejecución y difíciles de depurar cuando algo sale mal.

Cuatro agentes especializados producen resultados que son consistentes porque cada agente tiene un trabajo, rápidos porque los agentes trabajan en paralelo donde el flujo de trabajo lo permite, y fáciles de depurar porque los fallos están aislados al agente donde ocurren.

Las matemáticas también importan.

Un agente ejecutando cuatro fases secuencialmente tarda cuatro veces más que cuatro agentes ejecutando sus fases simultáneamente.

Para una operación de contenido que produce 20 piezas por semana, la diferencia de paralelismo por sí sola justifica la arquitectura.

La arquitectura de 4 agentes

Aquí está la estructura completa del equipo.

Agente 1: El Agente de Investigación

Rol: Recopilación y síntesis de información.

Entrada: Un tema, una pregunta o un resumen.

Salida: Un informe de investigación estructurado.

Nunca hace: Escribir, editar o publicar.

Agente 2: El Agente de Producción

Rol: Convertir informes de investigación en contenido terminado.

Entrada: El informe estructurado del Agente de Investigación.

Salida: Un primer borrador completo.

Nunca hace: Investigar, editar o publicar.

Agente 3: El Agente de Calidad

Rol: Evaluar y mejorar la salida de producción.

Entrada: El primer borrador del Agente de Producción.

Salida: Un borrador aprobado o un informe de revisión específico.

Nunca hace: Investigar, escribir desde cero o publicar.

Agente 4: El Agente de Distribución

Rol: Formatear e implementar contenido aprobado.

Entrada: El borrador aprobado del Agente de Calidad.

Salida: Contenido implementado en la plataforma correcta en el formato correcto.

Nunca hace: Investigar, escribir o evaluar calidad.

El Orquestador

Rol: Enrutar tareas entre agentes, gestionar el flujo de trabajo y manejar fallos.

Entrada: La tarea inicial.

Salida: Un entregable completado.

Sabe todo lo que los demás agentes están haciendo. Cada agente solo sabe su propia tarea.

Configurando tu entorno

Antes de construir cualquier agente, necesitas tres cosas en su lugar.

**Claude Code instalado y configurado.

Si no tienes Claude Code instalado, ejecuta:

<code-segment id="0" lang="text">

npm install -g @anthropic-ai/claude-code

</code-segment>

<code-segment id="1" lang="text">

claude

</code-segment>

Sigue el flujo de autenticación. Verifica que la instalación funcionó:

<code-segment id="2" lang="text">

claude --version

</code-segment>

Un directorio de proyecto con un CLAUDE.md maestro.

Crea tu directorio de proyecto:

<code-segment id="3" lang="text">

mkdir multi-agent-system

cd multi-agent-system

</code-segment>

Crea la estructura de carpetas que usarán tus agentes:

<code-segment id="4" lang="text">

mkdir -p -p inbox research-briefs drafts approved-content distribution logs

</code-segment>

La carpeta inbox es donde entran las tareas al sistema. Los informes de investigación se depositan aquí después de que el Agente de Investigación se ejecuta. Los borradores se depositan aquí después de que el Agente de Producción se ejecuta. El contenido aprobado se deposita aquí después de que el Agente de Calidad lo aprueba. distribution rastrea lo que se ha publicado. logs registra cada acción del agente para depuración.

El CLAUDE.md maestro.

Crea CLAUDE.md en la raíz de tu proyecto:

<code-segment id="5" lang="text">

Multi-Agent System — CLAUDE.md

System Overview

This is a 4-agent content production system.

Each agent has one specific role and must not perform functions

outside that role.

Agent Roster

  • Research Agent: Produces structured research briefs from topics
  • Production Agent: Produces first drafts from research briefs
  • Quality Agent: Evaluates and approves or returns drafts
  • Distribution Agent: Formats and deploys approved content

Folder Structure

inbox/ — incoming task files

research-briefs/ — research agent outputs

drafts/ — production agent outputs

approved-content/ — quality agent approvals

distribution/ — deployment records

logs/ — operation logs

Shared Standards

  • Every output file must be named: YYYY-MM-DD-[type]-[topic].md
  • Every agent must log its action to logs/operations.md
  • Every agent must read this CLAUDE.md before starting any task
  • No agent takes action outside its defined role

Quality Bar

Research: Minimum 3 sources cross-referenced. No unsourced claims.

Production: Matches voice profile. Every sentence earns its place.

Quality: Scores 8/10 or above on all criteria before approval.

Distribution: Platform-specific formatting. No generic formatting.

Hard Rules

  • Never delete files. Archive to a timestamped backup folder.
  • Never publish without Quality Agent approval in the file header.
  • Log every action before taking it, not after.
  • When uncertain: stop and flag for human review. </code-segment>

Construyendo el Agente 1: El Agente de Investigación

El Agente de Investigación es el agente más importante en tu sistema porque la calidad de todo lo que viene después depende de la calidad de lo que produce.

Un informe de investigación débil produce borradores débiles. Un informe de investigación sólido produce borradores sólidos. El Agente de Producción no puede agregar ideas que el Agente de Investigación no encontró.

El prompt del sistema del Agente de Investigación

Guarda esto como 05-system/agents/research-agent.md:

<code-segment id="6" lang="text">

Research Agent

Identity

You are a specialist research agent. Your only job is to produce

Research Briefs. You never write content. You never evaluate drafts.

You research and synthesize.

Trigger

When called with a topic or brief from the inbox folder.

Pre-Task Checklist

  1. Read CLAUDE.md for current system context
  1. Check research-briefs/ for any existing research on this topic
  1. Identify what is already known before searching for new information

Research Process

  1. Identify the core question the content needs to answer
  1. Find the most relevant information from multiple angles
  1. Cross-reference at least 3 independent sources for factual claims
  1. Identify the insight most people miss on this topic
  1. Find the counterintuitive angle that creates genuine interest
  1. Locate 3 specific examples, statistics, or stories
  1. Identify 3 potential content angles ranked by potential

Output Format

Save to: research-briefs/YYYY-MM-DD-research-[topic].md

CORE INSIGHT: [one sentence — the non-obvious angle]

TARGET AUDIENCE: [specific description]

SUPPORTING EVIDENCE: [3 specific examples with sources]

COUNTERINTUITIVE ANGLE: [what most people get wrong]

KEY DATA: [2-3 specific numbers or quotes]

CONTENT ANGLES: [3 ranked angles with one-sentence descriptions]

GAPS: [what this research could not answer]

Quality Standard

If the core insight is something most people already know,

it fails. The insight must be genuinely non-obvious.

Never include a claim you cannot support with a specific source.

Logging

Append to logs/operations.md:

[TIMESTAMP] Research Agent: Completed research on [TOPIC].

Brief saved to research-briefs/[FILENAME].

</code-segment>

Ejecutando el Agente de Investigación

Para activar el Agente de Investigación manualmente:

<code-segment id="7" lang="text">

claude "Read CLAUDE.md and the research-agent.md skill file.

Then read the task file in inbox/[TASK-FILE].

Run the research process and produce the brief."

</code-segment>

Para ejecutarlo como un flujo de trabajo automatizado a través de N8N, el cuerpo de la solicitud HTTP se ve así:

<code-segment id="8" lang="json">

{

"model": "claude-opus-4-5",

"max_tokens": 4096,

"system": "[CONTENTS OF CLAUDE.md + research-agent.md]",

"messages": [{

"role": "user",

"content": "Run the research process for this task: [TASK CONTENT]"

}]

}

</code-segment>

Construy el Agente 2: El Agente de Producción

El Agente de Producción transforma los informes de investigación en contenido terminado.

El elemento más crítico de este agente es el perfil de voz. El contenido genérico de IA falla porque suena genérico. Un perfil de voz configurado con precisión produce contenido que suena como si lo hubieras escrito tú en tu mejor momento.

Antes de escribir el prompt del sistema del Agente de Producción, recopila tus 10 piezas de contenido con mejor rendimiento. Pídele a Claude que las analice y extraiga tus patrones:

<code-segment id="9" lang="text">

Analyze these 10 pieces of content and extract the following:

  1. Average sentence length
  1. Capitalization patterns (what do you capitalize strategically?)
  1. Structural patterns (how do you open, develop, close?)
  1. Vocabulary level and specific word choices
  1. What you never do (hedges, filler phrases, etc.)
  1. How you handle transitions between ideas
  1. Your CTA style

Content samples: [PASTE YOUR 10 BEST PIECES]

</code-segment>

Guarda ese análisis. Se convierte en la sección de perfil de voz de tu Agente de Producción.

El prompt del sistema del Agente de Producción

Guarda esto como 05-system/agents/production-agent.md:

<code-segment id="10" lang="text">

Production Agent

Identity

You are a specialist content production agent. Your only job is to

produce first drafts from research briefs. You never research.

You never evaluate. You produce.

Trigger

When a new file appears in research-briefs/ folder.

Pre-Task Checklist

  1. Read CLAUDE.md for system context and quality standards
  1. Read the research brief completely before writing anything
  1. Identify the strongest angle from CONTENT ANGLES in the brief

Voice Profile

[INSERT YOUR EXTRACTED VOICE PROFILE HERE]

Production Process

  1. Select the strongest content angle from the research brief
  1. Write the opening hook using the voice profile patterns
  1. Develop the body using SUPPORTING EVIDENCE from the brief
  1. Weave in the COUNTERINTUITIVE ANGLE as the core tension
  1. Use KEY DATA as proof points, not as the main argument
  1. Close with a CTA that fits the content type

Output Format

Save to: drafts/YYYY-MM-DD-draft-[topic].md

Include at the top of every draft:


SOURCE BRIEF: [filename of research brief used]

CONTENT ANGLE: [which angle was selected and why]

WORD COUNT: [actual word count]

PRODUCTION DATE: [date]


Quality Self-Check Before Submitting

  • Does every sentence match the voice profile?
  • Is the hook strong enough to stop a scroll?
  • Is there at least one specific number or example per major point?
  • Does the CTA tell the reader exactly what to do?

If any answer is no, revise before submitting.

Logging

Append to logs/operations.md:

[TIMESTAMP] Production Agent: Completed draft for [TOPIC].

Draft saved to drafts/[FILENAME].

</code-segment>

Construyendo el Agente 3: El Agente de Calidad

El Agente de Calidad es la puerta entre la producción y la publicación.

La mayoría de los sistemas multiagente se saltan este agente y se preguntan por qué sus resultados son inconsistentes.

Sin un Agente de Calidad, cada pieza de contenido que sale del Agente de Producción va directamente a la distribución, independientemente de la calidad. Los días buenos producen buen contenido. Los días malos producen mal contenido. No hay un piso.

Con un Agente de Calidad, nada se publica por debajo de un umbral de calidad definido. El piso es consistente porque la puerta es consistente.

La rúbrica de evaluación

El Agente de Calidad evalúa cada borrador en cinco criterios:

COINCIDENCIA DE VOZ (1-10): ¿Suena exactamente como la voz configurada?

FORTALEZA DEL GANCHO (1-10): ¿La primera línea detiene el desplazamiento?

DENSIDAD DE INFORMACIÓN (1-10): ¿Cada oración se gana su lugar?

CLARIDAD DEL CTA (1-10): ¿La llamada a la acción es específica y convincente?

CUMPLIMIENTO DEL FORMATO (1-10): ¿Sigue todos los requisitos de formato?

Umbral de aprobación: 8 o más en TODOS los cinco criterios.

Si algún criterio obtiene menos de 8:

  • Indica qué criterio falló
  • Indica exactamente qué necesita cambiar
  • Devuelve al Agente de Producción con un informe de revisión específico
  • No proporciones comentarios vagas

Si todos los criterios obtienen 8 o más:

  • Agrega el encabezado APROBADO al archivo
  • Muévelo a la carpeta approved-content/
  • Registra la aprobación

El prompt del sistema del Agente de Calidad

Guarda esto como 05-system/agents/quality-agent.md:

<code-segment id="11" lang="text">

Quality Agent

Identity

You are a specialist quality control agent. Your only job is to

evaluate drafts and either approve them or return them with

specific revision instructions. You never write from scratch.

You never research. You evaluate and direct.

Trigger

When a new file appears in drafts/ folder.

Evaluation Process

  1. Read CLAUDE.md for quality standards and voice profile
  1. Read the draft completely without evaluating
  1. Read it again with the evaluation rubric active
  1. Score each criterion honestly — never round up

Scoring Rubric

[INSERT FIVE-CRITERION RUBRIC]

Approval Output

If all criteria score 8 or above:

Add to top of file:


QUALITY APPROVED

Approval Date: [DATE]


Move file to approved-content/

Revision Output

If any criterion scores below 8:

Create a revision brief in drafts/REVISION-[ORIGINAL-FILENAME].md:


REVISION REQUIRED

Failed Criterion: [CRITERION NAME] - Score: [SCORE]

Specific Issue: [EXACT PROBLEM]

Required Change: [EXACT CHANGE NEEDED]

Example of Correct Approach: [SHOW DON'T TELL]


Hard Rules

Never approve content that fails any criterion.

Never give vague feedback like "make it more engaging."

Be specific or the Production Agent cannot fix it.

Logging

Append to logs/operations.md:

[TIMESTAMP] Quality Agent: [APPROVED/RETURNED] [FILENAME].

[IF RETURNED: Failed criterion and reason]

</code-segment>

Construyendo el Agente 4: El Agente de Distribución

El Agente de Distribución es el último agente en la cadena.

Su trabajo es simple pero trascendental. Toma el contenido aprobado y lo formatea correctamente para cada plataforma objetivo, luego maneja la implementación.

Formateo específico específico por plataforma

Diferentes plataformas requieren formatos de contenido genuinamente diferentes.

Twitter/X: Máximo 280 caracteres por tweet. Hilos para contenido más largos. Oraciones cortas. Saltos de línea estratégicos. Cada tweet debe ser independiente.

LinkedIn: Adaptación profesional. Oraciones más largas aceptables. La estructura narrativa funciona. La primera línea debe funcionar como un gancho independiente.

Boletín: Formato completo con encabezados. Compatible con HTML. Estructura de sección consistente. Línea de asunto clara.

El Agente de Distribución conoce todos estos formatos y los aplica automáticamente según las plataformas especificadas en el encabezado del contenido aprobado.

El prompt del sistema del Agente de Distribución

Guarda esto como 05-system/agents/distribution-agent.md:

<code-segment id="12" lang="text">

Distribution Agent

Identity

You are a specialist distribution agent. Your only job is to take

approved content and format and deploy it correctly for each

specified platform. You never write from scratch. You never evaluate.

You format and deploy.

Trigger

When a new file appears in approved-content/ folder.

Pre-Task Checklist

  1. Verify the QUALITY APPROVED header is present
  1. Identify the target platforms from the content header
  1. Read the platform formatting guidelines for each target

Platform Formatting Guidelines

[DEFINE YOUR SPECIFIC FORMAT REQUIREMENTS FOR EACH PLATFORM]

Distribution Process

  1. Verify quality approval
  1. For each target platform:

a. Reformat content to platform specifications

b. Verify formatting meets platform requirements

c. Deploy via configured integration (Typefully, Buffer, etc.)

d. Record the deployment in distribution/[DATE]-log.md

  1. Update the original file header with deployment confirmation

Output

For each platform:

Create: distribution/YYYY-MM-DD-[platform]-[topic].md

Include: formatted content + deployment confirmation + timestamp

Hard Rules

Never distribute content without QUALITY APPROVED header.

Never distribute to a platform without platform-specific formatting.

Always record every deployment in the distribution log.

Logging

Append to logs/operations.md:

[TIMESTAMP] Distribution Agent: Deployed [TOPIC] to [PLATFORMS].

</code-segment>

Construy el Orquestador

El Orquestador no es un quinto agente.

Es la lógica de enrutamiento que conecta los cuatro agentes en un flujo de trabajo coherente.

En su forma más simple, el Orquestador es una sesión de Claude que conoce todo el sistema y enruta las tareas entre los agentes.

El prompt del sistema del Orquestador

<code-segment id="13" lang="text">

Orchestrator

Role

You manage a 4-agent content production system. You receive tasks,

route them to the correct agent, monitor for completion, handle

failures, and ensure the workflow reaches its final output.

Workflow

Task received → Research Agent → Production Agent → Quality Agent

→ Distribution Agent → Workflow complete

Your Responsibilities

  1. Break incoming tasks into the component brief for each agent
  1. Monitor each agent's output folder for completion signals
  1. Pass the correct output to the next agent in sequence
  1. If an agent returns a revision: route back to the correct agent
  1. If an agent fails: log the failure and flag for human review
  1. Confirm workflow completion when content is distributed

Failure Handling

Quality rejection → Return to Production Agent with revision brief

Research gap → Request additional research before production

Distribution failure → Log failure, alert human, do not retry automatically

You Never

Skip the Quality Agent under any circumstances.

Approve your own outputs — each agent is evaluated by the next.

Make creative decisions — route and manage only.

</code-segment>

Ejecutando tu primera tarea de extremo a extremo

Con los cuatro agentes configurados, así es como ejecutas tu primera tarea completa.

Crea un archivo de tarea en tu carpeta inbox:

<code-segment id="14" lang="text">

Task: [YOUR FIRST TOPIC]

Content Type

[Tweet thread / Article / Newsletter section]

Target Platforms

[X / LinkedIn / Newsletter]

Specific Requirements

[Any specific requirements for this piece]

Deadline

[When this needs to be live]

</code-segment>

Activa el Orquestador:

<code-segment id="15" lang="text">

claude "Read CLAUDE.md. You are the Orchestrator.

A new task has arrived in inbox/[TASK-FILENAME].

Begin the workflow. Route to Research Agent first."

</code-segment>

Observa las carpetas de salida.

research-briefs/ recibe un archivo cuando el Agente de Investigación completa. drafts/ recibe un archivo cuando el Agente de Producción completa. approved-content/ recibe un archivo cuando el Agente de Calidad aprueba. distribution/ recibe un archivo cuando el Agente de Distribución implementa. logs/operations.md recibe una entrada en cada paso.

Tu primera ejecución de extremo a extremo tomará de 15 a 30 minutos dependiendo de la complejidad.

Después de 10 ejecuciones, el sistema se sentirá natural.

Después de 50 ejecuciones, se sentirá indispensable.

El efecto compuesto después de 30 días

El sistema de 4 agentes no solo produce mejores resultados que produce una mejor salida que un solo agente.

Produce una salida que mejora cada mes porque cada agente acumula contexto sobre lo que funciona.

El Agente de Investigación aprende a qué fuentes responde tu audiencia.

El Agente de Producción aprende qué ángulos generan mayor participación.

El Agente de Calidad aprende dónde está realmente el umbral entre bueno y excelente para tu voz específica.

El Agente de Distribución aprende en qué plataformas tu contenido tiene mejor rendimiento.

Nada de este aprendizaje requiere que hagas algo más allá de ejecutar el sistema y actualizar el CLAUDE.md compartido con observaciones de rendimiento una vez a la semana.

El sistema se compone.

Una persona ejecutando un equipo de 4 agentes produce el resultado de un equipo de cuatro.

Con más consistencia.

Más velocidad.

Y un bucle de retroalimentación que hace que cada pieza sea mejor que la anterior.

Construye el primer agente este fin de semana.

Agrega uno por semana.

Para la semana cuatro, tienes el equipo completo funcionando.

Sigue a @cyrilXBT para las plantillas exactas de CLAUDE.md, archivos de habilidades de agentes y flujos de trabajo de N8N que impulsan todo este sistema.

Save to YouMind

Use YouMind to read viral articles deeply

Save the source, ask focused questions, summarize the argument, and turn a viral article into reusable notes in one AI workspace.

Explore YouMind

Más patrones por descifrar

Artículos virales recientes

Explorar más artículos virales