> For the complete documentation index, see [llms.txt](/llms.txt).
> The full corpus is at [llms-full.txt](/llms-full.txt).

# execute

> **execute**(`event`): `object`

Defined in: behavior.types.action.ts:73

Directly executes an event, bypassing all Behavior matching.

Use `execute` when you want to perform an action without triggering any
Behaviors. The event is executed immediately as a direct operation.

:::caution[Beta]
This API should not be used in production and may be trimmed from a public release.
:::

## Parameters

### event

[`SyntheticBehaviorEvent`](/api/behaviors/type-aliases/syntheticbehaviorevent/)

## Returns

`object`

### event

> **event**: [`SyntheticBehaviorEvent`](/api/behaviors/type-aliases/syntheticbehaviorevent/)

### type

> **type**: `"execute"`

## Example

```ts
defineBehavior({
  on: 'insert.text',
  guard: ({event}) => event.text === 'a',
  actions: [() => [execute({type: 'insert.text', text: 'b'})]],
})
```