Private agents use private repositories to control access to your agent images. You can use private Docker Hub repositories, GitHub Container Registry (GHCR), or Harbor.
Docker Hub Private Repository
This guide shows how to deploy an agent using a private Docker Hub repository with access tokens.Prerequisites
- AgentSystems platform running (Installation Guide)
- Docker installed and running
- Docker Hub account (free at hub.docker.com)
Step 1: Get the Template
Go to github.com/agentsystems/agent-template and click “Use this template” → “Create a new repository”. Name itdemo-agent-private and clone it:
Step 2: Customize Agent Metadata
Editagent.yaml:
Step 3: Build and Push to Private Repository
Log in to Docker Hub:your-org):
Step 4: Keep Repository Private
Docker Hub creates new repositories as public by default. Make sure to change it to private.
- Go to hub.docker.com
- Open your repository:
your-org/demo-agent-private - Click Settings → Visibility settings → Change to Private → Save
Step 5: Generate Access Token
Generate a read-only access token for the platform to pull your private image.Use read-only tokens with expiration dates for security. The platform only needs read access to pull images.
- Go to Settings
- Click Personal access tokens
- Click Generate new token
- Access token description:
AgentSystems Read Access - Set an expiration date (recommended for demos)
- Access permissions: Read-only
- Click Generate
- Copy the token (you won’t see it again)
- Go to your organization settings
- Navigate to Access tokens
- Click Generate access token
- Label:
AgentSystems Image Pull Access - Set an expiration date (recommended for demos)
- Give the token the Image Pull scope for the necessary repository
- Click Generate token
- Copy the token (you won’t see it again)
Step 6: Add Credentials to Platform
Open localhost:3001/configuration/credentials Add your Docker Hub username:- Click “Add Credential”
- Name:
PRIVATE_DOCKERHUB_USERNAME - Value: Your Docker Hub username or organization
- Click Add Variable
- Click “Add Credential” again
- Name:
PRIVATE_DOCKERHUB_TOKEN - Value: Paste the token from Step 5
- Click Add Variable
Step 7: Create Registry Connection
Open localhost:3001/configuration/registries and click “Add Registry”:- Name:
dockerhub_yourorg_private(replaceyourorgwith your username/org) - URL:
docker.io - Authentication Method:
Basic (Username/Password) - Username Environment Variable:
PRIVATE_DOCKERHUB_USERNAME - Password Environment Variable:
PRIVATE_DOCKERHUB_TOKEN - Enabled: ✓ (checked)
Step 8: Add Agent to Platform
Open localhost:3001/configuration/agents and click “Add Agent”:- Name:
demo-agent-private - Repository:
your-org/demo-agent-private - Registry:
dockerhub_yourorg_private - Tag:
latest - Egress Allowlist: Leave blank (no external API calls needed)
Step 9: Restart and Test
Navigate to your AgentSystems deployment directory and restart:- Go to localhost:3001/agents
- Click on
demo-agent-private - Click “Turn On”
- Click “Execute”
What You Built
Your private agent is now deployed:- Uses a private Docker Hub repository
- Requires credentials to pull and deploy
- Runs in a Docker container
- Is accessible at
http://localhost:18080/invoke/demo-agent-private

