---
title: SessionPropertyEntry()
framework: foundationmodels
role: symbol
role_heading: Macro
path: foundationmodels/sessionpropertyentry()
---

# SessionPropertyEntry()

A macro for defining a custom key.

## Declaration

```swift
@attached(accessor) @attached(peer, names: prefixed(__Key_)) macro SessionPropertyEntry()
```

## Mentioned in

Composing dynamic sessions with instructions and profiles

## Overview

Overview When you need session-scoped properties apply the SessionPropertyEntry() macro to a stored property in an extension on SessionPropertyValues: extension SessionPropertyValues {     @SessionPropertyEntry     var activatedSkills: [String: Bool] = [:] } Read the shared session state for the custom value by using LanguageModelSession.SessionProperty: @SessionProperty(\.activatedSkills) var activatedSkills

## See Also

### Custom session properties

- [LanguageModelSession.SessionProperty](foundationmodels/languagemodelsession/sessionproperty.md)
- [SessionPropertyKey](foundationmodels/sessionpropertykey.md)
- [SessionPropertyValues](foundationmodels/sessionpropertyvalues.md)
