---
schema_version: "1"
id: 00d4d219f43c817e320aee88d9c6fd0f0c88c08b2a91a3ae6e5f03de717c2611
title: AgentforceCard
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/genai/agentforce-mobile-sdk/references/ios/agentforce-card-ios.md
canonical_url: https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-card-ios.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 68752cc10fd45eecc0d34b6c2ad518ad2ca9517309993868b91ea09743823050
products:
  - Agentforce Mobile SDK
  - Agentforce and Einstein Generative AI
---
# AgentforceCard

## Overview

A SwiftUI view that displays Agentforce conversation content in a compact, card-style interface. The `AgentforceCard` provides a condensed view of AI conversation content, designed for integration into dashboards, summary screens, or any interface where space is constrained. It intelligently manages content display with expandable/collapsible functionality for longer responses.

## Declaration

```swift
@MainActor
struct AgentforceCard
```

## Properties

| Property | Type        | Description                       |
| -------- | ----------- | --------------------------------- |
| `body`   | `some View` | The main view content of the card |

## Methods

| Method               | Signature              | Description                          |
| -------------------- | ---------------------- | ------------------------------------ |
| View Implementations | `View-Implementations` | Default SwiftUI view implementations |

## Example Usage

```swift
// Basic integration in a dashboard
VStack {
    HeaderView()
    AgentforceCard(
        viewModel: conversationViewModel,
        launchChatView: {
            presentFullConversation()
        }
    )
    OtherDashboardContent()
}

// In a scrollable interface
ScrollView {
    LazyVStack {
        ForEach(cardData) { data in
            AgentforceCard(
                viewModel: data.viewModel,
                launchChatView: {
                    navigateToConversation(data.id)
                }
            )
        }
    }
}
```
