> This page is for Server SDKs.

> 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.

# update_global_data

> Update the global data dictionary with new values.

[set-global-data]: /docs/server-sdks/reference/python/agents/agent-base/set-global-data

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

Update the global data with new values. Functionally identical to
[`set_global_data()`][set-global-data] --
both merge the provided dictionary into the existing global data.

## **Parameters**

**`data`** `dict[str, Any]` — required

Dictionary of key/value pairs to merge into global data.

---

## **Returns**

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

## **Example**

```python {10}
from signalwire import AgentBase
from signalwire.core.function_result import FunctionResult

agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")

@agent.tool(description="Authenticate the caller")
def authenticate(args, raw_data=None):
    user = {"name": "Alice", "tier": "gold"}  # Replace with your user lookup
    agent.update_global_data({
        "authenticated": True,
        "user_name": user["name"],
        "user_tier": user["tier"]
    })
    return FunctionResult(f"Welcome back, {user['name']}.")

agent.serve()
```