Skip to content

emka.web.id

writing knowledge, recording civilization

Menu
  • Home
  • Tutorial
  • Search
Menu

Building a local AI agent in Workshop on Ubuntu 26.10

Posted on October 28, 2026

Today, we’re building a fully local agentic coding sandbox on Ubuntu powered by Pi, inference snaps, and Canonical Workshop. This is how the end result looks.

In the center of the terminal I have the Pi coding agent. I can give it a simple prompt like “describe what is in the current directory.” Immediately you see on the bottom right that GPU activity is increasing. On the bottom left you can read the logs of the LLM that I’m serving locally, and in the center you can read the response being generated by the agent. I’m going to interrupt this just to show that all of that happened without any internet access.

You will learn how to recreate this exact setup step by step. Let’s look at the overall architecture.

Initially we need internet access so we can download all the necessary components. You can turn it off later if you want. We will run the Pi coding agent inside a Canonical Workshop container so that it is isolated from the host environment. We will use the Qwen 3 Coder inference snap. In my case I’m making full use of my AMD GPU, although a CPU-only setup also works. The coding agent and the inference snap are connected through a tunnel interface so the agent does not need anything else from the host.

First we install the Qwen 3 Coder snap:

sudo snap install qwen3-coder

In my case it is already installed. In your case you will need to allocate several gigabytes and wait a few minutes while the necessary components and model weights are downloaded.

We can check the status:

qwen3-coder status

You will see the endpoint, that it is active, and which engine is being used.

A quick note about the engines. Running:

qwen3-coder engines

shows several available engines. I’m using a development version of the snap, so I also have a Vulkan engine, which happens to work best with my hardware. You should also see a CPU engine and two GPU engines. Choose the one that works best for your hardware.

We can inspect the logs:

sudo snap logs qwen3-coder

All slots are idle, which means the LLM is ready.

We can also open a simple chat interface:

qwen3-coder chat

Giving it a short prompt such as “say hello” produces roughly 20–25 tokens per second, which is respectable considering the system is under load at the same time.

We can also query the endpoint directly:

curl http://127.0.0.1:8340/v1/models | jq

This shows the model ID that is being served. We will need this value later.

Regarding configuration: because I am running other workloads at the same time, I limited the context size of the model. You can list the available parameters with:

qwen3-coder get

Some parameters belong to the endpoint and others to the model itself. If you change any values, the snap will prompt you to restart.

Now let’s set up Workshop. First install it:

sudo snap install workshop

We also need LXD on the 6/stable channel, because Workshop uses LXD under the hood:

sudo snap install lxd --channel=6/stable

I move into the project I want to work on—in this case a fresh checkout of the Pi Coding Agent SDK. SDKs are the components that get installed inside a Workshop environment.

I create a workshop.yaml definition. The minimal properties are:

  • name: dev
  • base: ubuntu-26.04

I also declare the Pi SDK. With that definition I can launch the workshop:

workshop launch

Workshop fetches the Pi SDK from the store, starts the LXD containers, and when it finishes we can check the status:

workshop info

The status is “ready” and one SDK has been installed. Entering the environment:

workshop shell

changes the prompt. We now have access to the same files that exist on the host (including the workshop.yaml we just created), but otherwise the environment is isolated.

If we try to launch Pi at this point it will warn that no models are available, because the workshop is isolated from the host. We therefore need a tunnel interface, which is declared with slots and plugs.

In the Pi SDK we declare a plug:

plugs:
  llm-endpoint:
    interface: tunnel
    endpoint: http://localhost:8340

On the system side we declare the corresponding slot (again using the special system SDK):

slots:
  llm-endpoint:
    interface: tunnel
    endpoint: http://localhost:8340

After saving the changes we exit the workshop and refresh it:

workshop refresh

Then we manually connect the tunnel:

workshop connect pi:llm-endpoint system:llm-endpoint

Returning to the workshop shell, the same curl command now succeeds, confirming that networking works:

curl http://127.0.0.1:8340/v1/models

For convenience I also define a simple action in the workshop definition that launches Pi with any extra parameters I supply. After another workshop refresh I can run:

workshop run pi

We still need to tell Pi which model to use. Inside the workshop I edit ~/.pi/agents/agent/models.json and add a provider for the Qwen 3 Coder snap:

  • base_url: http://localhost:8340/v1
  • api: openai
  • api_key: any placeholder value (it is required but unused)
  • models: a list containing the exact model ID returned earlier, plus any customizations (for example "context_window": 150000)

With the configuration complete I can start Pi. Asking it to “describe what is in this repository” causes the LLM logs to start moving and Pi begins streaming the response while calling tools. GPU activity on the AMD card increases accordingly.

That is how you build a private, fully local agentic coding sandbox on Ubuntu. All the configuration files, including the workshop definition and the models.json, are linked below.

Source: Ubuntu Youtube Channel

Terbaru

  • How to Install Clean Windows 11 Without Any Bloatware (Step-by-Step Guide)
  • IP Address Rate Limiting is Flawed—Here is the Right Way to Do It
  • Are Fedora 45 Stuck in Its Comfort Zone? A Short Review
  • Hacktober Recap 2026, A Month Full of Dangerous CVE: eMudhra, Gitlab, Brotli, PHP, NodeJS etc
  • 7 Skill Keamanan Jaringan yang Membuat Network Engineer Makin Dibutuhkan
  • How to Spin Up Disposable macOS and Linux VMs on Apple Silicon with TartVM
  • Belajar Cyber Security dari Nol hingga Siap Kerja, Ini Roadmap Lengkapnya
  • Running Windows 11 on Apple Silicon: UTM vs. Parallels Desktop vs. VMware Fusion
  • Testing PikaOS, a Rolling Debian Distribution Special for Gaming and Content Creation
  • Engineering the On-Premises AI Data Center: An In-Depth Technical Review of the HP ZGX Fury AI Station
  • Trying my new Favourite Task Manager, TMOG on Omarchy Linux
  • ASRock Industrial AI Box A395: Is This the Best Compact Strix Halo System for Local AI?
  • Redox OS: A Rust-Based Microkernel Operating System (And How It Differs from Linux)
  • Canonical Is Bringing Back Ubuntu Core Desktop — This Time With a Clearer Plan
  • systemd Officially Adds Support for Rust Components
  • Rocky Linux Creator Builds a Brand-New “Not Linux” Kernel in 11 Days Using AI
  • Building a local AI agent in Workshop on Ubuntu 26.10
  • Omarchy 4.5 RC: 5 New Apps That Actually Look Useful
  • Worth It! Switching from Fedora KDE to Kubuntu
  • I’m Happy Using ‘Herdr’, The Fastest Growing Devtool written in Rust
  • Testing Goose on Omarchy Linux (App & CLI): The Open-Source Solution for Daily Task Automation
  • GNOME Founder Attacks Omarchy Founder as “Lazy, Racist, Ignorant”
  • Why I Stopped Using Plain Command Line Docker and Use Portainer 3.0 To Make My Home Projects Fun Again
  • Why I Switched to a Proper Firewall Box with OPNSense for My Homelab Stuff
  • Fixing Windows Error 0x80070005 Hyper-V Export Access Denied Error the Right Way
  • Fixing Hyper V Export Errors and Building a Better Virtual Machine Setup (error 0x80070002, 0x80070005)
  • Fixing the Dreaded Windows Audio Service Stuck on Stopping Error
  • Windows SIM Error, Unknown error 0xc1420127
  • How I’m Building a Cat Breeding Management App with Python Qt6 + Microsoft Litebox, in 1 Week
  • Why Windows Keeps Nuking Your GPU Drivers (And How to Take Back Control)
  • Canonical: Ubuntu coming soon to Snapdragon X2 Series platforms
  • Finally, wolfSSL adds post-quantum algorithms!
  • How to Run Gemma Embedding Models Using Docker
  • Deploy Nginx Rootful Container with Podman
  • How to Sandboxing Browser on Linux Desktop with Flatpak
  • OpenCode Browse Explained: Automate Any Website WITHOUT APIs
  • Leaked Qwen 4 and GLM 5.5 Post-Training, Beating the 27B Models
  • Do you Agree? Anthropic Secretly Watermarks All Claude’s Text!
  • Some of New Gemini Notebook Update is CRAZY GOOD: Native Mobile Recording
  • Clover 35B A3B Local Test | Diffusion Model Beats Qwen 35B MoE? | Local AI Setup with llama.cpp
  • SpongeBob Bakal Pindah ke RTV November 2026? Warga Lagi Rame Bahas Rumor Ini
  • Operasi Zebra Lodaya 2026 di Bandung, Tasikmalaya, dan Bogor: Razia di mana saja dan jam berapa mulainya?
  • Mengenal Sosok Soenarko, Mantan Danjen Kopassus yang Lagi Rame diomongin Warga karena Gugatan Citizen Lawsuit
  • Lagi rame dicari, Drag Bike 201m Sunmori 5.4 Mod APK Unlimited Money dan Unlock Livery, beneran ada atau cuma hoax?
  • Siapa Tora Widjaja? Pengusaha Kuliner yang Lagi Rame Karena Hubungannya sama Anya Geraldine

©2026 emka.web.id | Design: Newspaperly WordPress Theme