Open ProtocolAdapters

Custom CLI Adapter

Any CLI, shell script, CI job, or internal AI agent can become FORG-compatible by emitting structured metadata to the local FORG agent. The adapter does not need to proxy model traffic or expose prompt content.

Minimum events

forg emit --adapter internal-ci --event session.start --project checkout-service
forg emit --adapter internal-ci --event model.call --model gpt-4o --input-tokens 3000 --output-tokens 900
forg emit --adapter internal-ci --event session.end --status success

Best practices

  • Use a stable adapter name such as internal-ci or codex-wrapper
  • Emit session.start and session.end at minimum
  • Include project/repository metadata for attribution
  • Include token counts, latency, model, and status when available
  • Never include prompts, completions, source files, secrets, or customer data

See Build an Adapter for signing, schema, and fail-open behavior.

© 2026 UpgradIQ, Inc.Edit this page on GitHub