# Agent with Followup Suggestions (/agents/usage/agent-with-followup-suggestions)



Set `followups=True` to generate prompt suggestions when a run returns content. Agno makes a second model call using the user input and response.

<Steps>
  <Step title="Create a Python file">
    ```python title="followup_suggestions.py"
    from agno.agent import Agent
    from agno.models.openai import OpenAIResponses

    agent = Agent(
        model=OpenAIResponses(id="gpt-5.4-mini"),
        followups=True,
        num_followups=3,
    )

    response = agent.run("What is quantum computing?")

    print(response.content)
    print("\nFollowup suggestions:")
    for i, suggestion in enumerate(response.followups or [], 1):
        print(f"  {i}. {suggestion}")
    ```
  </Step>

    <Step title="Set up your virtual environment">
      <CodeBlockTabs defaultValue="Mac">
        <CodeBlockTabsList>
          <CodeBlockTabsTrigger value="Mac">
            Mac
          </CodeBlockTabsTrigger>

          <CodeBlockTabsTrigger value="Windows">
            Windows
          </CodeBlockTabsTrigger>
        </CodeBlockTabsList>

        <CodeBlockTab value="Mac">
          ```bash
          uv venv --python 3.12
          source .venv/bin/activate
          ```
        </CodeBlockTab>

        <CodeBlockTab value="Windows">
          ```bash
          uv venv --python 3.12
          .venv\Scripts\activate
          ```
        </CodeBlockTab>
      </CodeBlockTabs>
    </Step>

  <Step title="Install dependencies">
    ```bash
    uv pip install -U agno openai
    ```
  </Step>

  <Step title="Export your OpenAI API key">
    <CodeBlockTabs defaultValue="Mac/Linux">
      <CodeBlockTabsList>
        <CodeBlockTabsTrigger value="Mac/Linux">
          Mac/Linux
        </CodeBlockTabsTrigger>

        <CodeBlockTabsTrigger value="Windows">
          Windows
        </CodeBlockTabsTrigger>
      </CodeBlockTabsList>

      <CodeBlockTab value="Mac/Linux">
        ```bash
        export OPENAI_API_KEY="your_openai_api_key_here"
        ```
      </CodeBlockTab>

      <CodeBlockTab value="Windows">
        ```powershell
        $Env:OPENAI_API_KEY="your_openai_api_key_here"
        ```
      </CodeBlockTab>
    </CodeBlockTabs>
  </Step>

  <Step title="Run Agent">
    ```bash
    python followup_suggestions.py
    ```
  </Step>
</Steps>

## Options [#options]

| Parameter        | Type            | Default | Description                                                |
| ---------------- | --------------- | ------- | ---------------------------------------------------------- |
| `followups`      | `bool`          | `False` | Enable followup suggestion generation                      |
| `num_followups`  | `int`           | `3`     | Number of suggestions to generate (minimum 1)              |
| `followup_model` | `Model \| None` | `None`  | Model used for followups. `None` reuses the agent's model. |

## Streaming [#streaming]

Followup suggestions are available via events when streaming. The `FollowupsCompleted` event carries the suggestions after the main response finishes.

```python title="followup_suggestions_streaming.py"
import asyncio

from agno.agent import Agent, RunEvent
from agno.models.openai import OpenAIResponses

agent = Agent(
    model=OpenAIResponses(id="gpt-5.4-mini"),
    followups=True,
    num_followups=3,
)


async def main():
    async for event in agent.arun(
        "What is quantum computing?",
        stream=True,
        stream_events=True,
    ):
        if event.event == RunEvent.run_content and event.content:
            print(event.content, end="", flush=True)

        if event.event == RunEvent.followups_completed:
            print("\n\nFollowup suggestions:")
            for i, suggestion in enumerate(event.followups or [], 1):
                print(f"  {i}. {suggestion}")


asyncio.run(main())
```

The current implementation requires a model instance for `followup_model`. A model-name string is accepted by the constructor annotation but is not resolved before followup generation. Use the instance form shown below.

## Using a separate model [#using-a-separate-model]

Use `followup_model` to run followup generation with a separate model.

```python
from agno.agent import Agent
from agno.models.openai import OpenAIResponses

agent = Agent(
    model=OpenAIResponses(id="gpt-5.4-mini"),
    followups=True,
    num_followups=3,
    followup_model=OpenAIResponses(id="gpt-4o-mini"),
)
```

## Developer Resources [#developer-resources]

* [Agent reference](/reference/agents/agent)
* [RunOutput reference](/reference/agents/run-response)
