> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # set_gather_info > Enable structured info gathering for this step. [add-gather-question]: /docs/server-sdks/reference/python/agents/context-builder/step/add-gather-question [ref-step]: /docs/server-sdks/reference/python/agents/context-builder/step Enable info gathering for this step. Call [`add_gather_question()`][add-gather-question] after this method to define the questions. The gather\_info system collects structured information from the caller by presenting questions one at a time. It uses dynamic step instruction re-injection rather than tool calls, producing zero `tool_call`/`tool_result` entries in LLM-visible history. ## **Parameters** **`output_key`** `str | None` — default: None Key in `global_data` to store collected answers under. When `None`, answers are stored at the top level of `global_data`. --- **`completion_action`** `str | None` — default: None Where to go when all questions are answered. * `"next_step"` -- auto-advance to the next sequential step * A step name (e.g., `"process_results"`) -- jump to that specific step * `None` -- return to normal step mode after gathering --- **`prompt`** `str | None` — default: None Preamble text injected once when entering the gather step, giving the AI personality and context for asking the questions. --- **`isolated`** `bool` — default: False Default for every question in this gather. When `True`, each question is asked with the sibling questions and answers hidden from the model, so it must ask rather than derive the answer from an earlier one. A question's own `isolated` overrides this. Hidden turns stay in the call log. --- ## **Returns** [`Step`][ref-step] -- Self for method chaining. ## **Example** ```python {9} from signalwire import AgentBase agent = AgentBase(name="my-agent", route="/agent") contexts = agent.define_contexts() ctx = contexts.add_context("default") intake = ctx.add_step("intake") intake.set_text("Collect patient information.") intake.set_gather_info( output_key="patient_info", completion_action="next_step", prompt="Be friendly and professional when collecting information." ) intake.add_gather_question( key="full_name", question="What is your full name?", confirm=True ) ctx.add_step("review").set_text("Review the collected information with the patient.") agent.serve() ``` > Enable structured info gathering for this step.