# StepContext.entity_id
URL: https://lsd.tools/docs/api-context-entity-id
Updated: 2026-07-17

## Example

```python
ctx.emit("pipeline/entity/note", entity=ctx.entity_id, msg="reprocessed")
```

## Notes

Read-only. It is `None` when the step is wired loosely rather than owned by an entity. Like
[`step_id`](/docs/api-context-step-id), use it only to key events — not to read cached state.

## See also

**API:** [step_id](/docs/api-context-step-id) · [emit](/docs/api-context-emit) · [StepContext](/docs/api-context)

**Guides:** [Parameters vs ports](/docs/tools-params-ports)
