-
Notifications
You must be signed in to change notification settings - Fork 62
feat: multi Agent OS server support in AskUiControllerClient#276
feat: multi Agent OS server support in AskUiControllerClient #276mlikasam-askui wants to merge 21 commits into
AskUiControllerClient #276Conversation
Replace single-controller config with a TargetComputer / TargetComputerManager abstraction. AskUiControllerClient now manages a list of local and remote controller servers, opens a gRPC connection per target on connect(), and routes agent-os actions to a single active target. Add tools for the agent to list, switch, and inspect the active target computer.
... target session GUID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't these 3 new tools also be in experimental?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see them as part of the default tool list, similar to the Android agent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not happy with the name "Server in general". So far, I was using the term "machine" when telling the agent that it is operating multiple devices.
The name of one machine could then be server. If we use the term server here, this will introduce ambiguity that might cause the currently working stuff to break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here (Server ->machine)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is this computer_id determined? By the user, e.g. in the init of the agent? Currently, they can set local_machine_name and remote_machine_name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be set by the user, or it defaults to the session ID, which is a UUID4.
philipph-askui
commented
May 14, 2026
tbh: at the moment I really like the concept with 2 dedicated toolsets to operate 2 machines. Still, I see that this here will scale also to even more machines.
Have you checked if the agent understands that it can operate multiple machines and that it calls the switch tool before executing operations if needed?
Further: we need to automatically adjust the system capabilities and device information prompts if multiple agentOS are added.
Also: we should definitely update the docs with this PR to explain these changes here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please find all occurance. in Strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have already such a function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can switch to the same computer? Should this not failing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please wrap a proper AgentOSServerManager Error around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have the server_manager inside the client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THis should not be here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intresting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
c20d744 to
55cdac0
Compare
...skui-controller-multi-target
@programminx-askui
programminx-askui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have a talk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AgentOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which user rights do you need to perfrom the query? Did you tested it without admin rights?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(削除) Why? When you have already on connected target in the list and then you add another unconnected new target. Then it does not connect the new target. (削除ここまで)
Why do we automaticaly connect to the target? This is only an add-function. Then I would prefere a param auto_connect = True. And replace the buggy implementation, when one target is connected, that the next one get's not connected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we delete this function? It does not make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still see no benefit of this funciton. -> please remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you trying to fix the logic from above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should be the Connection Livecycle of an Target? Is the Manager Responsible to connect to the targets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats happend when an exception is happing on the disconnect function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aer you not creating a new Exception? You should not manipulate a old one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have inside the Manager GRPC Code? This should be moved to the Client. We need to get rid of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does a Client has a Manager with multiple Targets? This should be another way around: Manager has Multiple Target and the Target should have the Client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to: MultiComputerTargetAgentOS
@programminx-askui
programminx-askui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @mlikasam-askui ,
I added some changes. But we have to do after this more work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to: MultiComputerTargetAgentOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to `ComputerTargetPool``
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not have a add function with accepts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should not accept a list. It should use the current pool and reset it
Rename the computer-specific Agent OS class and the multi-target classes to better reflect their scope. `AgentOs` is the computer Agent OS interface (mouse, keyboard, displays), not a universal abstraction — so it becomes `ComputerAgentOS` while preserving the "Agent OS" term. Renames: - AgentOs -> ComputerAgentOS - AskUiControllerClient -> MultiComputerTargetAgentOS - AgentOsTargetComputerManager -> ComputerTargetPool - AgentOsTargetComputer -> ComputerTarget - LocalAgentOsTargetComputer -> LocalComputerTarget - RemoteAgentOsTargetComputer -> RemoteComputerTarget Add `AgentOs = ComputerAgentOS` alias (still exported from askui.tools) to avoid breaking existing imports. Update docstrings to the new vocabulary and fix the reporter-source doc reference.
@programminx-askui
programminx-askui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge it in. And check where it crashes. :-D
@philipph-askui we need to be careful to find the breaking changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This exception handling will shoot us in the future in the food. But let's keep it for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's happend when one of the disconnect failed? SO the others does not get disconnected?
philipph-askui
commented
Jun 18, 2026
The following is still missing for me:
- updated docs
- an example
- How can I add a tool that the agent can only execute on one target, e.g. a FileReadTool from a specific base directory that only exists on one target?
Uh oh!
There was an error while loading. Please reload this page.
Summary
MultiComputerTargetAgentOScan now manage multiple Agent OS targetcomputers (local and/or remote) at once. One is active at a time and receives
the agent's actions; callers can switch at runtime or scope a switch to a
withblock.
New API:
ComputerTarget(base),LocalComputerTarget(replaces the oldAskUiControllerServer— owns the local controller subprocess; auto-detectsthe Windows
AskuiCoreServiceand switches to its port),RemoteComputerTarget(already-running remote controller, no processmanagement). Each target owns its own gRPC connection
(
ComputerTargetConnection).ComputerTargetPool— enforces invariants (at most one local, unique sessionGUIDs /
computer_ids / remote addresses), tracks the active target, andorchestrates connect/disconnect. Targets are addressed exclusively by
computer_id(singledictlookup; no secondary indices).MultiComputerTargetAgentOSand exposed throughComputerAgentOS/ComputerAgentOsFacade:add_agent_os_target_computer,describe_agent_os_target_computers(returns the targets'repr()strings,not live objects),
get_current_computer_target_id(returns thecomputer_idstring of the active target),
switch_agent_os_target_computer,reset_agent_os_target_computers,temporary_select.PpadbAgentOsgets a siblingtemporary_select(device_sn).ComputerAgentauto-registers three newact()tools so the LLM can drivemulti-target flows:
ComputerListAgentOsTargetComputersTool,ComputerSwitchAgentOsTargetComputerTool,ComputerGetCurrentComputerTargetIdTool.LocalComputerTargetandRemoteComputerTargetare re-exported from thetop-level
askuipackage.New unit tests cover the target-computer classes, the pool, the multi-target
client, and the new computer tools. The e2e test was updated to the new
constructor.
Example
Register targets up front and let
act()switch between them: