# GizDesk workspace lab

> **Volume:** 4: Autonomous Agents & Generative Systems
> **Source Directory:** [`desk/`](https://github.com/gizai/gizlang/tree/main/desk/), [`docs/guides/desk.md`](../guides/desk.md)
> **Running Endpoint:** `http://127.0.0.1:8120/`
> **Status:** Live Verified Daemon
> **Visual Evidence:** every `docs/images/guidebook/gizdesk-*.png`, taken by `tools/browser/guidebook.giz` from a running Desk

---

## 1. Architectural Philosophy: The Integrated Agent Workspace

GizDesk is a first-class AI agent workspace built entirely in Gizlang and GizWeb. It unifies conversational interactions with live interactive computing artifacts:

```
┌────────────────────────────────────────┬────────────────────────────────────────┐
│        Conversational Agent Pane       │        Interactive Artifacts Pane      │
│  (Multi-Model Streaming, Voice, Chat)  │  (Live Code, Documents, SQL, Diagrams) │
├────────────────────────────────────────┼────────────────────────────────────────┤
│ • Model Switcher (Qwen, Llama, Nemotron)│ • Code Editor & Native Execution Run  │
│ • Typed Tool Execution with Approval   │ • Live Interactive Render Previews    │
│ • Long-Term Memory & Knowledge Base    │ • Semantic Versioning & Diff History  │
└────────────────────────────────────────┴────────────────────────────────────────┘
```

---

## 2. Live Screenshot Evidence

The following screenshot was captured directly from the active GizDesk daemon running on `http://127.0.0.1:8120/`:

![GizDesk Real-Time Workspace](../images/guidebook/gizdesk-workspace.png)

### Knowledge Base & Reference Sources View
When clicking the `Knowledge` tab on the right workspace pane, the system exposes persistent reference storage, allowing documents, research papers, and codebase schemas to be attached to the agent:

![GizDesk Knowledge Base Panel](../images/guidebook/gizdesk-knowledge-panel.png)

### Model accounts and computer connections

The Connections screen owns provider accounts, quota state, rotation order, and remote computer entries:

![GizDesk Connections](../images/guidebook/gizdesk-connections.png)

Credentials stay out of the visible account record. Provider health and usage are shown without tokens, and a limited
account yields to the next ready account. The *Computers* tab lists the computers the agent may work on; every remote
command still waits for approval:

![GizDesk Computers](../images/guidebook/gizdesk-computers.png)

### Drive: the Desk's own files

Drive (`desk/drive/`, imported by any host as `gizdesk:drive/*`) is the whole Drive: file trees, history, search,
share links, comments, stars and its HTTP API. A Desk serves its own Drive at `/drive` with no giz.ai account and
no host around it: files live in `GIZDESK_DATA/drive/files`, records in `GIZDESK_DATA/drive/records.db`, and the
Desk's one owner owns it. giz.ai's hosted stack (gizstack) imports the same modules and only supplies who a person
is and which Drives they reach.

![GizDesk Drive with a file open](../images/guidebook/gizdesk-drive.png)

The same Drive as tiles, and a search across names and contents:

![GizDesk Drive grid](../images/guidebook/gizdesk-drive-grid.png)

![GizDesk Drive search](../images/guidebook/gizdesk-drive-search.png)

Sharing makes a link (viewer or editor, optional password and expiry). The link's page is served by the Desk itself
at `/_share/TOKEN`, so anyone who can reach the Desk can open it without an account:

![GizDesk Drive share dialog](../images/guidebook/gizdesk-drive-share.png)

![GizDesk Drive share link page](../images/guidebook/gizdesk-drive-link.png)

Every change is recorded; the activity view lists them, and the layout fits a phone:

![GizDesk Drive activity](../images/guidebook/gizdesk-drive-activity.png)

<img src="../images/guidebook/gizdesk-drive-phone.png" alt="GizDesk Drive on a phone" width="260">

The Drive's bytes do not pass through the pages: a `Pages.Mount` answers `/_drive/…`, `/_share/…` and S3 beside them
and streams both ways, so an upload or a download has no size limit. On a laptop, a 1 GiB upload form reached the disk
in 0.41 s and the same file came back in 0.26–0.46 s (`curl`, loopback, page cache warm).

S3 works against the Desk itself. *S3 access* makes a key and shows the endpoint (the Desk's own address), the bucket
(`desk`) and the commands to paste; any S3 client then lists, copies and syncs the Drive (path-style addressing):

![GizDesk Drive S3 access keys](../images/guidebook/gizdesk-drive-s3.png)

```sh
aws configure set default.s3.addressing_style path
aws --endpoint-url http://127.0.0.1:8080 s3 cp big.iso s3://desk/Research/
```

The AWS CLI sends a large file in 8 MiB parts; the Desk keeps each part as a file and joins them in the kernel. On the
same laptop, 100 MiB went up in 1.3–1.9 s and came back, byte for byte, in about 0.55 s.

Connections → *Services* connects what the Drive sends and opens, with no giz.ai in between: one mailer URL
(`smtp://`, `smtps://`, `ses://` or `resend://`, `gizlang:mail`) sends share invitations and a secured Desk's sign-in
links, and the address of an office engine you run yourself (Collabora Online or CODE, or ONLYOFFICE Docs with WOPI on)
edits Word, Excel and PowerPoint files in the browser. *Check* reads the engine's WOPI discovery. The page shows the
mailer's transport, host and sender, never its password; the settings are in `GIZDESK_DATA/services.json`.

![GizDesk Connections Services](../images/guidebook/gizdesk-services.png)

With an engine connected, a document's preview offers *Edit in Office*; the engine opens it in a frame and saves
through the Desk's WOPI endpoint, with a ten-hour access token for that file:

![GizDesk Drive Edit in Office](../images/guidebook/gizdesk-drive-office.png)

A link to one person mails them its address with a key; opening the mail's link keeps the key in that browser. The
link's address alone, without the key from the mail, does not open.

### Data Studio and Data & ML

![GizDesk Data Studio with sample sales rows](../images/guidebook/gizdesk-data-studio.png)

The same sample query rendered as a chart:

![GizDesk Data Studio chart](../images/guidebook/gizdesk-data-studio-chart.png)

Data & ML with a completed regression comparison and deployment approval:

![GizDesk Data and ML](../images/guidebook/gizdesk-ml.png)

The metric catalog turns the exact query into a reusable governed definition:

![GizDesk governed metrics](../images/guidebook/gizdesk-metrics-catalog.png)

No-code collection design remains approval-gated and uses the same Data change owner:

![GizDesk no-code builder](../images/guidebook/gizdesk-data-builder.png)

### Key UI Subsystems Verified in the Live Session:
1. **Left Navigation Panel**:
   - `New conversation` button and conversation search.
   - Dedicated `Assistant` agent view.
   - Project directory: `＋ New project`, `All conversations`, `Show archived`.
2. **Central Conversational Interface**:
   - Model selection dropdown: actively connected to `Qwen 3.5 4B · this computer` running via local GPU inference.
   - `Talk` button: real-time voice interaction powered by the native OmniVoice audio pipeline.
   - Suggestion prompts: `"Draw a fox in the snow, then film it running"` (routing to Flux diffusion and LTX-Video pipelines).
3. **Right Artifacts & Management Workspace**:
   - Tabbed view: `Overview`, `Artifacts`, `Agents`, `Automations`, `Knowledge`, `Activity`.
   - `＋ New artifact`: Allows creating live documents or code directly inside the agent loop.
   - Persistent memory and knowledge integration for external PDF and database sources.

---

## 3. Launching GizDesk Locally

To run GizDesk as a standalone workspace:

```sh
# Launch GizDesk via the official CLI subcommand:
giz desk
```

Or run directly from source:
```sh
giz run desk/main.giz
```

The daemon binds to `127.0.0.1:8080` (`GIZDESK_PORT`), keeps conversations, artifacts and the Drive in `data`
(`GIZDESK_DATA`), and discovers available GPU inference endpoints.

### Retaking the screenshots

Every `gizdesk-*.png` in this chapter is taken from a running Desk by a real browser, never mocked up:

```sh
cd desk && GIZDESK_PORT=8391 GIZDESK_DATA=/tmp/deskdemo giz run main.giz &
giz run tools/browser/guidebook.giz http://127.0.0.1:8391 docs/images/guidebook          # every shot
giz run tools/browser/guidebook.giz http://127.0.0.1:8391 docs/images/guidebook gizdesk-drive
```

The Drive shots expect a folder `Projects` holding `plan.md`, a file whose contents mention `notes`, and a share link
on `Projects`; make them once in the Desk's Drive before taking the shots.
