--- title: Maximizing code reuse with topic blocks description: Topic blocks are reusable components that you can create to run common tasks and conversational elements in Virtual Agent conversations. Topic blocks simplify the topic authoring and maintenance process by enabling you to reuse standard procedures or actions across conversation topics. locale: en-US canonical_url: https://www.servicenow.com/docs/r/conversational-interfaces/virtual-agent/topic-blocks-overview.html release: brazil product: Virtual Agent classification: virtual-agent topic_type: concept last_updated: "2026-09-10" reading_time_minutes: 3 keywords: [Virtual Agent, Designer, Topic block, reusable, prebuilt, utility, code reuse] breadcrumb: [Other Virtual Agent features, Build conversations, Virtual Agent, Conversational Interfaces] --- # Maximizing code reuse with topic blocks Topic blocks are reusable components that you can create to run common tasks and conversational elements in Virtual Agent conversations. Topic blocks simplify the topic authoring and maintenance process by enabling you to reuse standard procedures or actions across conversation topics. ## How reusable topic blocks work A topic block is basically a subflow that performs certain actions or conversational tasks in a topic. For example, you can build a topic block that creates or retrieves certain types of records. You create topic blocks with Assistant Designer, similar to the way that you build conversation topics. In the Assistant Designer Asset library, you can do the following: - Set topic block properties. - Define the controls \(nodes\) used in the block. - Test or preview the block. - Publish the block to make it available for use in topics or other topic blocks. Unlike topics, topic blocks are not discoverable by a large language model \(LLM\). The topic block's functionality can only be accessed by a topic. A conversation that uses \(consumes\) a topic block is referred to as the calling topic. A topic block can call another topic block, but it cannot call itself. You can "nest" topic blocks in this manner, even if the flow returns to the initial topic, as in this example: \[Omitted image "nested-topic-blocks-chain.png"\] Alt text: Topic Block 1 calls TB 2, which in turn calls TB 3. Topic Block 3 can then call Topic Block 1 again. **Note:** If Virtual Agent detects an infinite loop, the conversation ends. The Virtual Agent platform and applications provide prebuilt topic blocks for common tasks or subflows. You can use these prebuilt topic blocks in your conversation topics "as is" in the appropriate application scope by duplicating them. You can then customize these prebuilt topic blocks as needed. Some of the common topic blocks include the following.
| Prebuilt topic blocks | Application scope |
|---|---|
| - Live Agent: Transfers a bot conversation to a live agent. - Survey-LLM: Presents a survey for collecting feedback for an agent. - AIA Interrupt Handler: Stop AI agent execution. | Global. Provided with the Glide Virtual Agent plugin \(com.glide.cs.chatbot\). |