Security advisory — Malicious litellm versions 1.82.7 and 1.82.8 were removed from PyPI (potential API key exfiltration). Uninstall them, rotate exposed credentials, and upgrade to a safe release (e.g. 1.82.9+). Run pip show litellm to verify. PyPI · README

Plugin Protocol

Enterprise plugins are described by a YAML manifest. Gateway and the admin policy center both consume it. Source directory: enterprise/plugins/.

Plugin Protocol

Enterprise plugins are described by a YAML manifest. Gateway and the admin policy center both consume it. Source directory: enterprise/plugins/.


Manifest types

typePurposeStatus
rule-packCompliance / sensitive-term / PII rulesImplemented (3 moderation packs)
tool-packTool-capability extension templateStub (watermark/doc-review)
theme-packWhite-label themeStub (theme-default)

rule-pack spec

Top-level fields

yaml
1name: moderation-pii-baseline # Unique id; extends refers to this name
2version: 0.1.0
3type: rule-pack
4description: Human-readable description
5extends: moderation-pii-baseline # Optional; inherit another rule-pack (Go loader: single string)
6rules:
7 - id: pii-email
8 kind: pii | keyword | regex
9 action: block | warn | redact
10 severity: critical | high | medium | low
11 message: Copy shown to the user / audit on a hit
12 # Kind-specific fields below

kind: pii

yaml
1kind: pii
2pii_type: email | mobile | id-card | bank-card | api-key

The Go policy-engine ships built-in detectors; redact replaces with a placeholder, block aborts the request.

kind: keyword

yaml
1kind: keyword
2keywords:
3 - keyword-1
4 - keyword-2

kind: regex

yaml
1kind: regex
2pattern: "(?i)regular-expression"

Action semantics

actionGateway behaviorUI blocked flag
blockAbort and return a business errortrue
warnAllow; record hitsfalse
redactReplace the sensitive span and continuefalse

Admin policy test POST /api/policy/test: blocked is true only when action=block.


extends inheritance

Example: moderation-finance/manifest.yaml

yaml
1extends: moderation-pii-baseline
2rules:
3 - id: finance-keyword-insider
4 kind: keyword
5 ...

Limits (Go loader):

  • extends is a single string; an array fails deserialization or keeps only the first item
  • The inheritance chain merges rules at load time; a child pack may override the same id (as implemented)

Official rule-packs

DirectoryextendsDescription
moderation-pii-baseline—Email / mobile / national ID / bank card / API Key
moderation-financepii-baselineFinance keywords + regex warn
moderation-medicalpii-baselineMedical PHI keyword warn

Gateway default scan: ../../plugins/moderation-*/manifest.yaml (see apps/gateway/internal/config/config.go).


PG policy vs manifest

  1. Plugins — built-in baseline, shipped with Gateway
  2. Admin policy center — tenant-custom rules written to policy_rules, published into enterprise_runtime_policy_snapshots
  3. Gateway — merges the snapshot + override file and hot-reloads

Customer-specific rules should live in the PG policy center or customers/*/rules/, not in @agenticx/* source.


tool-pack / theme-pack (reserved)

yaml
1name: tool-watermark
2version: 0.1.0
3type: tool-pack
4description: PDF watermark tool template
5# Current manifest is an empty-shell TODO

Implementation roadmap: connect to the Machi tool registry / enterprise tool marketplace. Schema docs will be filled in after the protocol stabilizes.


Customer-defined plugins

  1. Define a rule-pack at customers/<client>/plugins/<name>/manifest.yaml
  2. At deploy time, add the manifest path to Gateway config or import it as an admin policy pack
  3. Follow guides/enterprise-customers-collaboration.md: do not change the enterprise trunk

Related docs

Made-with: Damon Li