# `Vibe.Eval`
[🔗](https://github.com/elixir-vibe/vibe/blob/v0.2.3/lib/vibe/eval.ex#L1)

Runtime Elixir evaluation with captured IO, timeouts, and session state.

Eval is Vibe's main control plane for agents. The model-facing `eval` tool can
call ordinary Elixir APIs inside the running Vibe VM, which keeps the external
tool surface small while still exposing commands, telemetry, storage, plugins,
sessions, subagents, AST, and LSP helpers.

Use `run/2` when evaluation should persist variables, aliases, imports, and
requires for a session. Use `once/2` for one-off in-process evaluation that
should not keep state. Eval sessions preload aliases such as `Cmd` for
`Vibe.Command` and `MD` for `Vibe.MD`.

# `result`

```elixir
@type result() :: {:ok, Vibe.Eval.Result.t()} | {:error, String.t()}
```

# `bindings`

```elixir
@spec bindings(String.t()) ::
  {:ok, [Vibe.Eval.Evaluator.binding_info()]} | {:error, String.t()}
```

# `cancel`

```elixir
@spec cancel(String.t()) :: :ok
```

# `forget`

```elixir
@spec forget(String.t(), [atom() | String.t()] | atom() | String.t()) ::
  :ok | {:error, String.t()}
```

# `once`

```elixir
@spec once(
  String.t(),
  keyword()
) :: result()
```

# `reset`

```elixir
@spec reset(String.t()) :: :ok | {:error, String.t()}
```

# `run`

```elixir
@spec run(
  String.t(),
  keyword()
) :: result()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
