Skip to content

App Agents

Node1 edited this page Jun 18, 2026 · 3 revisions

App Agents

Purpose

This page describes app-local AI agents and the code-changing workflow XAI OS is designed to support.

Contents

App-Local Agents

An app agent runs near the application it improves. It has scoped access to source code, build tools, test commands, and deployment hooks.

The agent is embedded in the operational model of the app instead of acting as a remote chatbot with no local context.

Source-Code Indexing

The source-code index should track:

  • files;
  • symbols;
  • dependencies;
  • build targets;
  • tests;
  • recent diffs;
  • repository metadata.

Index memory belongs to the AI Cell or a clearly declared shared service.

Patch Loop

The target loop is:

request -> inspect -> patch -> build -> test -> review -> commit or rollback

Build and test work must run in isolated cells or sandboxes so it does not damage inference latency beyond the configured budget.

Git Sync

Git operations should be explicit and auditable:

  • inspect status before writing;
  • avoid secrets;
  • isolate changes in a branch or worktree;
  • require tests before commit or push;
  • support review-before-apply by default;
  • stage only intended files;
  • generate focused commits;
  • preserve boot logs or benchmark evidence when relevant;
  • support rollback.

Deployment and Rollback

Hot reload or redeploy hooks are app-specific and must be declared. Rollback should be available before a code-changing agent can affect a running service.

Security Boundaries

Agents need narrow permissions:

  • read-only by default;
  • explicit repository write permission;
  • explicit build/test permission;
  • explicit network permission;
  • explicit deployment permission.

See Security Model.

Operational Safeguards

  • Branch/worktree isolation is required before generated patches are applied.
  • Human approval modes should be supported for patch apply, commit, push, and deploy.
  • Push-to-remote is a separate permission from commit.
  • Failed deploys must roll back to the previous known-good state.
  • Agent actions must emit an audit log with request, files changed, commands run, test results, commit, and deployment outcome.
  • Secrets must be blocked from patches, logs, benchmark output, and outbound network traffic.

Related Pages

Clone this wiki locally