Skip to content

feat(agents): give an agent its own computer - #422

Merged
edenreich merged 1 commit into
mainfrom
feat/agent-computers
Nov 5, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/agent-computers

Conversation

@edenreich

@edenreich edenreich commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An agent can name a workspace of the infer daemon as its computer. A new chat with it is teleported there before its first run, so its computer use drives that machine and not the user's. A new Computers view shows the latest screen of each such chat side by side. With a Kubernetes workspace every chat gets a pod of its own.

Refs #417 - this places a new chat through CLI workspaces, the hand-off of a running chat stays open there.

Changes

  • workspace frontmatter key on Markdown agents, with a native <select id="agent-workspace"> in the agent editor listing the daemon's workspaces.
  • backend/src/workspaces.rs: list_workspaces, screen_frame and the teleport step, each on a short-lived daemon connection (thread::exchange). send_message teleports a brand-new chat and returns the error when that fails, it never falls back to this machine.
  • Computers view (Computers in the top bar, Open computer <name> tiles) polling the screen every 2 s while a chat runs.
  • Mock-mode shims, e2e/tests/agent-computers.yaml with a seeded workspace_agent, unit tests for the frames, the frontmatter and the tiles.
  • README and the AGENTS.md DOM contract.

Not covered: whether an agent's instructions and model carry over to the workspace after a teleport is untested.

Base automatically changed from fix/daemon-handshake to main November 5, 2026 12:52
@edenreich
edenreich marked this pull request as ready for review November 5, 2026 12:52
@edenreich

Copy link
Copy Markdown
Contributor Author

@infer can you resolve the merge conflict?

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Model: ollama_cloud/glm-5.3-flash · Action: v0.59.4 · CLI: v0.244.0 · Gateway: v0.63.0 · View Job

Todos

Pull Request

#422

✅ Infer Result: Success

The merge conflict is resolved and PR #422 is now mergeable.

Root cause

The branch carried its own copies of commits that had landed in main while this PR was open: 145c337 fix(daemon): drop protocol_version from the handshake (same change as main's bf8e1d6, which merged #421) and 4dbf804 chore(deps): bump infer to v0.244.0 (identical .flox blobs). The duplicated fix overlapping with the feature's edits to thread.rs made GitHub report CONFLICTING even though the shared content was byte-identical on both sides (verified blob-level).

Resolution

  • Re-homed the branch onto main's tip (bf8e1d6), keeping the feature tree exactly as validated: git reset --soft bf8e1d6, then git checkout origin/main -- .github/workflows/ci.yml so the branch no longer reverts main's tarball-download change.
  • Committed as one atomic commit 3a68c87 feat(agents): give an agent its own computer (message unchanged, Refs #417 preserved), dropping the two now-redundant commits since their content already lives in main verbatim.
  • The pre-commit hook ran the full suite against the commit and passed: prettier, final-newline check, bun run build, cargo fmt --check, cargo clippy -D warnings, cargo check, cargo test (~2m50s, all green).
  • Pushed with git push --force-with-lease (ae1c851...3a68c87); GitHub now reports mergeable: MERGEABLE (remaining BLOCKED status is just branch protection waiting on CI/review, not a conflict).
  • Refreshed the PR body: removed the stale "Stacked on fix(daemon): drop protocol_version from the handshake #421." sentence; everything else untouched.

Working tree is clean and in sync with origin. One caveat: the force-push rewrote the branch - the branch is now a single commit on top of main, so review comments pinned to the old three commit SHAs (ae1c851, 4dbf804, 145c337) will show as outdated on commits that no longer exist. No code content changed; the PR diff against main is the same feature, minus the redundant fix and dep bump.

Model: ollama_cloud/glm-5.3-flash · Action: v0.59.4 · CLI: v0.244.0 · Gateway: v0.63.0 · Exit Code: 0 · Duration: 8m 4s

Tokens: 1,538,780 in · 28,565 out · 1,567,345 total (32 requests)

Tool calls: 48 total · 100% success rate

Traces
Session: 1793883236-c34d9800

session (headless, success)                                                                        7m57s
├── chat ollama_cloud/glm-5.3-flash                                                                 2.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.2s
│           ╰── POST [inference-gateway, server]                                                    2.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.2s
├── execute_tool TodoWrite call_p5033f7b                                                            70µs
├── execute_tool Bash call_ne3qbnwq                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.2s
│           ╰── POST [inference-gateway, server]                                                    2.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.2s
├── execute_tool Bash call_qlj0cop1                                                                270ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.2s
│           ╰── POST [inference-gateway, server]                                                    1.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.2s
├── execute_tool Bash call_t546np6r                                                                  4ms
├── execute_tool Bash call_bj2s8v7i                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.7s
│           ╰── POST [inference-gateway, server]                                                    2.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.7s
├── chat ollama_cloud/glm-5.3-flash                                                                34.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      34.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    34.6s
│           ╰── POST [inference-gateway, server]                                                   34.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                34.6s
├── execute_tool Bash call_2pvqmfeg                                                                  4ms
├── execute_tool Bash call_fjyorlaq                                                                444ms
├── chat ollama_cloud/glm-5.3-flash                                                                 5.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.1s
│           ╰── POST [inference-gateway, server]                                                    5.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.1s
├── execute_tool Bash call_8yfxwnkx                                                                  5ms
├── execute_tool Bash call_up3jspcj                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                 7.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       7.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     7.5s
│           ╰── POST [inference-gateway, server]                                                    7.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 7.4s
├── execute_tool Bash call_vad1so44                                                                  5ms
├── execute_tool Bash call_vi8hm4m6                                                                  5ms
├── chat ollama_cloud/glm-5.3-flash                                                                 9.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       9.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     9.7s
│           ╰── POST [inference-gateway, server]                                                    9.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 9.7s
├── execute_tool Bash call_4ketvjqg                                                                  5ms
├── execute_tool Bash call_5q9htinr                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                10.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      10.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    10.6s
│           ╰── POST [inference-gateway, server]                                                   10.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                10.6s
├── execute_tool Bash call_jqnw8moe                                                                  4ms
├── execute_tool Bash call_orcx6p47                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                1m13s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      1m13s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    1m13s
│           ╰── POST [inference-gateway, server]                                                   1m13s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                1m13s
├── execute_tool Bash call_rr6n9ay5                                                                  8ms
├── chat ollama_cloud/glm-5.3-flash                                                                26.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      26.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    26.6s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       26.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                26.6s
├── execute_tool TodoWrite call_5n1od6u0                                                            74µs
├── execute_tool Bash call_9cqgg4hm                                                                 1.0s [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                                                 8.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       8.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     8.3s
│           ╰── POST [inference-gateway, server]                                                    8.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 8.3s
├── execute_tool Bash call_0cns3atq                                                                  1ms
├── execute_tool Read call_1hvp8md1                                                                439µs
├── execute_tool Read call_jau0w3t8                                                                551µs
├── execute_tool Bash call_sj7x5120                                                                  5ms
├── chat ollama_cloud/glm-5.3-flash                                                                 5.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.9s
│           ╰── POST [inference-gateway, server]                                                    5.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.9s
├── execute_tool Bash call_3o0fx412                                                                333ms
├── execute_tool Bash call_h5p6i0yg                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                17.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      17.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    17.0s
│           ╰── POST [inference-gateway, server]                                                   17.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                17.0s
├── execute_tool TodoWrite call_nnsox349                                                            60µs
├── execute_tool Bash call_ksbdgbfq                                                                  5ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.9s
│           ╰── POST [inference-gateway, server]                                                    3.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.9s
├── execute_tool Bash call_f4cev6m1                                                                  5ms
├── execute_tool Bash call_jyccydou                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.3s
│           ╰── POST [inference-gateway, server]                                                    2.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.3s
├── execute_tool Bash call_hkhinrq0                                                                  5ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.8s
│           ╰── POST [inference-gateway, server]                                                    1.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.8s
├── execute_tool Bash call_py76v0q6                                                                  5ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.6s
│           ╰── POST [inference-gateway, server]                                                    2.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.6s
├── execute_tool Write call_m9ryy71k                                                                 1ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.7s
│           ╰── POST [inference-gateway, server]                                                    1.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.7s
├── execute_tool Bash call_yl1bu54g                                                                  1ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.0s
│           ╰── POST [inference-gateway, server]                                                    3.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.0s
├── execute_tool Wait call_66d876la                                                                2m48s
├── chat ollama_cloud/glm-5.3-flash                                                                 2.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.7s
│           ╰── POST [inference-gateway, server]                                                    2.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.7s
├── execute_tool Bash call_nmwgh625                                                                  4ms
├── execute_tool Bash call_tl5g7uko                                                                  5ms
├── chat ollama_cloud/glm-5.3-flash                                                                 4.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.7s
│           ╰── POST [inference-gateway, server]                                                    4.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.7s
├── execute_tool Bash call_3g96rb4x                                                                 2.8s
├── chat ollama_cloud/glm-5.3-flash                                                                 4.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.8s
│           ╰── POST [inference-gateway, server]                                                    4.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.8s
├── execute_tool TodoWrite call_3dqt1ziw                                                            82µs
├── execute_tool Bash call_vkzwd1gd                                                                15.0s
├── chat ollama_cloud/glm-5.3-flash                                                                 5.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.0s
│           ╰── POST [inference-gateway, server]                                                    5.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.0s
├── execute_tool Bash call_vn0fi920                                                                839ms
├── chat ollama_cloud/glm-5.3-flash                                                                10.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      10.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    10.2s
│           ╰── POST [inference-gateway, server]                                                   10.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                10.2s
├── execute_tool TodoWrite call_cqoe8pim                                                            67µs
├── execute_tool Write call_t1ehae8x                                                                 1ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.4s
│           ╰── POST [inference-gateway, server]                                                    1.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.4s
├── execute_tool Bash call_y61xdcgw                                                                 1.8s
├── chat ollama_cloud/glm-5.3-flash                                                                 4.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.0s
│           ╰── POST [inference-gateway, server]                                                    4.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.0s
├── execute_tool Bash call_o3mvh9re                                                                  5ms
├── execute_tool Bash call_c2568il0                                                                596ms
├── chat ollama_cloud/glm-5.3-flash                                                                 6.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       6.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     6.1s
│           ╰── POST [inference-gateway, server]                                                    6.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 6.1s
├── execute_tool Memory call_oz4q7evh                                                               2.1s
├── chat ollama_cloud/glm-5.3-flash                                                                 6.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       6.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     6.8s
│           ╰── POST [inference-gateway, server]                                                    6.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 6.8s
├── chat ollama_cloud/glm-5.3-flash                                                                 1.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.9s
│           ╰── POST [inference-gateway, server]                                                    1.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.9s
├── execute_tool Bash call_s1lhsyro                                                                429ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.5s
│           ╰── POST [inference-gateway, server]                                                    2.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.5s
├── execute_tool TodoWrite call_xwegzue9                                                            70µs
╰── chat ollama_cloud/glm-5.3-flash                                                                 5.3s
    ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.2s
        ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.2s
            ╰── POST [inference-gateway, server]                                                    5.2s
                ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.2s
Stats
Tool Calls

╭───────────┬───────┬───────┬──────────╮
│ Tool      │ Calls │ Fail% │ Avg      │
├───────────┼───────┼───────┼──────────┤
│ Bash      │ 35    │ 3%    │ 678ms    │
│ TodoWrite │ 6     │ 0%    │ 72µs     │
│ Read      │ 2     │ 0%    │ 496µs    │
│ Write     │ 2     │ 0%    │ 1ms      │
│ Wait      │ 1     │ 0%    │ 167501ms │
│ Memory    │ 1     │ 0%    │ 2075ms   │
╰───────────┴───────┴───────┴──────────╯

Token Usage

╭────────────────────────────┬─────────┬─────────┬────────────┬─────────┬──────╮
│ Model                      │ Prompt  │ Cached  │ Completion │ Total   │ Cost │
├────────────────────────────┼─────────┼─────────┼────────────┼─────────┼──────┤
│ ollama_cloud/glm-5.3-flash │ 1538780 │ 1151360 │ 28565      │ 1567345 │ -    │
╰────────────────────────────┴─────────┴─────────┴────────────┴─────────┴──────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ headless │ 1        │
╰───────────┴──────────┴──────────╯

Triggered by edenreich · Infer Action · OSS

An agent can name a workspace of the infer daemon. A new chat with it is
teleported there before its first run, so its computer use drives that
machine. The Computers view shows the latest screen of each such chat.

Refs #417
@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.53.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-maintainer inference-gateway-maintainer Bot added the released Shipped in a release label Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant