kite~/kite/docs/Manifest Schema
v0.2.1
Reference

kite.json Manifest Reference

Configure subscriptions, sinks, filters, enrichment, scoring, and queue settings for kite run --manifest kite.json.

The kite.json manifest drives kite run --manifest kite.json. It defines what events to receive, how to route them, and optional filtering, enrichment, and scoring settings.

// 01Minimal example

json
{
  "name": "my-agent",
  "sink": { "type": "proxy", "target": "http://localhost:3000/webhooks" }
}

// 02Full example

json
{
  "name": "my-agent",
  "subscriptions": [
    { "source": "github" },
    { "type": "com.stripe.payment_intent.succeeded" }
  ],
  "sink": {
    "type": "exec",
    "command": "./handle-event.sh",
    "importance": "high"
  },
  "filters": {
    "drop": [
      { "source": "github", "type": "com.github.ping" }
    ],
    "keep_only": [
      { "source": "github", "type": "com.github.push" },
      { "source": "github", "type": "com.github.pull_request.*" }
    ]
  },
  "enrichment": [
    {
      "match": { "source": "github", "type": "com.github.pull_request.*" },
      "run": "scripts/enrich-pr.sh",
      "timeout": "30s"
    }
  ],
  "scoring": {
    "rules": [
      {
        "match": { "source": "github", "type": "com.github.push" },
        "importance": "high",
        "paths": ["src/auth/*"],
        "reason": "auth-path push"
      }
    ],
    "default_importance": "normal"
  }
}

// 03Top-level fields

FieldTypeRequiredDescription
namestringyesLogical name for this agent session
subscriptionsSubscription[]noEvent filters for the WebSocket subscription scope. Omit to receive all events.
sinkSinkConfigyesWhere to deliver events
filtersFilterConfignoDrop or keep-only rules applied before delivery
enrichmentEnrichmentHook[]noShell scripts to run for matched events before delivery
scoringScoringConfignoImportance scoring rules
queueQueueConfignoLocal queue retention settings enforced by kite run

// 04Subscription

Narrows the WebSocket subscription request and the local manifest delivery filter. Multiple entries are OR'd.

FieldTypeDescription
sourcestringSource name, e.g. "github"
typestringCloudEvent type, e.g. "com.github.push".

// 05Sink types

The sink.type field selects the delivery mode.

stdout

Print events to standard output.

json
{ "type": "stdout", "json": true }
FieldTypeDefaultDescription
jsonbooleanfalsePrint full CloudEvent JSON instead of summary lines

proxy

Forward events as HTTP POST to a local server.

json
{ "type": "proxy", "target": "http://localhost:3000/webhooks" }
FieldTypeDescription
targetstringHTTP URL to POST events to

socket

Write events to a Unix domain socket.

json
{ "type": "socket", "path": "/tmp/kite.sock" }
FieldTypeDescription
pathstringUnix socket path to create and write to

exec

Execute a shell command for each event. Event JSON is passed on stdin.

json
{ "type": "exec", "command": "./handle.sh", "importance": "high" }
FieldTypeDefaultDescription
commandstringShell command to run per event
importancestringnoneMinimum importance level to deliver (low, normal, high, critical)
batchstringnoneBatch window duration (e.g. "500ms") — experimental

mcp_server

Expose events as an MCP (Model Context Protocol) server.

json
{ "type": "mcp_server", "buffer_size": 100 }
FieldTypeDefaultDescription
buffer_sizeinteger100In-memory event buffer size

paperclip

Trigger Paperclip agent heartbeats on matching events.

json
{
  "type": "paperclip",
  "api_url": "https://api.paperclip.ing",
  "company_id": "your-company-id",
  "agent_id": "optional-agent-id"
}
FieldTypeDescription
api_urlstringPaperclip API base URL
company_idstringPaperclip company ID
agent_idstring?Optional: target a specific agent. Omit to trigger all agents.

// 06FilterConfig

Applied before delivery. Drop rules run first; if any match, the event is dropped. keep_only rules run next — if any are defined and none match, the event is also dropped.

json
{
  "filters": {
    "drop": [
      { "source": "github", "type": "com.github.ping" }
    ],
    "keep_only": [
      { "source": "github", "type": "com.github.push" }
    ]
  }
}

FilterRule fields

All fields are optional and AND'd together. Glob patterns (*, **) are supported in source and type.

FieldTypeDescription
sourcestringSource name (e.g. "github"). Glob supported.
typestringCloudEvent type (e.g. "com.github.pull_request.*"). Glob supported.
actorstringGitHub sender login (e.g. "dependabot\\[bot\\]"). Glob supported.
refstringGit ref (e.g. "refs/heads/main"). Glob supported.

// 07EnrichmentHook

Run a shell script before delivery. The script receives the CloudEvent JSON on stdin. If it emits JSON to stdout, that JSON is stored as enrichment metadata and can influence later scoring fields such as changed_files; the delivered event body remains the original CloudEvent for sink compatibility.

FieldTypeDefaultDescription
matchFilterRuleEvents to enrich (same syntax as filter rules)
runstringShell command or script path to execute
timeoutstring"30s"Maximum execution time (e.g. "10s", "1m")

// 08ScoringConfig

Assign importance levels to events.

FieldTypeDefaultDescription
rulesScoringRule[][]Ordered list of scoring rules
dedupDedupConfignoneDuplicate suppression window applied by kite run before sink delivery
default_importancestring"normal"Importance level for unmatched events

ScoringRule

FieldTypeDescription
matchFilterRuleWhich events this rule applies to
importancestringlow, normal, high, or critical
pathsstring[]File path globs — rule only applies when matching files are in the payload
reasonstringOptional human-readable label for why this rule fired

DedupConfig

kite run applies deduplication after queue insertion and before filters, enrichment, scoring, and sink delivery. Duplicate events are marked filtered in the local queue and acknowledged to the server.

FieldTypeDefaultDescription
windowstringTime window for duplicate suppression (e.g. "5m", "1h")
keystring[]Fields to key duplicate suppression on (e.g. ["source", "type", "ref", "actor"])
strategystring"keep_last"Window strategy (keep_last refreshes the duplicate window; keep_first keeps the first timestamp)

// 09QueueConfig

Local queue retention settings. kite run applies these after inserting each event into the local SQLite queue.

FieldTypeDefaultDescription
retentionstring"7d"How long to retain queued events (e.g. "1d", "7d")
max_sizestringnoneMaximum number of queued events (e.g. "1000")