# `Nous.Agents.BasicAgent`
[🔗](https://github.com/nyo16/nous/blob/v0.17.1/lib/nous/agents/basic_agent.ex#L1)

Default agent implementation with standard tool-calling behavior.

BasicAgent implements the `Nous.Agent.Behaviour` and provides:
- Standard message building with system prompts
- Simple tool call detection and execution
- Text extraction from assistant responses

This is the default behaviour used when no `behaviour_module` is specified.

## Example

    agent = Agent.new("openai:gpt-4",
      instructions: "Be helpful",
      tools: [&search/2]
    )

    # Uses BasicAgent by default
    {:ok, result} = Agent.run(agent, "Search for Elixir tutorials")

# `build_messages`

Build messages to send to the LLM.

Combines system prompt (if any) with conversation messages.

# `extract_output`

Extract the final output from the context.

Returns the text content of the last assistant message.
When `output_type` is set, parses and validates the response.

# `get_tools`

Get tools available for this agent.

Returns the tools configured on the agent.

# `process_response`

Process a response from the LLM.

Adds the response to context and updates `needs_response` based on
whether there are tool calls to process.

---

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