managed-agents-events

Manage Anthropic Managed Agents SSE streams with session handling and reconnection.

2|1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/Folken2/nuvel --skill managed-agents-events
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managed-agents-events
Source: https://github.com/Folken2/nuvel/tree/main/nuvel/backends/anthropic_managed_agents/skills/managed-agents-events
Command: npx skills add https://github.com/Folken2/nuvel --skill managed-agents-events

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the complexity of managing SSE event streams in Anthropic Managed Agents, preventing common issues like session hangs, lost events during reconnections, and incorrect handling of idle states.

Core Features & Use Cases

  • Stream-First Ordering: Ensures event streams are initialized correctly to capture the full lifecycle of an agent turn.
  • Idle-Break Logic: Provides a robust pattern for distinguishing between transient idle states (waiting for tools) and terminal session completion.
  • Lossless Reconnection: Implements a history-consolidation pattern to recover events missed during network drops or deployment restarts.
  • Use Case: Use this when building a production-grade orchestrator loop that requires high reliability, custom tool integration, and seamless recovery from connection interruptions.

Quick Start

Implement the event loop by initializing the session stream before sending the user message and applying the idle-break gate logic to handle tool calls and session termination.

Frequently Asked Questions about managed-agents-events

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle SSE event streams for Anthropic Managed Agents without losing events during reconnections?

Lossless reconnection for Anthropic Managed Agents is handled by implementing a history-consolidation pattern that recovers events missed during network drops or deployment restarts. This ensures your orchestrator loop maintains reliable state synchronization without data loss.

What is the best way to distinguish transient idle states from terminal session completion in Anthropic agent streams?

Distinguishing transient idle states from terminal session completion requires an idle-break logic pattern. This mechanism properly gates tool execution and permission handling, preventing session hangs when an agent is waiting for tool calls versus reaching final completion.

Why do my Anthropic Managed Agents session hangs occur when waiting for custom tool execution?

Session hangs during custom tool execution occur when idle states are not properly gated. Implementing robust idle-break logic distinguishes between waiting for tools and terminal completion, preventing the orchestrator loop from stalling indefinitely.

Does the Anthropic Agent SDK support lossless stream reconnection for production-grade orchestrator loops?

Yes, the Anthropic Agent SDK supports lossless stream reconnection through history-consolidation patterns. This satisfies technical requirements for real-time agent interaction, event deduplication, and proper idle-state management within a high-reliability orchestrator.