---
schema_version: "1"
id: 4b5b14d528b887699bb31e61c05c37aa99520832fce299ae3befabac3f218fc2
title: AgentforceComponent
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/genai/agentforce-mobile-sdk/references/android/agentforce-component-android.md
canonical_url: https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-component-android.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a4fb25f9c5c696faf0caefdbcdd2b9c3a0981afd4eab84c29c9ba17360d8bb3a
products:
  - Agentforce Mobile SDK
  - Agentforce and Einstein Generative AI
---
# AgentforceComponent

`@Serializable data class AgentforceComponent`

Base component model for rendering dynamic UI elements in the Agentforce Android SDK.

## Signature

```kotlin
@Serializable
data class AgentforceComponent(
    val definition: String,
    val name: String? = null,
    val properties: Map<String, Any> = emptyMap(),
    val regions: AgentforceDataRegions
)
```

## Properties

| Property   | Type                                                                               | Description                                                           |
| ---------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| definition | String                                                                             | Component type identifier (e.g., "copilot/list")                      |
| name       | String?                                                                            | Optional component instance name                                      |
| properties | `@Serializable(with = AgentforceViewPropertiesSerializer::class) Map<String, Any>` | Component-specific configuration properties with custom serialization |
| regions    | AgentforceDataRegions                                                              | Data regions containing nested components and content                 |

## Constructor

| Constructor                                                  | Parameters                                                                                                                  |
| ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| `AgentforceComponent(definition, name, properties, regions)` | `definition: String`, `name: String? = null`, `properties: Map<String, Any> = emptyMap()`, `regions: AgentforceDataRegions` |

## Extension Functions

| Function            | Signature                                                                                          | Description                             |
| ------------------- | -------------------------------------------------------------------------------------------------- | --------------------------------------- |
| `getIntProperty`    | `fun AgentforceComponent.getIntProperty(key: String, default: Int): Int`                           | Get integer property with default value |
| `getListProperty`   | `fun AgentforceComponent.getListProperty(key: String, default: List<String>): List<String>`        | Get list property with default value    |
| `getMapProperty`    | `fun AgentforceComponent.getMapProperty(key: String, default: Map<String, Any>): Map<String, Any>` | Get map property with default value     |
| `getStringProperty` | `fun AgentforceComponent.getStringProperty(key: String, default: String): String`                  | Get string property with default value  |

## Related Documentation

- [AgentforceClient](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-client-android.md) - Client interface
- [AgentforceAPI](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/android/agentforce-api-android.md) - Backend component data source
