Skip to main content

Publish Agent

Publish your agent to Circuit infrastructure.
circuit publish
Flags:
  • --dry-run / -d: Show files that would be uploaded without actually publishing.
  • --path <path> / -p <path>: Publish from a specific agent directory instead of the current directory.
What happens:
  1. Validates agent config (requires at least name)
  2. Collects project files based on exclusion patterns
  3. Generates a content hash (SHA-256) of your project files
  4. Uploads code to Circuit infrastructure
  5. Polls publish status until complete
  6. Returns agent ID, version, and a link to the agent page
Requirements:
  • Must be authenticated (circuit signin)
  • Valid circuit.toml configuration with at least name
  • All dependencies installed
File exclusion: The CLI automatically excludes these patterns from uploads:
  • Version control: .git/**, .svn/**
  • Dependencies: node_modules/**, dist/**, venv/**, __pycache__/**
  • Secrets: .env, .env.*, *.key, *.pem
  • IDE files: .vscode/**, .idea/**, *.swp
  • Build artifacts: coverage/**, .pytest_cache/**, .cache/**
  • Lock files: package-lock.json, yarn.lock, pnpm-lock.yaml, uv.lock
  • Other: Dockerfile, docker-compose.yml, *.md, *.sh, *.log, .DS_Store
Additional patterns can be added via filesToExclude in your agent config.
Note: DESCRIPTION.md is not uploaded as a file — its content is sent as agent metadata during publish.
Content deduplication: Circuit calculates a content hash of your uploaded files on the server. If the hash matches a previously published version, a new version is not created and the existing version is reused. Files are still uploaded on each publish — deduplication applies to versioning only.