Skip to main content

About self-hosted daemons

Self-hosted daemons are ideal for teams that want Cosmos agents to run on your own infrastructure. You can run a single daemon to quickly use your personal setup to work with Cosmos, or deploy a daemon pool to provide a group of workers to Cosmos to distribute sessions to. Daemons have access to the host machine’s CPU, disk, and network; agents execute tools and make edits on the host machine but still make all LLM calls to Augment’s external services. You can use daemon pools to group multiple separate machines into a single environment. Sessions started in those pooled environments will automatically select the first available slot in the pool without requiring the user to select a specific machine.

Using daemons

Each host must run the daemon process available through Auggie CLI.

Setup Auggie CLI

The daemon process is bundled with Auggie CLI, so you will need to install Auggie CLI on each host you want to run the daemon. You will need npm available on the host to install the package. Install the CLI with the following command:
npm install -g @augmentcode/auggie
Before you can start the daemon, you will need to authenticate the CLI. Your session will be persisted to the host machine. Login to your Augment account with the following command:
auggie login
You can also use other available authentication methods in Auggie CLI to set your credentials.

Start the daemon

After you have authenticated the Auggie CLI, start the daemon with the following command:
auggie daemon

Configuration

You can configure the daemon with the following optional CLI flags:
FlagDetails
--name <name>Name of the daemon in the UI (defaults to hostname:workspace)
--max-agents <number>Maximum number of concurrent sessions on the host (default: 100)
--workspace <path>The workspace directory to use (default: current working directory)
--vm-id <id>The ID for the host (default: autogenerated UUID)
--pool-id <id>The daemon pool to join

Workspace

By default, the current working directory is used as the workspace for the daemon process. This is typically the root of a git directory. You can pass --workspace <path> to use a different directory as the workspace root. If you want to work across multiple git projects, you can pass multiple --add-workspace <path> to add additional projects.

Git worktrees

When selecting a daemon as your environment in the Cosmos web UI, you will have the option to run the session in an isolated git worktree. This allows multiple sessions to work on the same machine without interfering with conflicting file changes.

Disconnecting

You can disconnect the daemon at any time with Cmd/Ctrl+C or by shutting down the host machine. Sessions using a disconnected daemon will queue any sent messages until the daemon is reconnected. The session expects the reconnected daemon to be in the same filesystem state as it was when working, so it is recommended that you use git worktrees to reduce errors when agents connect to an out-of-sync environment.

Networking

Daemons need outbound access to Augment services to complete inference requests. See the full guide to network configuration for the allowlist of necessary domains.

Use daemon pools

Daemon pools allow you to group distinct hosts into a single environment. When a new session starts in the daemon pool environment, it will use one of the available slots from the connected hosts. To use daemon pools, first create the pool in the Cosmos web UI and then connect hosts to it.

Creating a pool

Create a new daemon pool in the Cosmos web UI by going to the Environments list and selecting Create an environment > Daemon Pool.

Configuration

Name

The pool must have a unique name across your organization.

Connector

Only daemons with the proper authentication can connect to the pool. Select either Current user or a service account to use as the valid connector for the daemon. All daemon must be authenticated as this user or service account to join to the pool.

Connecting to a pool

Once you have created a pool, you can start a daemon to join it. To connect to the pool you must: 1) pass the --pool-id flag when starting the daemon, 2) be autheticated as the user or service account set by the pool. You can find the pool-id from the pool’s detail page. Then start it with the following command:
auggie daemon --pool-id <pool-id>