Use server mode in Rovo Dev CLI
Use server mode in Rovo Dev CLI
Start in server mode
# Basic usage
rovodev serve 8123
# With initial message
rovodev serve 8123 "Open the README file"
# With shadow mode enabled
rovodev serve 8123 --shadow
To verify the server is running:
curl http://localhost:8123/healthcheck
# Response: {"status":"healthy","version":"0.11.26","mcp_servers":{"filesystem-tools":"running","atlassian":"running","bitbucket":"running"}}
Chat workflow
Set chat message
curl -X POST http://localhost:8123/v3/set_chat_message \
-H "Content-Type: application/json" \
-d '{"message": "Open a file and describe it", "enable_deep_plan": false}'
Stream response
Returns a stream of server-sent events showing Rovo Dev’s response in real-time.
curl http://localhost:8123/v3/stream_chat --no-buffer
Chat with deep planning
Deep planning creates a technical plan before executing changes, useful for complex modifications.
curl -X POST http://localhost:8123/v3/set_chat_message \
-H "Content-Type: application/json" \
-d '{"message": "Refactor the main.py file to use better error handling", "enable_deep_plan": true}'
curl http://localhost:8123/v3/stream_chat --no-buffer
Pause on tool calls
Pausing on tool calls is optional, but recommended to enable tool permissions flows. When paused, you can approve or deny tool calls.
curl "http://localhost:8123/v3/stream_chat?pause_on_call_tools_start=true" --no-buffer
To approve a tool execution:
curl -X POST http://localhost:8123/v3/resume_tool_calls \
-H "Content-Type: application/json" \
-d '{
"decisions": [
{
"tool_call_id": "toolu_vrtx_01CtgADk2XWPu4jhKVwiKaeP",
"deny_message": null
}
]
}'
Session management
curl http://localhost:8123/v3/sessions/list | jq .
- List all sessions.
curl http://localhost:8123/v3/sessions/current_session | jq .
- Get current session info.
curl -X POST http://localhost:8123/v3/sessions/create | jq .
- Create new session.
curl -X POST http://localhost:8123/v3/sessions/{session_id}/restore | jq .
- Restore previous session.
curl -X POST http://localhost:8123/v3/replay --no-buffer
- Replay session history.
Tool management
curl http://localhost:8123/v3/tools | jq .
- List all available tools.
To execute a tool directly:
curl -X POST http://localhost:8123/v3/tool \
-H "Content-Type: application/json" \
-d '{
"tool_name": "open_files",
"arguments": {
"file_paths": ["README.md"]
}
}' | jq .
File cache management
curl "http://localhost:8123/v3/cache-file-path?file_path=README.md" | jq .
- Get cached file path.
curl -X POST http://localhost:8123/v3/invalidate-file-cache | jq .
- Invalidate file cache.
Control operations
curl -X POST http://localhost:8123/v3/cancel | jq .
- Cancel ongoing chat.
curl -X POST http://localhost:8123/v3/reset | jq .
- Reset agent state.
curl -X POST http://localhost:8123/v3/prune | jq .
- Prune agent history.
Programming language examples
Python:
import requests
import json
# Start a chat
set_response = requests.post(
"http://localhost:8123/v3/set_chat_message",
json={"message": "List files in the project", "enable_deep_plan": False}
)
response = requests.get("http://localhost:8123/v3/stream_chat", stream=True)
# Process streaming response
for line in response.iter_lines():
if line:
line = line.decode('utf-8')
if line.startswith('data: '):
data = json.loads(line[6:])
print(f"Event: {data}")
Javascript:
// First, set the chat message
await fetch('http://localhost:8123/v3/set_chat_message', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
message: "Explain the project structure",
enable_deep_plan: false
})
});
// Then stream the response
const eventSource = new EventSource('http://localhost:8123/v3/stream_chat');
eventSource.onmessage = function(event) {
const data = JSON.parse(event.data);
console.log('Received:', data);
};
eventSource.onerror = function(event) {
console.error('Error:', event);
};
cURL with jq for pretty output:
# First, set the chat message
curl -X POST http://localhost:8123/v3/set_chat_message \
-H "Content-Type: application/json" \
-d '{"message": "Show me the project structure"}'
# Then stream and format JSON events
curl -X GET http://localhost:8123/v3/stream_chat \
--no-buffer | while IFS= read -r line; do
if [[ $line == data:* ]]; then
echo "$line" | sed 's/^data: //' | jq .
fi
done
Example use cases
Code analysis:
curl -X POST http://localhost:8123/v3/set_chat_message \
-H "Content-Type: application/json" \
-d '{"message": "Analyze the main.py file and suggest improvements"}'
curl -X GET http://localhost:8123/v3/stream_chat \
--no-buffer | while IFS= read -r line; do
if [[ $line == data:* ]]; then
echo "$line" | sed 's/^data: //' | jq .
fi
done
File operations:
curl -X POST http://localhost:8123/v3/set_chat_message \
-H "Content-Type: application/json" \
-d '{"message": "Create a new Python file with a basic FastAPI setup"}'
curl -X GET http://localhost:8123/v3/stream_chat \
--no-buffer | while IFS= read -r line; do
if [[ $line == data:* ]]; then
echo "$line" | sed 's/^data: //' | jq .
fi
done
Testing:
curl -X POST http://localhost:8123/v3/set_chat_message \
-H "Content-Type: application/json" \
-d '{"message": "Run the tests and show me any failures"}'
curl -X GET http://localhost:8123/v3/stream_chat \
--no-buffer | while IFS= read -r line; do
if [[ $line == data:* ]]; then
echo "$line" | sed 's/^data: //' | jq .
fi
done
Documentation:
curl -X POST http://localhost:8123/v3/set_chat_message \
-H "Content-Type: application/json" \
-d '{"message": "Generate documentation for the API endpoints"}'
curl -X GET http://localhost:8123/v3/stream_chat \
--no-buffer | while IFS= read -r line; do
if [[ $line == data:* ]]; then
echo "$line" | sed 's/^data: //' | jq .
fi
done
Server mode tips
Enable deep planning for complex tasks, like refactoring.
Always use
--no-buffer
with curl and handle SSE events correctly.Create new sessions for different contexts or tasks.
Was this helpful?