# `MingaEditor.State.AgentConnection`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/state/agent_connection.ex#L1)

Agent provider configuration and live editor ingest connection.

Provider configuration is immutable after startup; the ingest process may be
replaced as the editor's supervised agent integration restarts.

# `t`

```elixir
@type t() :: %MingaEditor.State.AgentConnection{
  agent_ingest: pid() | nil,
  agent_provider_module: module() | nil,
  agent_provider_opts: keyword()
}
```

# `connect_ingest`

```elixir
@spec connect_ingest(t(), pid() | nil) :: t()
```

Records the supervised stream-ingest process serving this editor.

# `new`

```elixir
@spec new(
  module() | nil,
  keyword()
) :: t()
```

Creates agent connection state from startup provider configuration.

---

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