# Hermes Agent Tutorial All the Code and Prompts

> Source: <https://gist.github.com/safak/9fa815d3432746fcf4def85191612b7b>
> Published: 2026-07-01 12:16:35+00:00

Docker Container Yaml file:

```
services:
  hermes-agent:
    image: ghcr.io/hostinger/hvps-hermes-agent:latest
    restart: unless-stopped
    ports:
      - "4860"
      - "8644:8644"
    labels:
      - traefik.enable=true
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_PROJECT_NAME}.${TRAEFIK_HOST}`)
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure
      - traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt
      - traefik.http.services.${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=4860
    env_file:
      - .env
    volumes:
      - ./data:/opt/data

  chrome:
    image: chromedp/headless-shell:latest
    restart: unless-stopped
    network_mode: "service:hermes-agent"
    depends_on:
      hermes-agent:
        condition: service_started
        restart: true
```

Deployment Webhook Prompt:

```
GitHub Actions workflow_run event received.

Repo: {repository.full_name}
Workflow: {workflow_run.name}
Status: {workflow_run.status}
Conclusion: {workflow_run.conclusion}
Branch: {workflow_run.head_branch}
Commit: {workflow_run.head_sha}
Run URL: {workflow_run.html_url}
Actor: {sender.login}

Only act when Status is completed. If it's in_progress do not answer.

If Conclusion is failure, cancelled, timed_out, or action_required:
Send Lama Dev a clear failure report with repo, workflow, branch, commit, actor, and run URL. Explain that the workflow did not pass.

If Conclusion is success:
visit the shopping app url and perform an end-to-end UI test. Verify all visible UI elements render correctly, check accessibility basics (keyboard navigation, labels, contrast, focus states), and validate all navigation links and buttons. Log in using demo@shop.com / password123, browse products, add a product to the cart, and proceed through checkout. Click the final checkout button (no payment processing is required). Confirm that the user is redirected to the Orders page and verify that all functionality works as expected. Report any bugs, broken links, UI issues, accessibility problems, console errors, or unexpected behavior.
```

Pull Request Webhook Prompt:

```
GitHub Pull Request webhook received.

Repository: {repository.full_name}
Action: {action}

PR #{pull_request.number}: {pull_request.title}
URL: {pull_request.html_url}

Author: {pull_request.user.login}
Base branch: {pull_request.base.ref}
Head branch: {pull_request.head.ref}
State: {pull_request.state}
Draft: {pull_request.draft}
Mergeable: {pull_request.mergeable}

PR body:
{pull_request.body}

Review the pull request, analyze the code changes, and provide feedback on potential bugs, code quality issues, security concerns, performance improvements, and adherence to best practices.
```

VPS connection Codes

```
ssh-keygen -t rsa

pbcopy < ~/.ssh/id_rsa.pub
```

Cloudflare Monitoring Cron Job Prompt

```
I added CLOUDFLARE_API_TOKEN, CLOUDFLARE_ZONE_ID and CLOUDFLARE_ZONE_NAME to the Hermes environment.

Create a cron job:

I want you to visit my shopping app and send the traffic reports every day.

Include requests, visitors, page views, threats, cache status, and all other recommended analytics.
```
