***

title: setGlobalData
slug: /reference/typescript/agents/agent-base/set-global-data
description: Replace the global data object 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/typescript/agents/agent-base

Replace the entire global data object available to the AI throughout the conversation.

## **Parameters**

<ParamField path="data" type={"Record<string, unknown>"} required={true} toc={true}>
  Object of key/value pairs. Values can be any JSON-serializable type.
</ParamField>

## **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();
```