---
schema_version: "1"
id: 08e0f24530a515de4251e591ce810dac92979e9a969f2059ac55c9f2fb223197
title: AgentforceContextManager
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/genai/agentforce-mobile-sdk/references/android/agentforce-context-manager-android.md
canonical_url: https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-context-manager-android.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 92640d243ac0357ea625ee551c76fc875dc77c36b8bc75d75c1d2fc8b2d62e27
products:
  - Agentforce Mobile SDK
  - Agentforce and Einstein Generative AI
---
# AgentforceContextManager

`class AgentforceContextManager(agentforcePageContext: AgentforcePageContext? = null) : AgentforceContextManaging`

Manages conversation context and page context for Agentforce conversations.

## Signature

```kotlin
class AgentforceContextManager(
    var agentforcePageContext: AgentforcePageContext? = null
) : AgentforceContextManaging
```

## Constructors

| Constructor                                                         | Description |
| ------------------------------------------------------------------- | ----------- |
| `constructor(agentforcePageContext: AgentforcePageContext? = null)` |             |

## Properties

| Property                | Type                         | Description                   |
| ----------------------- | ---------------------------- | ----------------------------- |
| `agentforcePageContext` | `var AgentforcePageContext?` | Current page context variable |

## Functions

| Method                                                            | Return Type                                  | Description                                                                                      |
| ----------------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `currentContext()`                                                | `MutableMap<String, CopilotContextVariable>` |                                                                                                  |
| `resetPageContext()`                                              | `Unit`                                       |                                                                                                  |
| `setAdditionalContextVariables(CopilotAdditionalContext context)` | `Unit`                                       |                                                                                                  |
| `updatePageContext(AgentforcePageContext context)`                | `Unit`                                       | Set current page context variable Use resetPageContext if you wish to make the page context null |

## Nested Types

### Companion

```kotlin
object Companion
```

#### Companion Methods

| Method                                            | Return Type                    | Description |
| ------------------------------------------------- | ------------------------------ | ----------- |
| `validateTypes(CopilotAdditionalContext context)` | `List<CopilotContextVariable>` |             |

## Related Documentation

- [AgentforceClient](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-client-android.md)
- [AgentforceConversation](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-conversation-android.md)
