Skip to content

Add documentation for conversation.interrupt() feature#361

Draft
malhotra5 wants to merge 2 commits intomainfrom
feature/conversation-interrupt
Draft

Add documentation for conversation.interrupt() feature#361
malhotra5 wants to merge 2 commits intomainfrom
feature/conversation-interrupt

Conversation

@malhotra5
Copy link
Contributor

Summary

Documents the new conversation.interrupt() method that immediately cancels in-flight LLM calls.

Changes

  • Add sdk/guides/convo-interrupt.mdx guide explaining the interrupt feature
  • Add navigation entry in docs.json under "Conversation Features"

Related

This PR corresponds to the SDK PR: OpenHands/software-agent-sdk#2206

Documentation Content

The guide covers:

  • Difference between pause() and interrupt()
  • When to use interrupt() (expensive reasoning tasks, responsive Ctrl+C handling)
  • How it works internally (cancels async task, closes HTTP connection, raises LLMCancelledError)
  • Ready-to-run example with the Einstein puzzle task

Documents the new interrupt() method that immediately cancels in-flight
LLM calls, as opposed to pause() which waits for completion.

Co-authored-by: openhands <openhands@all-hands.dev>
Documents the 42_file_based_subagents.py example which shows how to define
sub-agents declaratively using AgentDefinition instead of factory functions.

Co-authored-by: openhands <openhands@all-hands.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants