> ## Documentation Index
> Fetch the complete documentation index at: https://amd-gaia.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Application Packaging

# Application Packaging

<Warning>
  **Roadmap page — not all commands shown are implemented.** The `gaia package --agent ... --ui web/electron` CLI sketched below is a planned convenience
  wrapper. Today you can already expose agents as a web API (`gaia api start`) or
  as an Electron app via the existing Agent UI shell (`src/gaia/electron/`). See
  the [Electron Integration spec](/docs/spec/electron-integration) for what's
  currently shipping.
</Warning>

![Status](https://img.shields.io/badge/status-in_development-yellow)

**Detailed Spec:** [spec/electron-integration](/docs/spec/electron-integration)

**Purpose:** Package GAIA agents as standalone applications for distribution.

***

## 14.1 Web UI Generation

```python theme={null}
from gaia.agents.base.agent import Agent
from gaia.agents.base.tools import tool

class MyAgent(Agent):
    """Custom agent for distribution."""

    def _get_system_prompt(self) -> str:
        return "You are a helpful assistant."

    def _create_console(self):
        from gaia.agents.base.console import AgentConsole
        return AgentConsole()

    def _register_tools(self):
        @tool
        def my_capability(query: str) -> dict:
            """Custom tool."""
            return {"result": f"Processed: {query}"}

# Package as web UI
# Run: gaia package --agent my_agent.MyAgent --ui web --output ./dist

# Generates:
# ./dist/
#   ├── index.html        # Web interface
#   ├── app.js           # Frontend code
#   ├── server.py        # FastAPI backend
#   └── requirements.txt  # Dependencies
```

***

## 14.2 Electron Desktop App

```bash theme={null}
# Package as cross-platform desktop app
gaia package \
    --agent my_package.MyAgent \
    --desktop electron \
    --output ./desktop \
    --platforms windows,linux

# Generates:
# ./desktop/
#   ├── MyAgent-1.0.0-win.exe     # Windows app
#   └── MyAgent-1.0.0-linux.AppImage  # Linux app

# Features:
# - Native desktop integration
# - System tray support
# - Auto-updates
# - Offline mode
```

***

## 14.3 Deployment Patterns

```python theme={null}
# pyproject.toml - Package your agent
[project]
name = "my-gaia-agent"
version = "1.0.0"
dependencies = ["amd-gaia>=0.14.0"]

[project.entry-points."gaia.agents"]
my-agent = "my_package.agent:MyAgent"

[project.scripts]
my-agent = "my_package.cli:main"

# After install, users can:
# 1. Import: from my_package.agent import MyAgent
# 2. CLI: my-agent "Do something"
# 3. API: the gaia.agents entry point makes MyAgent discoverable;
#         start the OpenAI-compatible server with `gaia api start`
```

***

## Related Topics

* [Core Agent System](./core/agent-system) - Learn about the base Agent class
* [API Server](/docs/reference/api) - Expose agents via API
* [Best Practices](./best-practices) - Development guidelines
* [Desktop Installer Plan](/docs/plans/desktop-installer) - NSIS-based installer with bundled Lemonade MSI (in progress)

***

<small style="color: #666;">
  **License**

  Copyright(C) 2024-2026 Advanced Micro Devices, Inc. All rights reserved.

  SPDX-License-Identifier: MIT
</small>
