Embedding bokeh-server

I’m new to bokeh, and am trying to decide if it’s appropriate for a task I want to do. I want to generate a number of plots with linked brushing, and then propagate the brushed region back to the calling python program. This looks like it ought to be possible using a bokeh-server app (e.g. the stock example app). My calling python program is, however, a conventional GUI program, rather than a web app. Ideally I would want to run the bokeh server in a thread within this program, and then be able to “attach” an app at run-time. Looking at the code server examples, it’s hard to see how to do this. I’d appreciate any pointers/suggestions.

Many thanks,