Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

2.2 KB
Raw Blame
---
title: "beacon rules fields"
description: "Print Beacon endpoint event fields available to threat-rule CEL expressions"
---

## Command overview

`beacon rules fields` prints the endpoint event fields that threat-rule CEL expressions can match on.

```bash title="Command syntax"
beacon rules fields [flags]
```

Use this command while authoring rules to confirm field paths and value types.

## CEL field paths

Threat-rule expressions bind each Beacon event as `e`. Field paths mirror the event JSON shape, such as:

| Field path | Example use |
|------------|-------------|
| `e.event.action` | Match event type, such as `command.executed` or `file.read` |
| `e.command.command` | Match executed command text |
| `e.command.parsed_commands` | Match the commands a command line runs (name, argv, pipeline stage, file effects) rather than its text (derived by the engine; needs `spec: threat-rules/v1.2`) |
| `e.file.path` | Match a file path |
| `e.prompt.text` | Match prompt text when retained |
| `e.prompt.id` | Group the events of one turn: the prompt and everything the agent did for it |
| `e.gen_ai.tool.call.result_text` | Match text a file read, web fetch, or MCP tool returned, when retained (derived by the engine; empty for other actions) |
| `e.gen_ai.system_instructions_text` | Match runtime-provided system instructions, such as the skill index on `session.context`, when retained (derived by the engine from text parts) |
| `e.system_context.kind` | Tell a skill index (`skill_listing`) from other `session.context` events |
| `e.gen_ai.usage.input_tokens` | Match normalized token usage fields |

## Examples

Print the field list:

```bash title="List rule fields"
beacon rules fields
```

Render the field reference as markdown:

```bash title="Render fields as markdown"
beacon rules fields --markdown
```

## Flags

| Flag | Description |
|------|-------------|
| `--markdown` | Render as a markdown reference table |

## Related

<Columns cols={2}>
  <Card title="beacon rules lint" icon="check" href="/cli/rules-lint">
    Validate CEL expressions and embedded fixtures.
  </Card>
  <Card title="Endpoint Event Schema" icon="code" href="/telemetry-schema/event-schema">
    Review normalized Beacon endpoint events.
  </Card>
</Columns>