Skip to content

The Deska blog

Managing Agents on an Air-Gapped Codebase

Learn how to deploy and manage AI agents on an air-gapped codebase while maintaining strict data privacy and local-first security protocols.

12 min read

Running AI agents on an air-gapped codebase presents a unique set of challenges for modern development teams. While the productivity gains of autonomous coding agents are well documented, the security requirements of sensitive repositories often preclude the use of cloud-based IDE extensions that stream file contents to external servers. Implementing a local-first strategy ensures that your intellectual property remains within your controlled environment while still leveraging the power of large language models for refactoring, debugging, and feature implementation.

Understanding the Air-Gapped Constraint

In the context of software engineering, an air-gapped environment refers to a system that is physically or logically isolated from unsecured networks, specifically the public internet. For many organizations, this is the baseline for handling proprietary algorithms, financial systems, or government infrastructure.

Standard AI tools often struggle in these environments. Most popular extensions function as thin clients that send code snippets to a central API for processing. When you are working with agents on an air-gapped codebase, this architecture fails. You must instead rely on tools that respect data boundaries, ensuring that the logic, the file system, and the execution environment remain localized.

The Architecture of Local AI Agents

To maintain a secure posture, the stack for local agents must be decomposed into three distinct layers. Each layer must be validated for its ability to operate without outbound telemetry.

  1. The Inference Engine: This is the backend that runs the model. It can be a local provider like Ollama or a private instance of an LLM hosted on internal hardware.
  2. The Agentic Framework: This layer handles the reasoning loops. It determines which files to read, which commands to execute, and how to iterate on a solution.
  3. The Interaction Workspace: This is where the developer monitors the agent. A fragmented UI leads to context switching, which is why a unified canvas is often preferred for managing multiple parallel processes.

Comparison of Local-First Strategies

Different tools approach the problem of isolation with varying degrees of success. When evaluating your stack, consider how each tool handles file access and state management.

Tool CategoryData PrivacyConnectivity RequirementContext Window Management
Cloud IDE ExtensionsLowConstantAutomatic
CLI-Based AgentsHighOptionalManual
Local-First WorkspacesHighNoneVisual/Spatial

Tools like Aider or OpenCode differ in approach compared to integrated environments. CLI tools are excellent for targeted tasks but can become difficult to manage when an agent needs to show you complex visual changes across multiple files simultaneously.

Leveraging Deska for Isolated Development

Deska provides a specialized environment for developers who need to keep their work local. It is a free desktop application available for Mac, Windows, and Linux that functions as an infinite canvas workspace. Because it is local-first, the code you write and the files you process never leave your machine unless you explicitly configure an external API.

Within Deska, you can run multiple coding agents such as Claude Code, Codex CLI, and OpenCode side by side. Each agent operates in its own panel, allowing you to compare their outputs in real time without switching tabs.

The Power of Panels and Canvas

The canvas layout is particularly useful when working on an air-gapped codebase because it allows you to visualize the entire system state. You can place a terminal next to a code editor and an agent thread, then zoom out to see the relationship between them.

  • Terminals: Run your local build scripts or inference servers.
  • Code Editor: A built-in Monaco editor for direct file manipulation.
  • Browser: Inspect local documentation or web-based UI outputs.
  • Notes: Keep track of architectural decisions made by the agent.

Managing Connectivity with BYOK

For users who can access a private proxy or an internal LLM gateway, Deska supports a Bring Your Own Key (BYOK) model. This is part of the lifetime tier, ensuring that the pricing model aligns with long-term infrastructure needs. If your air-gap allows for a single, controlled tunnel to a specific API endpoint, you can input your keys directly into the app to drive the agents while keeping the workspace itself entirely local.

Workflow Integration and Ask Deska

Managing an agent requires more than just a chat interface. It requires an assistant that understands the workspace. Deska includes Ask Deska, a voice and chat assistant capable of driving the environment. It can open panels, run terminals, and check active sessions.

If you are monitoring a long-running refactor while away from your primary workstation, the mobile app allows you to check progress. It uses a secure relay where devices pair directly. No ports are exposed to the public internet, maintaining the integrity of your isolated environment.

Security Best Practices for Local Agents

When deploying agents on an air-gapped codebase, follow these protocols to ensure no data leakage occurs:

  • Disable all telemetry in your IDE and CLI tools.
  • Use a local inference server if the security policy forbids all external API calls.
  • Audit the agentic loop to ensure it does not attempt to download external dependencies during execution.
  • Utilize data and storage configurations that point to encrypted volumes.

By centralizing these tools into a unified workspace, you reduce the surface area for configuration errors. Keeping your code and git files within a single, monitored application like Deska simplifies the auditing process.

Frequently Asked Questions

How do I run AI agents without an internet connection?

You must use a local inference engine such as Ollama or LocalAI combined with a compatible agent framework. The agent must be configured to point to your local endpoint rather than a public API. Deska supports running these agents as panels within its local-first workspace.

Are coding agents safe for proprietary repositories?

They are safe only if the tool follows a local-first architecture. Avoid tools that upload your code for "contextual analysis." Instead, use platforms that keep the code on your machine and only send specific prompts to your chosen, secured LLM provider.

Can I use Claude Code in a restricted environment?

Yes, provided you have the necessary API access or a local proxy. By running Claude Code within a terminal panel in Deska, you can integrate its reasoning capabilities into a broader, locally-managed workflow.

Getting Started with Local Workspaces

Transitioning to a local-first AI workflow does not require sacrificing the modern developer experience. By utilizing an infinite canvas and side-by-side agent execution, you can maintain high velocity even under strict security constraints. You can explore the getting started guide to understand how to configure your first isolated environment.

To begin building with agents on your own terms, you can download the Deska desktop application for your preferred operating system.