***

title: set_global_data
slug: /reference/python/agents/agent-base/set-global-data
description: Merge data into the global data dictionary available to the AI throughout a conversation.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[ref-agentbase]: /docs/server-sdks/reference/python/agents/agent-base

Merge data into the global data dictionary available to the AI throughout the
conversation. This method merges rather than replaces, so multiple callers (skills,
dynamic config callbacks, etc.) can each contribute keys without overwriting each other.

<Note>
  This method is thread-safe. Concurrent calls from different threads or async contexts
  are serialized via an internal lock.
</Note>

## **Parameters**

<ParamField path="data" type="dict[str, Any]" required={true} toc={true}>
  Dictionary of key/value pairs to merge into global data. Values can be any
  JSON-serializable type.
</ParamField>

## **Returns**

[`AgentBase`][ref-agentbase] -- Returns self for method chaining.

## **Example**

```python {5}
from signalwire import AgentBase

agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")
agent.set_global_data({
    "company_name": "Acme Corp",
    "support_hours": "9am-5pm EST",
    "user_tier": "standard"
})
agent.serve()
```