> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentium.in/llms.txt
> Use this file to discover all available pages before exploring further.

# User Profile

> A structured profile card — name, role, timezone, and your own custom fields — one clean value each.

# User Profile

## In plain terms

The **User Profile** is a tidy profile card for each person: name, role, company, timezone, language — plus any custom fields you define. One value per field, like a CRM contact record.

> **The analogy:** the contact card in your phone. Structured slots (name, number, company), not free-form notes.

It complements [User Facts](/memory/user-facts): Profile is the *form* with known fields; Facts are the *free-form notes* for everything you can't predict.

## When to use it

* You have a **fixed set of attributes** you always want to know: name, role, timezone, plan tier, department.
* You want **clean structured values** you can render in a UI or use in logic (e.g. branch on `profile.plan === "enterprise"`).
* Timezone-aware behavior — the agent can schedule or phrase things in the user's local time.

```typescript theme={null}
memory: { storage, userProfile: true }   // tracks name, role, timezone, language
```

## When NOT to use it

* For **open-ended preferences** ("likes dark mode," "into sci-fi") — those are unpredictable, so use [User Facts](/memory/user-facts) instead.
* For **transient data** — see the same guidance as User Facts.

## Configuration

| Property       | Type       | Default | What it controls                                                          |
| -------------- | ---------- | ------- | ------------------------------------------------------------------------- |
| `customFields` | `string[]` | `[]`    | Extra named fields the extractor is allowed to fill, beyond the built-ins |

The four **built-in fields** (`name`, `role`, `timezone`, `language`) are always tracked. `customFields` adds your own:

```typescript theme={null}
// Built-ins only
memory: { storage, userProfile: true }

// Add product-specific fields
memory: {
  storage,
  userProfile: { customFields: ["company", "department", "plan"] },
}
```

**Why it's a whitelist:** the agent can *only* populate fields you list. It won't invent a `salary` field unless you ask for one. This keeps the profile clean, predictable, and safe to render in a UI.

## What gets stored

A single structured object per user:

```json theme={null}
{
  "name": "Akash Sengar",
  "role": "Senior Engineer",
  "company": "Apex Bank",
  "timezone": "Asia/Kolkata",
  "language": "en",
  "plan": "enterprise"
}
```

This is injected into the system prompt as a clean block:

```
About this user:
- Name: Akash Sengar
- Role: Senior Engineer
- Company: Apex Bank
- Timezone: Asia/Kolkata
```

## Direct access

```typescript theme={null}
const profile = await agent.memory!.getUserProfile()!.getProfile("user-123");
console.log(profile?.timezone);
```

## Cross-references

* [User Facts](/memory/user-facts) — free-form facts for unpredictable attributes
* [Multi-User Isolation](/memory/isolation) — profiles are strictly per user
* [Memory Overview](/memory/overview) — the full picture
