# `LlmCore.Agent.Components.InjectResults`
[🔗](https://github.com/fosferon/llm_core/blob/v0.3.0/lib/llm_core/agent/components/inject_results.ex#L1)

Builds the messages to append for the next LLM turn.

Constructs:

1. An assistant message containing the tool call requests (so the LLM
   sees its own tool calls in conversation history)
2. Tool result messages (one per result) in the provider-neutral format

These messages are stored in `ctx.result_messages` — the outer loop
reads them and appends to the accumulated message list. This mirrors
how a step-oriented loop executor accumulates `step_results` outside
the pipeline.

# `call`

```elixir
@spec call(
  LlmCore.Agent.Context.t(),
  keyword()
) :: LlmCore.Agent.Context.t()
```

Builds assistant + tool result messages from the current iteration.

## Parameters

  * `ctx` — `%Context{}` with `response`, `tool_calls`, and `tool_results`
  * `opts` — ALF stage options (unused)

## Returns

  Updated `%Context{}` with `result_messages` populated.

---

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