Skip to main content

FormalCC integration for Hermes Agent - Memory and Context Management

Project description

FormalCC Hermes Plugin

FormalCC integration for Hermes Agent, providing compiler-grade context compression and memory management.

Overview

This plugin integrates FormalCC's context runtime and memory system with Hermes Agent through two provider plugins:

  • formalcc-memory: Memory provider for prefetch, sync, and session management
  • formalcc-engine: Context engine for compiler-grade context compression

Features

  • ๐Ÿง  Memory Prefetch: Retrieve relevant context before model invocations
  • ๐Ÿ”„ Turn Synchronization: Async memory updates without blocking responses
  • ๐ŸŽฏ Scene Routing: Server-side routing for coding/vision/general contexts
  • ๐Ÿ› ๏ธ Memory Tools: Expose memory search and profile tools to the model
  • ๐Ÿ“Š Graceful Degradation: Continue operation when Runtime API is unavailable
  • ๐Ÿ” Enterprise Ready: OAuth2/API key auth, profile isolation, diagnostics

Installation

Mode A: Git Install (PoC)

hermes plugins install your-org/formalcc-hermes-plugin

Mode B: pip Install (Enterprise)

pip install formalcc-hermes-plugin

Configuration

1. Set API Key

export FORMALCC_API_KEY=fsy_live_your_key_here

2. Activate in Hermes Config

Edit your Hermes config.yaml:

memory:
  provider: "formalcc-memory"

context:
  engine: "formalcc-engine"

formalcc:
  base_url: "https://api.formsy.ai"
  workspace_id: "ws_default"
  tenant_id: "your_tenant"
  timeout_s: 30
  enable_memory_tools: true

3. Verify Installation

hermes formalcc-memory status
hermes formalcc-memory test

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      Hermes Agent                           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                            โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              formalcc-hermes-plugin                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            โ”‚
โ”‚  โ”‚ formalcc-memory  โ”‚      โ”‚ formalcc-engine  โ”‚            โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                            โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              FormalCC Runtime API Service                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Usage

Once configured, the plugins work automatically:

  • Memory prefetch happens before each model call
  • Turn sync happens after each assistant response
  • Context compression triggers when token count exceeds threshold
  • Memory tools are available to the model when enabled

Memory Tools

When enable_memory_tools: true, the model can use:

# Search memory
cc_memory_search(query="authentication flow", limit=10)

# Get memory profile
cc_memory_profile()

Development

Setup

git clone https://github.com/your-org/formalcc-hermes-plugin.git
cd formalcc-hermes-plugin
pip install -e ".[dev]"

Run Tests

pytest tests/
pytest tests/ --cov=plugins --cov=shared

Code Quality

black .
ruff check .

CLI Commands

Memory Provider

# Check status
hermes formalcc-memory status

# Test connectivity
hermes formalcc-memory test

# Show configuration
hermes formalcc-memory config

Compatibility

Hermes Version Plugin Version Runtime API Version Status
0.9.x 0.1.0 v0.3 โœ“ Supported
1.0.x 0.1.0 v0.3 โœ“ Supported

Documentation

License

MIT License - see LICENSE for details.

Support

For issues and questions:

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

formalcc_hermes_plugin-0.3.0.tar.gz (53.1 kB view details)

Uploaded Source

Built Distribution

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

formalcc_hermes_plugin-0.3.0-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file formalcc_hermes_plugin-0.3.0.tar.gz.

File metadata

  • Download URL: formalcc_hermes_plugin-0.3.0.tar.gz
  • Upload date:
  • Size: 53.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for formalcc_hermes_plugin-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a0c443f1e8d430336b543138c2d99c0c5d9e27d5ebf97241a552a00564972fd3
MD5 e1a138aa3c51a1903041452ce38a4912
BLAKE2b-256 f53d2d92688d05bf14f8439a0f5eeb8dfa70af87c7e469d4d196facb830aafa8

See more details on using hashes here.

File details

Details for the file formalcc_hermes_plugin-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for formalcc_hermes_plugin-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04dd4a1d4273d6004a58602b2cc540ea59fcd4de0030d8023796ff8fffb695f3
MD5 c30eff9b4c73b83e8325fd15cbcbd284
BLAKE2b-256 52ecaea429033d34297f07498609a15eb3be93148ad5c404092dda256edd82a2

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