Any tool that can make an HTTP POST request can emit FORG signals. The adapter protocol is open and documented. Build a custom adapter in under an hour.
Emit signals via a simple HTTP POST to localhost:6247/emit. No SDK required — curl works.
Signals are authenticated with HMAC-SHA256 using a session key. Prevents spoofed signals.
Signal payloads are simple JSON objects. Model, tokens, cost, adapter name, and custom metadata.
This is all you need to emit a signal. Everything else is optional.
curl -X POST http://localhost:6247/emit \
-H "Content-Type: application/json" \
-H "X-FORG-HMAC: <hmac>" \
-d '{
"adapter": "my-tool",
"event": "session.end",
"model": "gpt-4o",
"input_tokens": 1500,
"output_tokens": 340
}'{
"adapter": "my-tool",
"event": "session.end",
"session_id": "uuid",
"model": "gpt-4o",
"input_tokens": 1500,
"output_tokens": 340,
"cost_usd": 0.0074,
"duration_ms": 3200,
"context": "production",
"user_id": "user@company.com",
"project": "my-project",
"metadata": {
"custom_key": "custom_value"
}
}| Field | Type | Required | Description |
|---|---|---|---|
adapter | string | Required | Your adapter's unique identifier (e.g. 'my-tool') |
event | string | Required | Event type: session.start, session.end, tool.call, etc. |
model | string | Optional | Model name (gpt-4o, claude-3-5-sonnet, etc.) |
input_tokens | number | Optional | Input token count for this event |
output_tokens | number | Optional | Output token count for this event |
cost_usd | number | Optional | Estimated cost in USD (FORG can compute from tokens) |
session_id | string | Optional | UUID to group events into a single session |
user_id | string | Optional | User identifier for attribution |
metadata | object | Optional | Arbitrary key-value metadata for custom rule conditions |
Full adapter protocol documentation with examples in Python, Node.js, Go, and Ruby.