Skip to main content

Hermes Agent ACP persona for Jupyter AI — includes notebook context injection via MCP bridge

Project description

jupyter-ai-hermes

Hermes Agent as an ACP persona for Jupyter AI, with live notebook context injection and custom MCP tools for cell metadata management.

What it does

  • Injects live notebook context into every Hermes prompt — active notebook path, current cell ID, and cell content — so Hermes always knows what you're working on.
  • Documents all available MCP CLI tools so Hermes prefers them over raw nbformat scripts.
  • Registers custom MCP tools (set_cell_metadata, get_cell_metadata, list_cell_tags) for operations the built-in toolkit doesn't cover.

Requirements

  • Python >= 3.12
  • Jupyter AI with ACP client support
  • Hermes Agent installed (the hermes binary must be on PATH)

Installation

pip install jupyter-ai-hermes

Then restart JupyterLab. The "Hermes Agent" persona will appear in the Jupyter AI chat panel.

Configuration

By default the package searches for hermes in PATH. Override with:

export HERMES_BIN_PATH=/path/to/hermes

Related Packages

  • jupyter-hermes-proxy — Launch the Hermes Agent dashboard from the JupyterLab launcher panel with automatic port management via jupyter-server-proxy.

Both packages share the same HERMES_BIN_PATH environment variable convention.

MCP Tools

The package registers 3 custom MCP tools alongside the 16 built-in Jupyter AI notebook tools:

Tool What it does
set_cell_metadata Set cell metadata (e.g. Rise slideshow types, custom tags)
get_cell_metadata View cell metadata for debugging
list_cell_tags List all cells matching specific tags

All tools are also available via the jupyter-mcp-cli command-line bridge:

# Set a cell as a Rise slideshow slide
jupyter-mcp-cli set_cell_metadata \
  --arg file_path=notebook.ipynb \
  --arg cell_id=cell-abc123 \
  --arg 'metadata={"slideshow":{"slide_type":"slide"}}'

# List all cells tagged with "important"
jupyter-mcp-cli list_cell_tags \
  --arg file_path=notebook.ipynb \
  --arg tags='["important"]'

Entry Points

Group Name Target
jupyter_ai.personas hermes-acp jupyter_ai_hermes.hermes:HermesAcpPersona
jupyter_server_mcp.tools hermes_mcp_tools jupyter_ai_hermes.mcp_tools:TOOLS
console_scripts jupyter-mcp-cli jupyter_ai_hermes.mcp_cli:main

Architecture

┌──────────────────────────────────────────────┐
│  JupyterLab                                  │
│  ┌─────────────┐    ┌─────────────────────┐  │
│  │ Notebook UI │    │ Jupyter AI Chat     │  │
│  │ (YDoc)      │◄──►│ ┌─────────────────┐ │  │
│  └─────────────┘    │ │ Hermes Persona  │ │  │
│                     │ │  ├─ gather_ctx  │ │  │
│  ┌─────────────┐    │ │  ├─ MCP docs    │ │  │
│  │ MCP Server  │◄──►│ │  └─ forward ──► │ │  │
│  │ :3001       │    │ └─────────────────┘ │  │
│  └─────────────┘    └─────────────────────┘  │
│                                              │
│  ┌─────────────────────┐                     │
│  │ jupyter-mcp-cli     │                     │
│  │ (CLI bridge)        │                     │
│  └─────────────────────┘                     │
└──────────────────────────────────────────────┘
         │
         ▼
┌──────────────────────┐
│  Hermes Agent (ACP)  │
│  ┌────────────────┐  │
│  │ Tool execution │  │
│  │ jupyter-mcp-cli│  │
│  └────────────────┘  │
└──────────────────────┘

Development

git clone git@github.com:dive4dec/jupyter-ai-hermes.git
cd jupyter-ai-hermes
pip install -e ".[dev]"
pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter_ai_hermes-0.1.3.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupyter_ai_hermes-0.1.3-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file jupyter_ai_hermes-0.1.3.tar.gz.

File metadata

  • Download URL: jupyter_ai_hermes-0.1.3.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for jupyter_ai_hermes-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a2918129ed4722f3b68de8aa5440fe7303b263076f23881d260d28d716fdcf71
MD5 0085936945cc01105ec94429501691ba
BLAKE2b-256 40755da4cc089284307fe160bd1a9c9dcdd5c143f533e0f9d78c138d765a3c97

See more details on using hashes here.

File details

Details for the file jupyter_ai_hermes-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyter_ai_hermes-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6aaa2ccb40366df3c5637fd55967c1f229750f9a35c46e39f73f50ca7fc9e2ca
MD5 f2c30935ddd4a1e4a403537094193570
BLAKE2b-256 a259f401ca8474432e4c1c86d6b1c2e95508fe11337dd002c28425ee094a1f83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page