AI platform and ASK Desktop

I look after ASK, the school's AI platform based on OpenWebUI. On top of it I'm building ASK Desktop, a harness that turns the chat into an agent: it works in a folder on the laptop, runs code, checks its results and can undo every task.

Context
Apprenticeship, AI team
School
Technische Fachschule Bern
Status
In development
Tools
OpenWebUI, Tauri 2, Rust, React, Python, GitHub Actions

The starting point

ASK is the OpenWebUI instance that learners at the TF Bern use. I look after it in the AI team and drew its network plan: the DMZ and the Docker services inside it. In the browser, ASK can only chat. It can't open a folder, run a script or check whether its answer works.

Tools like Claude Code show what an agent can do when it works directly in the files. ASK Desktop brings that way of working to the school's own model, without the learners needing admin rights or a server of their own.

How it's built

  • You sign in once on the ASK page, also with the Microsoft account. After that the app talks to the model directly through ASK's API, streamed and with a list of tools.
  • The app runs the tools itself: read, write and edit files, search, run commands, keep a task list. ASK only ever sees text, and the ASK server never reaches the laptop.
  • Commands run in a terminal server of its own, written in Rust, on 127.0.0.1 with low integrity level and a folder lock. The model can write in the chosen folder, not in the rest of the system.
  • Before every task the app saves the whole folder. Afterwards the chat shows what changed, with an undo button.
  • Built-in skills for Word, Excel, PowerPoint and PDF, a Python of its own, a browser pane, GitHub, projects, memory and helper agents.
  1. Chat in the appReact interface in Tauri, every step visible as a line.
  2. ASK APIThe model answers with text or a tool call.
  3. Agent loop in RustChecks the call and runs it.
  4. Sandboxed terminalLow integrity, locked to the chosen folder.
How a task goes from the chat to the laptop and back.
PLACEHOLDER: ASK Desktop during a task. Each step appears as a line like ● Command(python analysis.py) with its output below.

Challenges and solutions

The terminal had no folder lock

The first version used open-terminal, the terminal server of OpenWebUI. In the test its file API accepted paths with .. and absolute paths, so the model could read C:\Windows\win.ini. It also listened on all networks by default.

Solution: A terminal server of its own in Rust with the same interface, bound to 127.0.0.1, with a folder lock in the file API. Commands run with low integrity level in a job object. If a folder can't be marked, the app refuses it instead of running without protection.

What the model writes can't be trusted

The terminal is sandboxed, the app itself is not. A review found three ways out: a manipulated backup list made undo write outside the folder, a double click would start a .bat file the model had created, and the check for external links in Office files could be bypassed.

Solution: Backups moved out of the working folder and every entry is checked when read. Without asking, the app only opens documents, images and text. Office files are parsed properly, and whatever can't be read counts as rejected.

ASK doesn't always pass on the tools

Depending on the model and settings, ASK rejects the tool list or the model writes its tool calls as plain text.

Solution: A text mode. The app then describes the tools in the system prompt, reads the calls out of the text and sends the results back in the same format.

PLACEHOLDER: after a task the chat shows what changed in the folder, and one click resets it.

My role

I decide what the app has to do and what it must not do, for example that it never works around a setting of the ASK admins and refuses a folder it can't protect. I write the code with AI, test every version and run the releases.

Every decision taken along the way is written down with its reason, more than 80 so far, including the switch from Electron to Tauri with a main process in Rust.

What I learned

  • How an agent worksThe loop of model, tool call and result, and why context and instructions matter so much with a smaller model.
  • Sandboxing on WindowsIntegrity levels, job objects and why a sandbox is only as strong as what the app trusts afterwards.
  • Shipping softwareSigned updates, beta and full releases by label, and CI on Linux and Windows for every pull request.
  • Writing decisions downA decision with its reason saves the same discussion twice.

What I'd do differently

I would start directly with Tauri and a terminal server of my own. Moving from Electron and open-terminal later meant porting about 9,700 lines and keeping installed apps updating across the switch.