> 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. # setGlobalData > Merge key-value pairs into the global data object available to the AI throughout a conversation. [ref-agentbase]: /docs/server-sdks/reference/typescript/agents/agent-base Merge key-value pairs into the `global_data` object available to the AI throughout the conversation. Matches Python's `set_global_data`, which calls `.update()` on the internal dict — existing keys are preserved; incoming keys overwrite on collision. Skills and other callers can each contribute keys without clobbering one another. > **Note** > > Despite the `set` prefix, this method **merges** rather than replaces. There is > no built-in "clear" method; construct a new agent if you need an empty > `global_data` object. ## **Parameters** **`data`** `Record` — required Object of key/value pairs. Values can be any JSON-serializable type. --- ## **Returns** [`AgentBase`][ref-agentbase] -- Returns `this` for method chaining. ## **Example** ```typescript {5} import { AgentBase } from '@signalwire/sdk'; const agent = new AgentBase({ name: 'support', route: '/support' }); agent.setPromptText('You are a helpful assistant.'); agent.setGlobalData({ company_name: 'Acme Corp', support_hours: '9am-5pm EST', user_tier: 'standard', }); await agent.serve(); ``` > Merge key-value pairs into the global data object available to the AI throughout a conversation.