Skip to content

Add conversation start and stop endpoints #8883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 4, 2025

Conversation

tofarr
Copy link
Collaborator

@tofarr tofarr commented Jun 3, 2025

  • This change is worth documenting at https://docs.all-hands.dev/
  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality this introduces.

Added new API endpoints that allow users to explicitly start and stop conversations. This gives users more control over conversation lifecycle management, enabling them to manually decide which conversations are running.


Summarize what the PR does, explaining any non-trivial design decisions.

This PR adds two new REST API endpoints to manage conversation lifecycle:

  1. /api/conversations/{conversation_id}/start - Starts a previously stopped conversation
  2. /api/conversations/{conversation_id}/stop - Stops a running conversation without deleting it

The implementation leverages the existing conversation manager to handle the actual starting and stopping of agent loops. The endpoints include proper error handling and status reporting, returning appropriate HTTP status codes and messages.

Additionally, this PR includes fixes for nested runtimes to handle restarts more effectively and fixes for nested mount volumes, ensuring that conversations can be reliably started and stopped in containerized environments.


Link of any specific issues this addresses:


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:40fc56e-nikolaik   --name openhands-app-40fc56e   docker.all-hands.dev/all-hands-ai/openhands:40fc56e

Copy link

openhands-ai bot commented Jun 4, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Run Python Unit Tests

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #8883

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@tofarr tofarr marked this pull request as ready for review June 4, 2025 21:14
@tofarr tofarr merged commit 91e24a4 into main Jun 4, 2025
19 checks passed
@tofarr tofarr deleted the add-conversation-start-stop-endpoints branch June 4, 2025 22:29
raymyers pushed a commit that referenced this pull request Jun 6, 2025
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.

3 participants