Run a command on the agent
(self, user_id: str, agent_id: str, command: str)
| 1075 | finally: |
| 1076 | # No cleanup needed - context automatically isolated per request |
| 1077 | pass |
| 1078 | |
| 1079 | # @LockingServer.agent_lock_decorator |
| 1080 | async def run_command(self, user_id: str, agent_id: str, command: str) -> MirixUsageStatistics: |
| 1081 | """Run a command on the agent""" |
| 1082 | # If the input begins with a command prefix, attempt to process it as a command |
| 1083 | if command.startswith("/"): |
| 1084 | if len(command) > 1: |
| 1085 | command = command[1:] # strip the prefix |
| 1086 | return await self._command(user_id=user_id, agent_id=agent_id, command=command) |