> 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. # Step > An individual step in a conversation context with prompt, criteria, and navigation. [context]: /docs/server-sdks/reference/typescript/agents/context-builder/context [addbullets]: /docs/server-sdks/reference/typescript/agents/context-builder/step/add-bullets [addgatherquestion]: /docs/server-sdks/reference/typescript/agents/context-builder/step/add-gather-question [addsection]: /docs/server-sdks/reference/typescript/agents/context-builder/step/add-section [clearsections]: /docs/server-sdks/reference/typescript/agents/context-builder/step/clear-sections [setend]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-end [setfunctions]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-functions [setgatherinfo]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-gather-info [setresetconsolidate]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-consolidate [setresetfullreset]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-full-reset [setresetsystemprompt]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-system-prompt [setresetuserprompt]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-user-prompt [setskiptonextstep]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-skip-to-next-step [setskipuserturn]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-skip-user-turn [setstepcriteria]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-step-criteria [settext]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-text [setvalidcontexts]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-valid-contexts [setvalidsteps]: /docs/server-sdks/reference/typescript/agents/context-builder/step/set-valid-steps A Step represents a single phase within a [`Context`][context]. Each step has its own prompt text, completion criteria, available functions, and navigation rules. The AI advances through steps automatically when criteria are met. You create steps by calling `addStep()` on a Context object. All setter methods return `this` for fluent method chaining. ## **Properties** **`name`** `string` — required Step name. Must be unique within the parent context. --- ## **Methods** #### [addBullets](/docs/server-sdks/reference/typescript/agents/context-builder/step/add-bullets) Add a POM section with bullet points to the step. #### [addGatherQuestion](/docs/server-sdks/reference/typescript/agents/context-builder/step/add-gather-question) Add a question to this step's gather info configuration. #### [addSection](/docs/server-sdks/reference/typescript/agents/context-builder/step/add-section) Add a POM section to the step. #### [clearSections](/docs/server-sdks/reference/typescript/agents/context-builder/step/clear-sections) Remove all POM sections and direct text from this step. #### [setEnd](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-end) Set whether the conversation should end after this step completes. #### [setFunctions](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-functions) Set which SWAIG functions are available during this step. #### [setHistory](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-history) Control how much prior conversation the model sees at this step. #### [setGatherInfo](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-gather-info) Enable structured info gathering for this step. #### [setResetConsolidate](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-consolidate) Set whether to consolidate conversation history on context switch. #### [setResetFullReset](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-full-reset) Set whether to fully reset conversation history on context switch. #### [setResetSystemPrompt](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-system-prompt) Set a new system prompt for context switching from this step. #### [setResetUserPrompt](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-user-prompt) Set a user message to inject when this step triggers a context switch. #### [setSkipToNextStep](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-skip-to-next-step) Automatically advance to the next step without evaluating criteria. #### [setSkipUserTurn](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-skip-user-turn) Skip waiting for user input when entering this step. #### [setStepCriteria](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-step-criteria) Define when this step is considered complete. #### [setText](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-text) Set the step's prompt text directly. #### [setValidContexts](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-valid-contexts) Set which contexts the agent can navigate to from this step. #### [setValidSteps](/docs/server-sdks/reference/typescript/agents/context-builder/step/set-valid-steps) Set which steps the agent can navigate to from this step. ## **Example** ```typescript {6} import { ContextBuilder } from '@signalwire/sdk'; const builder = new ContextBuilder(); const ctx = builder.addContext('default'); const step = ctx.addStep('collect_info'); // Structured prompt with POM sections step.addSection('Task', 'Collect the caller\'s account information.'); step.addBullets('Required Information', [ 'Full legal name', 'Account number (10 digits)', 'Reason for calling', ]); // Completion criteria step.setStepCriteria( 'Complete when all three pieces of information have been collected and confirmed with the caller.' ); // Only allow relevant functions step.setFunctions(['lookup_account', 'verify_identity']); // Navigation step.setValidSteps(['process_request', 'escalate']); ``` > An individual step in a conversation context with prompt, criteria, and navigation. ## Docs - [addBullets](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/add-bullets.md): Add a POM section with bullet points to the step. - [addGatherQuestion](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/add-gather-question.md): Add a question to this step's gather_info configuration. - [addSection](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/add-section.md): Add a POM section to the step. - [clearSections](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/clear-sections.md): Remove all POM sections and direct text from this step. - [setEnd](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-end.md): Mark this step as terminal for the step flow. - [setFunctions](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-functions.md): Set which SWAIG functions are available during this step. - [setGatherInfo](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-gather-info.md): Enable structured info gathering for this step. - [setHistory](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-history.md): Control how much of the prior conversation the model sees when this step begins. - [setResetConsolidate](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-consolidate.md): Set whether to consolidate conversation history on context switch. - [setResetFullReset](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-full-reset.md): Set whether to perform a full conversation reset at this step. - [setResetSystemPrompt](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-system-prompt.md): Set a new system prompt for context switching from this step. - [setResetUserPrompt](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-reset-user-prompt.md): Set a user message to inject when this step triggers a context switch. - [setSkipToNextStep](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-skip-to-next-step.md): Automatically advance to the next step without evaluating criteria. - [setSkipUserTurn](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-skip-user-turn.md): Skip waiting for user input when entering this step. - [setStepCriteria](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-step-criteria.md): Define when this step is considered complete. - [setText](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-text.md): Set the step's prompt text directly. - [setValidContexts](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-valid-contexts.md): Set which contexts the agent can navigate to from this step. - [setValidSteps](https://signalwire.com/docs/server-sdks/reference/typescript/agents/context-builder/step/set-valid-steps.md): Set which steps the agent can navigate to from this step.