[Skip to content](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#start-of-content)

You signed in with another tab or window. [Reload](https://github.com/ZoniBoy00/hermes-agent-abacus-ai) to refresh your session.You signed out in another tab or window. [Reload](https://github.com/ZoniBoy00/hermes-agent-abacus-ai) to refresh your session.You switched accounts on another tab or window. [Reload](https://github.com/ZoniBoy00/hermes-agent-abacus-ai) to refresh your session.Dismiss alert

{{ message }}

[ZoniBoy00](https://github.com/ZoniBoy00)/ **[hermes-agent-abacus-ai](https://github.com/ZoniBoy00/hermes-agent-abacus-ai)** Public

- [Notifications](https://github.com/login?return_to=%2FZoniBoy00%2Fhermes-agent-abacus-ai) You must be signed in to change notification settings
- [Fork\\
0](https://github.com/login?return_to=%2FZoniBoy00%2Fhermes-agent-abacus-ai)
- [Star\\
0](https://github.com/login?return_to=%2FZoniBoy00%2Fhermes-agent-abacus-ai)


main

[**1** Branch](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/branches) [**1** Tag](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/tags)

[Go to Branches page](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/branches)[Go to Tags page](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/tags)

Go to file

Code

Open more actions menu

## Folders and files

| Name | Name | Last commit message | Last commit date |
| --- | --- | --- | --- |
| ## Latest commit<br>[![ZoniBoy00](https://avatars.githubusercontent.com/u/34036787?v=4&size=40)](https://github.com/ZoniBoy00)[ZoniBoy00](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commits?author=ZoniBoy00)<br>[Fix CI: guard remaining Hermes imports in background.py + skip creden…](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commit/b0f18735ec363ea42d92a1fc1ffb02690f674704)<br>Open commit detailssuccess<br>2 weeks agoJul 18, 2026<br>[b0f1873](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commit/b0f18735ec363ea42d92a1fc1ffb02690f674704) · 2 weeks agoJul 18, 2026<br>## History<br>[6 Commits](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commits/main/) <br>Open commit details<br>[View commit history for this file.](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commits/main/) 6 Commits |
| [.github/workflows](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/tree/main/.github/workflows "This path skips through empty directories") | [.github/workflows](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/tree/main/.github/workflows "This path skips through empty directories") | [Add CI workflow and fix test conftest](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commit/87335adbcbb61f775f066d0bf215aaff351e6ba7 "Add CI workflow and fix test conftest  - .github/workflows/test.yml: run 37 tests on push/PR (Python 3.11 + 3.12) - tests/conftest.py: remove hardcoded /usr/local/lib/hermes-agent path   (tests mock everything, no Hermes imports needed)") | 2 weeks agoJul 18, 2026 |
| [abacus\_ai](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/tree/main/abacus_ai "abacus_ai") | [abacus\_ai](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/tree/main/abacus_ai "abacus_ai") | [Fix CI: guard remaining Hermes imports in background.py + skip creden…](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commit/b0f18735ec363ea42d92a1fc1ffb02690f674704 "Fix CI: guard remaining Hermes imports in background.py + skip credential tests  - background.py: _jobs_dir() falls back to HERMES_HOME env var   when hermes_constants module is unavailable - tests/test_provider.py: skip TestCredentials when Hermes not   installed (monkeypatch can't import hermes_cli.config)") | 2 weeks agoJul 18, 2026 |
| [tests](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/tree/main/tests "tests") | [tests](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/tree/main/tests "tests") | [Fix CI: guard remaining Hermes imports in background.py + skip creden…](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commit/b0f18735ec363ea42d92a1fc1ffb02690f674704 "Fix CI: guard remaining Hermes imports in background.py + skip credential tests  - background.py: _jobs_dir() falls back to HERMES_HOME env var   when hermes_constants module is unavailable - tests/test_provider.py: skip TestCredentials when Hermes not   installed (monkeypatch can't import hermes_cli.config)") | 2 weeks agoJul 18, 2026 |
| [.gitignore](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/blob/main/.gitignore ".gitignore") | [.gitignore](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/blob/main/.gitignore ".gitignore") | [chore: add .gitignore, remove \_\_pycache\_\_ from version control](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commit/e1ff4fe2acb3c60da1afcffa8b1ba27a42c002e3 "chore: add .gitignore, remove __pycache__ from version control") | last monthJul 6, 2026 |
| [LICENSE](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/blob/main/LICENSE "LICENSE") | [LICENSE](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/blob/main/LICENSE "LICENSE") | [feat: v2.0.0 — modular code, tests, background generation, Nano Banan…](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commit/903c4e64bbd693cc4a0ef274510d4bd5cf07a361 "feat: v2.0.0 — modular code, tests, background generation, Nano Banana Pro 4K  - Modular code structure (provider.py, config.py, models.py, utils.py, background.py) - Background image generation (image_generate_background + _status tools) - Nano Banana Pro model with up to 4K resolution (1080p, 2K, 4K) - Unit test suite (37+ tests with pytest, mocked API) - pip install support via pyproject.toml - Improved error handling and response parsing - Cleaner plugin.yaml with provides_tools") | last monthJul 6, 2026 |
| [README.md](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/blob/main/README.md "README.md") | [README.md](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/blob/main/README.md "README.md") | [feat: v2.0.0 — modular code, tests, background generation, Nano Banan…](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commit/903c4e64bbd693cc4a0ef274510d4bd5cf07a361 "feat: v2.0.0 — modular code, tests, background generation, Nano Banana Pro 4K  - Modular code structure (provider.py, config.py, models.py, utils.py, background.py) - Background image generation (image_generate_background + _status tools) - Nano Banana Pro model with up to 4K resolution (1080p, 2K, 4K) - Unit test suite (37+ tests with pytest, mocked API) - pip install support via pyproject.toml - Improved error handling and response parsing - Cleaner plugin.yaml with provides_tools") | last monthJul 6, 2026 |
| [pyproject.toml](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/blob/main/pyproject.toml "pyproject.toml") | [pyproject.toml](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/blob/main/pyproject.toml "pyproject.toml") | [feat: v2.0.0 — modular code, tests, background generation, Nano Banan…](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/commit/903c4e64bbd693cc4a0ef274510d4bd5cf07a361 "feat: v2.0.0 — modular code, tests, background generation, Nano Banana Pro 4K  - Modular code structure (provider.py, config.py, models.py, utils.py, background.py) - Background image generation (image_generate_background + _status tools) - Nano Banana Pro model with up to 4K resolution (1080p, 2K, 4K) - Unit test suite (37+ tests with pytest, mocked API) - pip install support via pyproject.toml - Improved error handling and response parsing - Cleaner plugin.yaml with provides_tools") | last monthJul 6, 2026 |
| View all files |

## Repository files navigation

# Abacus AI Image Generation Plugin for Hermes Agent

[Permalink: Abacus AI Image Generation Plugin for Hermes Agent](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#abacus-ai-image-generation-plugin-for-hermes-agent)

**Version 2.0.0** — [![MIT License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/blob/main/LICENSE)

> ⚡ Generate high-quality images directly in [Hermes Agent](https://hermes-agent.nousresearch.com/) using [Abacus AI's RouteLLM API](https://abacus.ai/help/developer-platform/route-llm). Supports FLUX 2 Pro, Nano Banana Pro (up to 4K), DALL-E, MidJourney, and 20+ models.

## Features

[Permalink: Features](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#features)

- 🎨 **20+ Image Models** — FLUX 2 Pro, FLUX Pro Ultra, Nano Banana Pro (4K), MidJourney, DALL-E, and more
- ⚡ **Native `image_gen` Provider** — Works as a first-class Hermes image generation backend
- 🖼️ **Up to 4K Resolution** — Nano Banana Pro supports `1080p`, `2K`, `4K`
- 🔄 **Text-to-Image & Image-to-Image** — Generate from prompts or edit existing images
- ⏳ **Background Generation** — Run image generation asynchronously and poll for results
- 💰 **Cost-Effective** — Uses your existing Abacus AI ChatLLM subscription credits
- 🎯 **Multi-Platform** — Works in Telegram, Discord, CLI, and all Hermes surfaces
- 📦 **Modular Code** — Clean separation into provider, config, models, utils, and background modules
- ✅ **Tested** — 37+ unit tests covering utilities, credentials, models, and background jobs

## Prerequisites

[Permalink: Prerequisites](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#prerequisites)

- [Hermes Agent](https://hermes-agent.nousresearch.com/) installed and running
- An [Abacus AI](https://abacus.ai/) account with ChatLLM subscription
- Your RouteLLM API key from [abacus.ai/app/route-llm-apis](https://abacus.ai/app/route-llm-apis)

## Installation

[Permalink: Installation](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#installation)

### Option 1: Install via Hermes Agent (recommended)

[Permalink: Option 1: Install via Hermes Agent (recommended)](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#option-1-install-via-hermes-agent-recommended)

Copy and paste this prompt to your Hermes Agent (Telegram, Discord, or CLI). It will clone the repo, copy the files, configure everything, and restart the gateway automatically:

> Install the Abacus AI image generation plugin v2.0.0 from the public GitHub repo [https://github.com/ZoniBoy00/hermes-agent-abacus-ai](https://github.com/ZoniBoy00/hermes-agent-abacus-ai). Clone the repo to /tmp, copy the abacus\_ai/ directory to ~/.hermes/plugins/image\_gen/abacus\_ai/, enable image\_gen/abacus\_ai in plugins.enabled in config.yaml, set image\_gen.provider to abacus\_ai, configure custom\_providers with name abacus-ai using my API key, then restart the gateway.

Make sure you have your [Abacus AI RouteLLM API key](https://abacus.ai/app/route-llm-apis) ready — Hermes will ask for it during installation.

### Option 2: Manual Install

[Permalink: Option 2: Manual Install](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#option-2-manual-install)

1. Clone the repository:

```
git clone https://github.com/ZoniBoy00/hermes-agent-abacus-ai.git /tmp/hermes-agent-abacus-ai
```

2. Copy the `abacus_ai/` directory to your Hermes image\_gen plugins folder:

```
cp -r /tmp/hermes-agent-abacus-ai/abacus_ai ~/.hermes/plugins/image_gen/abacus_ai/
```

3. Enable the plugin in `~/.hermes/config.yaml`:

```
plugins:
  enabled:
    - image_gen/abacus_ai
```

4. Set the image generation provider:

```
hermes config set image_gen.provider abacus_ai
```

5. Configure your Abacus AI API key:

```
custom_providers:
  - name: abacus-ai
    api_key: "your-api-key-here"
    base_url: "https://routellm.abacus.ai/v1"
```

6. Restart the Hermes gateway:

```
systemctl --user restart hermes-gateway
```

### Option 3: Install via pip

[Permalink: Option 3: Install via pip](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#option-3-install-via-pip)

```
pip install git+https://github.com/ZoniBoy00/hermes-agent-abacus-ai.git
```

Then enable the plugin in `~/.hermes/config.yaml` and restart.

### Cleanup (optional)

[Permalink: Cleanup (optional)](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#cleanup-optional)

```
rm -rf /tmp/hermes-agent-abacus-ai
```

## Plugin Structure

[Permalink: Plugin Structure](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#plugin-structure)

```
abacus_ai/
├── __init__.py       # Plugin registration (register provider + background tools)
├── provider.py       # ImageGenProvider implementation (generate, extract)
├── config.py         # Credential and config resolution
├── models.py         # Model catalog and aspect ratio helpers
├── utils.py          # Image URL conversion and format detection
├── background.py     # Background image generation (async jobs)
└── plugin.yaml       # Plugin manifest (kind: backend)
tests/
├── __init__.py
├── conftest.py       # Test fixtures and mocks
├── test_utils.py     # Utility function tests
├── test_provider.py  # Model, credential, and aspect ratio tests
└── test_background.py # Background job tests
```

## Background Generation

[Permalink: Background Generation](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#background-generation)

In addition to synchronous image generation, the plugin provides two background tools:

### `image_generate_background`

[Permalink: image_generate_background](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#image_generate_background)

Start an image generation job that runs in the background. Returns immediately with a `job_id`.

- Supports single prompts and batch mode (multiple jobs via `jobs` array)
- Job state is persisted to `$HERMES_HOME/cache/abacus_ai_jobs/<job_id>/`

### `image_generate_background_status`

[Permalink: image_generate_background_status](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#image_generate_background_status)

Poll for the result of a background job:

- Returns `"status": "running"` while the job is in progress
- Returns `"status": "completed"` with the result when done
- Returns `"status": "failed"` on error

## Configuration

[Permalink: Configuration](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#configuration)

### Environment Variables

[Permalink: Environment Variables](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#environment-variables)

| Variable | Description | Default |
| --- | --- | --- |
| `ABACUS_AI_API_KEY` | Your Abacus AI RouteLLM API key | — |
| `ABACUS_AI_BASE_URL` | API base URL | `https://routellm.abacus.ai/v1` |
| `ABACUS_AI_IMAGE_MODEL` | Default image model override | `flux2_pro` |

### Config File

[Permalink: Config File](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#config-file)

```
image_gen:
  provider: abacus_ai
  abacus_ai:
    model: flux2_pro  # default model
```

## Available Models

[Permalink: Available Models](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#available-models)

| Model ID | Display Name | Best For |
| --- | --- | --- |
| `nano_banana_pro` | Nano Banana Pro | Highest resolution (up to 4K), Google DeepMind |
| `flux_pro_ultra` | FLUX Pro Ultra | Highest quality, photorealistic |
| `flux2_pro` | FLUX 2 Pro | High quality, photorealistic (default) |
| `flux2` | FLUX 2 | Fast, good quality |
| `midjourney` | MidJourney | Artistic, stylistic |
| `dalle` | DALL-E | Creative, strong prompt adherence |

## Usage

[Permalink: Usage](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#usage)

Once installed and configured, Hermes will use the Abacus AI provider automatically when generating images. Simply ask Hermes to create an image — the `image_generate` tool will use this provider by default.

### Telegram / Discord

[Permalink: Telegram / Discord](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#telegram--discord)

```
Generate an image of a cyberpunk city at night, neon lights, futuristic
Make a photorealistic render of a wooden cabin in the mountains
Create a digital art portrait of a wolf with glowing eyes
Generate a 4K image of northern lights — use Nano Banana Pro
```

### CLI

[Permalink: CLI](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#cli)

```
hermes chat -q "Generate a beautiful landscape painting of northern lights over a lake"
```

## Supported Parameters

[Permalink: Supported Parameters](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#supported-parameters)

The provider supports these optional `image_config` parameters:

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `num_images` | integer | Number of images to generate (1-4) | `1` |
| `quality` | string | Quality tier (`low`, `medium`, `high`) | model-dependent |
| `resolution` | string | Output resolution: `1080p`, `2K`, or `4K`. Only works with `nano_banana_pro` model. Leave unset for model's default resolution. | not set (model default) |
| `rewrite_prompt` | boolean | Auto-improve prompts for better results | `true` |

## Changelog

[Permalink: Changelog](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#changelog)

### v2.0.0

[Permalink: v2.0.0](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#v200)

- Modular code structure (provider.py, config.py, models.py, utils.py, background.py)
- Background image generation (`image_generate_background` \+ `_status`)
- Nano Banana Pro support with up to 4K resolution
- Unit test suite (37+ tests)
- pip install support via pyproject.toml
- Improved error handling and response parsing

### v1.1.0

[Permalink: v1.1.0](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#v110)

- Rich `requires_env` format in plugin.yaml
- Model-specific aspect ratio resolution
- Image format detection (PNG, JPEG, WebP)

### v1.0.0

[Permalink: v1.0.0](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#v100)

- Initial release with Abacus AI image generation
- FLUX 2 Pro, DALL-E, MidJourney support

## Credits & License

[Permalink: Credits & License](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#credits--license)

Built for [Hermes Agent](https://hermes-agent.nousresearch.com/) by ZoniBoy00.

- **Author:** ZoniBoy00
- **License:** MIT
- **Repository:** [ZoniBoy00/hermes-agent-abacus-ai](https://github.com/ZoniBoy00/hermes-agent-abacus-ai)

## Support

[Permalink: Support](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#support)

- [Abacus AI RouteLLM Docs](https://abacus.ai/help/developer-platform/route-llm)
- [Hermes Agent Docs](https://hermes-agent.nousresearch.com/docs)
- [Abacus AI API Keys](https://abacus.ai/app/route-llm-apis)

## About

Abacus AI image generation plugin for Hermes Agent - FLUX, DALL-E, MidJourney and 20+ models

### Topics

[abacus-ai](https://github.com/topics/abacus-ai) [ai-image-generator](https://github.com/topics/ai-image-generator) [dalle](https://github.com/topics/dalle) [flux](https://github.com/topics/flux) [hermes-agent](https://github.com/topics/hermes-agent) [hermes-image-gen](https://github.com/topics/hermes-image-gen) [hermes-plugin](https://github.com/topics/hermes-plugin) [image-generation](https://github.com/topics/image-generation) [midjourney](https://github.com/topics/midjourney) [open-source](https://github.com/topics/open-source)

### Resources

[Readme](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#readme-ov-file)

[MIT license](https://github.com/ZoniBoy00/hermes-agent-abacus-ai#MIT-1-ov-file)

[Activity](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/activity)

### Stars

[**0** stars](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/stargazers)

### Watchers

[**0** watching](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/watchers)

### Forks

[**0** forks](https://github.com/ZoniBoy00/hermes-agent-abacus-ai/forks)

[Report repository](https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2FZoniBoy00%2Fhermes-agent-abacus-ai&report=ZoniBoy00+%28user%29)

## Releases

## Packages

## Used by

## Contributors

## Languages

You can’t perform that action at this time.