Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

AgentGuard

CI npm: Claude Code plugin npm: OpenClaw plugin PyPI: Hermes plugin PyPI: Codex plugin PyPI: Python SDK npm: JavaScript SDK

Data collection for AgentGuard: the plugins and SDKs that stream AI-agent telemetry (sessions, prompts, LLM calls, tool calls) from Claude Code, OpenAI Codex, OpenClaw, and Hermes Agent into Timeplus.

AgentGuard itself — the streaming pipeline, detection rules, and dashboard — is a Timeplus app and lives in timeplus-io/apps (io.timeplus.agentguard, database ag). This repository only contains the collection side.

 Claude Code ─┐  hook plugin ──┐
 OpenClaw    ─┼─ hook plugin ──┼──▶ ag.agentguard_hook_events ─┐
 Hermes      ─┘  hook plugin ──┘                                ├─▶ AgentGuard Timeplus app
 Claude Code / OpenInference ── OTLP/HTTP :4318 ──▶ ag.otel_* ──┘   (CIM, metrics, rules, dashboard)
└──────────── this repo ────────────┘                              └──── timeplus-io/apps ────┘

The standalone AgentGuard server is retired. The Go backend, React UI, Docker image, setup wizard, and install.sh installer used to live here. They were removed after the move to the Timeplus app; the last release that contains them is v0.9.3.

Quick start

  1. Install the AgentGuard app on Timeplus Enterprise — see the app README. It creates database ag with the agentguard_hook_events stream and an OTLP/HTTP input (default port 4318).

  2. Install a plugin on each agent host and point it at Timeplus:

    Agent Package Guide
    Claude Code npm install -g @timeplus/agentguard-claudecode-plugin README
    OpenClaw openclaw plugins install @timeplus/agentguard-openclaw-plugin README
    Hermes Agent pip install agentguard-hermes-plugin README
    OpenAI Codex pip install timeplus-agentguard-codex-plugin README

    docs/plugin-install.md covers configuration for all of them. The Codex plugin works differently from the others: it exports OTel spans to the app's OTLP input instead of writing agentguard_hook_events. An agent can also do the install for you with the skills/agentguard skill.

  3. Verify events are arriving:

    SELECT agent_type, hook_name, agent_id, event_time
    FROM table(ag.agentguard_hook_events)
    ORDER BY event_time DESC LIMIT 10;

Packages

Package Registry Version Source Released by
@timeplus/agentguard-claudecode-plugin npm version agents/claudecode/agentguard-plugin CI, tag claudecode-plugin-v<version>
timeplus-agentguard-codex-plugin PyPI version agents/codex/agentguard-plugin CI, tag codex-plugin-v<version>
timeplus-agentguard (Python SDK, import agentguard) PyPI version sdk/python CI, tag sdk-python-v<version>
@timeplus/agentguard (JavaScript SDK) npm version sdk/javascript CI, tag sdk-js-v<version>
@timeplus/agentguard-openclaw-plugin npm version agents/openclaw/agentguard-plugin manual
agentguard-hermes-plugin PyPI version agents/hermes/agentguard-plugin manual

Configuration at a glance

Plugins are configured with environment variables (Claude Code, Hermes) or plugin config (OpenClaw). The essentials:

Variable Default Description
AGENTGUARD_TIMEPLUS_URL http://localhost:3218 Timeplus base URL — timeplusd HTTP port in timeplusd mode, the REST API base (port 8000) in rest mode
AGENTGUARD_INGEST_API timeplusd timeplusd (direct ingest on 3218) or rest (Timeplus REST API, for deployments where only port 8000 is exposed)
AGENTGUARD_USERNAME / AGENTGUARD_PASSWORD proton / (empty) Timeplus credentials (Basic auth in both modes)
AGENTGUARD_DATABASE ag Database owning the AgentGuard streams (the app's db_name)
AGENTGUARD_STREAM agentguard_hook_events Target stream
AGENTGUARD_AGENT_ID hostname Identifies this agent instance
AGENTGUARD_DEPLOYMENT_ID / AGENTGUARD_DEPLOYMENT_NAME Groups agents under a logical deployment

Full reference: docs/plugin-install.md.

Repository layout

Path Contents
agents/claudecode/ Claude Code hook plugin (TypeScript, npm) + local install Makefile + OTel guide
agents/openclaw/ OpenClaw plugin (TypeScript, npm) + Docker dev harness + scenario tests
agents/hermes/ Hermes Agent plugin (Python, PyPI) + Docker dev harness
agents/codex/ OpenAI Codex plugin (Python, PyPI), built on the Python SDK
agents/litellm/, agents/paperclip/, agents/xearxng/ Supporting dev/demo environments (LLM proxy, Paperclip showcase, search)
sdk/python/, sdk/javascript/ OpenTelemetry-based SDKs for instrumenting custom agents
skills/agentguard/ Agent skill that installs and configures the plugins
docs/ Plugin install, CIM event model, skills and memory monitoring

Development

make build            # build all four plugins
make test             # run all plugin unit tests
make package-plugins  # pack plugins into packages/ (npm tarballs + Hermes and Codex wheels)

Per plugin:

cd agents/claudecode/agentguard-plugin && npm install && npm test && npm run typecheck && npm run build
cd agents/openclaw/agentguard-plugin  && npm install && npm test && npm run build
cd agents/hermes/agentguard-plugin    && python3.12 -m unittest discover -s tests   # needs Python >= 3.10
cd agents/codex/agentguard-plugin     && python3.12 -m unittest discover -s tests   # needs Python >= 3.10

Releasing

Every package is versioned and released on its own; there is no product-wide release tag.

Claude Code plugin, Codex plugin and both SDKs are published by CI from a GitHub Release:

  1. Bump the package's version and merge:
    • Claude Code plugin: agents/claudecode/agentguard-plugin/package.json (+ lockfile)
    • Codex plugin: agents/codex/agentguard-plugin/pyproject.toml and agentguard_codex/__init__.py
    • Python SDK: sdk/python/pyproject.toml
    • JavaScript SDK: sdk/javascript/package.json (+ lockfile)
  2. Publish a GitHub Release from main with the tag shown in the Packages table, for example claudecode-plugin-v0.5.1.

The matching workflow in .github/workflows/publish-*.yml tests, builds and publishes. It fails if the tag does not match the package version and ignores other tags; running it manually builds without uploading.

OpenClaw and Hermes plugins are still published manually:

cd agents/openclaw/agentguard-plugin  && npm publish   # prepublishOnly rebuilds dist/
cd agents/hermes/agentguard-plugin    && make publish   # hatch build + twine upload

A note on tool-call holds

The Claude Code, OpenClaw and Hermes plugins still contain the synchronous hold-and-wait path (AGENTGUARD_HOLDS_ENABLED, AGENTGUARD_URL), which called the standalone server's /api/holds endpoint. The Timeplus app has no hold capability, so leave AGENTGUARD_HOLDS_ENABLED=false (the default); the plugins then run in observe-only mode.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages