# `ReqManagedAgents.Outcome`
[🔗](https://github.com/cash-mckeeman/req_managed_agents/blob/v0.12.0/req_managed_agents/lib/req_managed_agents/outcome.ex#L1)

A graded-session goal: a natural-language `description` of what to achieve and
a `rubric` the provider grades the result against, optionally bounded by
`max_iterations` revise cycles.

Pass it as the `:outcome` option to `ReqManagedAgents.Session.run/2` (or
`start_link/2`) to kick off a `user.define_outcome` graded session instead of a
plain `:prompt`. A map with the same atom keys is accepted interchangeably.

# `t`

```elixir
@type t() :: %ReqManagedAgents.Outcome{
  description: String.t(),
  max_iterations: pos_integer() | nil,
  rubric: String.t()
}
```

# `new`

```elixir
@spec new(t() | map()) :: {:ok, t()} | {:error, :invalid_outcome}
```

Coerce a map or an existing `%Outcome{}` into a validated `%Outcome{}`.

The single shape gate for the `:outcome` option: `description` and `rubric`
must be binaries under atom keys; `max_iterations` is optional. Anything else
returns `{:error, :invalid_outcome}`.

---

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