Volver al blog
dapr-agents: Agentes IA con Workflows de Dapr

dapr-agents: Agentes IA con Workflows de Dapr

Building AI agents that survive failures, maintain state across long conversations, and coordinate with other agents requires distributed systems infrastructure. dapr-agents provides this infrastructure as a Python framework, combining LLM-powered reasoning with Dapr’s workflow orchestration, state management, and observability.

Construir agentes IA que sobrevivan fallos, mantengan estado a través de conversaciones largas, y coordinen con otros agentes requiere infraestructura de sistemas distribuidos. dapr-agents provee esta infraestructura como un framework de Python, combinando razonamiento potenciado por LLM con orquestación de workflows de Dapr, gestión de estado y observabilidad.

Agents are defined through Python decorators that declare their structure and capabilities. The @agent decorator establishes the agent’s identity, LLM configuration, tools, and memory. This is type-safe, declarative agent definition—not imperative prompt hacking.

Los agentes se definen a través de decoradores de Python que declaran su estructura y capacidades. El decorador @agent establece la identidad del agente, configuración de LLM, herramientas y memoria. Esto es definición de agente tipada y declarativa—no hacking de prompts imperativo.

@agent(name="researcher", tools=[search_web, fetch_content])
class ResearchAgent:
    persona = "You are a thorough research assistant."

Every agent runs as a DurableAgent, backed by Dapr Workflows. Each reasoning step persists to durable storage. Network failures, process crashes, scaling events—execution continues from the last checkpoint.

Cada agente corre como un DurableAgent, respaldado por Dapr Workflows. Cada paso de razonamiento persiste en almacenamiento durable. Fallos de red, fallos de proceso, eventos de escalamiento—la ejecución continúa desde el último checkpoint.

The workflow engine manages state automatically. Query progress mid-execution, retrieve final results, or cancel abandoned runs. The agent exposes HTTP endpoints for triggering and status checking—a clear interface between your app and the agent runtime.

El motor de workflow gestiona el estado automáticamente. Consulta progreso en medio de ejecución, recupera resultados finales, o cancela ejecuciones abandonadas. El agente expone endpoints HTTP para activar y verificar status—una interfaz clara entre tu app y el runtime del agente.

Scale-to-zero: Thousands of agents share the underlying actor pool. When unused, agents are deactivated but retain state. Reactivate on demand—same agent, same conversation context, zero infrastructure overhead.

Scale-to-zero: Miles de agentes comparten el pool de actores subyacente. Cuando no se usan, los agentes se desactivan pero retienen estado. Reactiva bajo demanda—mismo agente, mismo contexto de conversación, cero overhead de infraestructura.

Orchestrate multiple specialized agents using Dapr Workflows. A research agent gathers information, a writer agent synthesizes, an editor agent polishes the output. Each agent is a child workflow—deterministic orchestration with LLM-powered steps.

Orquesta múltiples agentes especializados usando Dapr Workflows. Un agente de investigación recopila información, un agente escritor sintetiza, un agente editor pule el resultado. Cada agente es un workflow hijo—orquestación determinista con pasos potenciados por LLM.

Tool binding connects agents. One agent’s tool calls another agent. The DurableAgent exposes tools to other agents, enabling delegation without tight coupling.

La vinculación de herramientas conecta agentes. Las herramientas de un agente llaman a otro agente. El DurableAgent expone herramientas a otros agentes, habilitando delegación sin acoplamiento ajustado.

Human-in-the-loop pauses execution for user approval. The workflow waits, presents options, resumes based on user input.

Human-in-the-loop pausa ejecución para aprobación del usuario. El workflow espera, presenta opciones, reanuda basándose en entrada del usuario.

MCP Integration: dapr-agents supports the Model Context Protocol, allowing agents to discover and invoke tools exposed by any MCP-compatible server.

Integración MCP: dapr-agents soporta el Model Context Protocol, permitiendo a los agentes descubrir e invocar herramientas expuestas por cualquier servidor compatible con MCP.

Dapr State Store backs agent memory. Conversation history, learned preferences, retrieved context—persisted across sessions.

Dapr State Store respalda la memoria del agente. Historial de conversación, preferencias aprendidas, contexto recuperado—persistente entre sesiones.

OpenTelemetry tracing integrates with Zipkin, Jaeger, and standard collectors. Distributed tracing for agent systems.

Trazabilidad OpenTelemetry se integra con Zipkin, Jaeger y recolectores estándar. Trazabilidad distribuida para sistemas de agentes.


References

Referencias

Compartir