strands.session
¶
Session module.
This module provides session management functionality.
strands.session.file_session_manager
¶
File-based session manager for local filesystem storage.
FileSessionManager
¶
Bases: RepositorySessionManager, SessionRepository
File-based session manager for local filesystem storage.
Creates the following filesystem structure for the session storage:
/<sessions_dir>/
└── session_<session_id>/
├── session.json # Session metadata
└── agents/
└── agent_<agent_id>/
├── agent.json # Agent metadata
└── messages/
├── message_<id1>.json
└── message_<id2>.json
Source code in strands/session/file_session_manager.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | |
__init__(session_id, storage_dir=None, **kwargs)
¶
Initialize FileSession with filesystem storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session_id
|
str
|
ID for the session. ID is not allowed to contain path separators (e.g., a/b). |
required |
storage_dir
|
Optional[str]
|
Directory for local filesystem storage (defaults to temp dir). |
None
|
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/file_session_manager.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
create_agent(session_id, session_agent, **kwargs)
¶
Create a new agent in the session.
Source code in strands/session/file_session_manager.py
160 161 162 163 164 165 166 167 168 169 170 | |
create_message(session_id, agent_id, session_message, **kwargs)
¶
Create a new message for the agent.
Source code in strands/session/file_session_manager.py
192 193 194 195 196 197 198 199 200 | |
create_multi_agent(session_id, multi_agent, **kwargs)
¶
Create a new multiagent state in the session.
Source code in strands/session/file_session_manager.py
262 263 264 265 266 267 268 269 270 | |
create_session(session, **kwargs)
¶
Create a new session.
Source code in strands/session/file_session_manager.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
delete_session(session_id, **kwargs)
¶
Delete session and all associated data.
Source code in strands/session/file_session_manager.py
152 153 154 155 156 157 158 | |
list_messages(session_id, agent_id, limit=None, offset=0, **kwargs)
¶
List messages for an agent with pagination.
Source code in strands/session/file_session_manager.py
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |
read_agent(session_id, agent_id, **kwargs)
¶
Read agent data.
Source code in strands/session/file_session_manager.py
172 173 174 175 176 177 178 179 | |
read_message(session_id, agent_id, message_id, **kwargs)
¶
Read message data.
Source code in strands/session/file_session_manager.py
202 203 204 205 206 207 208 | |
read_multi_agent(session_id, multi_agent_id, **kwargs)
¶
Read multi-agent state from filesystem.
Source code in strands/session/file_session_manager.py
272 273 274 275 276 277 | |
read_session(session_id, **kwargs)
¶
Read session data.
Source code in strands/session/file_session_manager.py
143 144 145 146 147 148 149 150 | |
update_agent(session_id, session_agent, **kwargs)
¶
Update agent data.
Source code in strands/session/file_session_manager.py
181 182 183 184 185 186 187 188 189 190 | |
update_message(session_id, agent_id, session_message, **kwargs)
¶
Update message data.
Source code in strands/session/file_session_manager.py
210 211 212 213 214 215 216 217 218 219 220 | |
update_multi_agent(session_id, multi_agent, **kwargs)
¶
Update multi-agent state from filesystem.
Source code in strands/session/file_session_manager.py
279 280 281 282 283 284 285 286 287 | |
strands.session.repository_session_manager
¶
Repository session manager implementation.
RepositorySessionManager
¶
Bases: SessionManager
Session manager for persisting agents in a SessionRepository.
Source code in strands/session/repository_session_manager.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | |
__init__(session_id, session_repository, **kwargs)
¶
Initialize the RepositorySessionManager.
If no session with the specified session_id exists yet, it will be created in the session_repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session_id
|
str
|
ID to use for the session. A new session with this id will be created if it does not exist in the repository yet |
required |
session_repository
|
SessionRepository
|
Underlying session repository to use to store the sessions state. |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/repository_session_manager.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
append_bidi_message(message, agent, **kwargs)
¶
Append a message to the bidirectional agent's session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
Message
|
Message to add to the agent in the session |
required |
agent
|
BidiAgent
|
BidiAgent to append the message to |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/repository_session_manager.py
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | |
append_message(message, agent, **kwargs)
¶
Append a message to the agent's session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
Message
|
Message to add to the agent in the session |
required |
agent
|
Agent
|
Agent to append the message to |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/repository_session_manager.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
initialize(agent, **kwargs)
¶
Initialize an agent with a session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent
|
Agent
|
Agent to initialize from the session |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/repository_session_manager.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | |
initialize_bidi_agent(agent, **kwargs)
¶
Initialize a bidirectional agent with a session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent
|
BidiAgent
|
BidiAgent to initialize from the session |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/repository_session_manager.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | |
initialize_multi_agent(source, **kwargs)
¶
Initialize multi-agent state from the session repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
MultiAgentBase
|
Multi-agent source object to restore state into |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/repository_session_manager.py
240 241 242 243 244 245 246 247 248 249 250 251 252 | |
redact_latest_message(redact_message, agent, **kwargs)
¶
Redact the latest message appended to the session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
redact_message
|
Message
|
New message to use that contains the redact content |
required |
agent
|
Agent
|
Agent to apply the message redaction to |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/repository_session_manager.py
81 82 83 84 85 86 87 88 89 90 91 92 93 | |
sync_agent(agent, **kwargs)
¶
Serialize and update the agent into the session repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent
|
Agent
|
Agent to sync to the session. |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/repository_session_manager.py
95 96 97 98 99 100 101 102 103 104 105 | |
sync_bidi_agent(agent, **kwargs)
¶
Serialize and update the bidirectional agent into the session repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent
|
BidiAgent
|
BidiAgent to sync to the session. |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/repository_session_manager.py
326 327 328 329 330 331 332 333 334 335 336 | |
sync_multi_agent(source, **kwargs)
¶
Serialize and update the multi-agent state into the session repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
MultiAgentBase
|
Multi-agent source object to sync to the session. |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/repository_session_manager.py
231 232 233 234 235 236 237 238 | |
strands.session.s3_session_manager
¶
S3-based session manager for cloud storage.
S3SessionManager
¶
Bases: RepositorySessionManager, SessionRepository
S3-based session manager for cloud storage.
Creates the following filesystem structure for the session storage:
/<sessions_dir>/
└── session_<session_id>/
├── session.json # Session metadata
└── agents/
└── agent_<agent_id>/
├── agent.json # Agent metadata
└── messages/
├── message_<id1>.json
└── message_<id2>.json
Source code in strands/session/s3_session_manager.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | |
__init__(session_id, bucket, prefix='', boto_session=None, boto_client_config=None, region_name=None, **kwargs)
¶
Initialize S3SessionManager with S3 storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session_id
|
str
|
ID for the session ID is not allowed to contain path separators (e.g., a/b). |
required |
bucket
|
str
|
S3 bucket name (required) |
required |
prefix
|
str
|
S3 key prefix for storage organization |
''
|
boto_session
|
Optional[Session]
|
Optional boto3 session |
None
|
boto_client_config
|
Optional[Config]
|
Optional boto3 client configuration |
None
|
region_name
|
Optional[str]
|
AWS region for S3 storage |
None
|
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/s3_session_manager.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
create_agent(session_id, session_agent, **kwargs)
¶
Create a new agent in S3.
Source code in strands/session/s3_session_manager.py
205 206 207 208 209 210 | |
create_message(session_id, agent_id, session_message, **kwargs)
¶
Create a new message in S3.
Source code in strands/session/s3_session_manager.py
232 233 234 235 236 237 | |
create_multi_agent(session_id, multi_agent, **kwargs)
¶
Create a new multiagent state in S3.
Source code in strands/session/s3_session_manager.py
308 309 310 311 312 313 | |
create_session(session, **kwargs)
¶
Create a new session in S3.
Source code in strands/session/s3_session_manager.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
delete_session(session_id, **kwargs)
¶
Delete session and all associated data from S3.
Source code in strands/session/s3_session_manager.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |
list_messages(session_id, agent_id, limit=None, offset=0, **kwargs)
¶
List messages for an agent with pagination from S3.
Source code in strands/session/s3_session_manager.py
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
read_agent(session_id, agent_id, **kwargs)
¶
Read agent data from S3.
Source code in strands/session/s3_session_manager.py
212 213 214 215 216 217 218 | |
read_message(session_id, agent_id, message_id, **kwargs)
¶
Read message data from S3.
Source code in strands/session/s3_session_manager.py
239 240 241 242 243 244 245 | |
read_multi_agent(session_id, multi_agent_id, **kwargs)
¶
Read multi-agent state from S3.
Source code in strands/session/s3_session_manager.py
315 316 317 318 | |
read_session(session_id, **kwargs)
¶
Read session data from S3.
Source code in strands/session/s3_session_manager.py
174 175 176 177 178 179 180 | |
update_agent(session_id, session_agent, **kwargs)
¶
Update agent data in S3.
Source code in strands/session/s3_session_manager.py
220 221 222 223 224 225 226 227 228 229 230 | |
update_message(session_id, agent_id, session_message, **kwargs)
¶
Update message data in S3.
Source code in strands/session/s3_session_manager.py
247 248 249 250 251 252 253 254 255 256 257 | |
update_multi_agent(session_id, multi_agent, **kwargs)
¶
Update multi-agent state in S3.
Source code in strands/session/s3_session_manager.py
320 321 322 323 324 325 326 327 328 | |
strands.session.session_manager
¶
Session manager interface for agent session management.
SessionManager
¶
Bases: HookProvider, ABC
Abstract interface for managing sessions.
A session manager is in charge of persisting the conversation and state of an agent across its interaction. Changes made to the agents conversation, state, or other attributes should be persisted immediately after they are changed. The different methods introduced in this class are called at important lifecycle events for an agent, and should be persisted in the session.
Source code in strands/session/session_manager.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
append_bidi_message(message, agent, **kwargs)
¶
Append a message to the bidirectional agent's session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
Message
|
Message to add to the agent in the session |
required |
agent
|
BidiAgent
|
BidiAgent to append the message to |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/session_manager.py
143 144 145 146 147 148 149 150 151 152 153 154 155 | |
append_message(message, agent, **kwargs)
abstractmethod
¶
Append a message to the agent's session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message
|
Message
|
Message to add to the agent in the session |
required |
agent
|
Agent
|
Agent to append the message to |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/session_manager.py
72 73 74 75 76 77 78 79 80 | |
initialize(agent, **kwargs)
abstractmethod
¶
Initialize an agent with a session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent
|
Agent
|
Agent to initialize |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/session_manager.py
91 92 93 94 95 96 97 98 | |
initialize_bidi_agent(agent, **kwargs)
¶
Initialize a bidirectional agent with a session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent
|
BidiAgent
|
BidiAgent to initialize |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/session_manager.py
130 131 132 133 134 135 136 137 138 139 140 141 | |
initialize_multi_agent(source, **kwargs)
¶
Read multi-agent state from persistent storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
source
|
MultiAgentBase
|
Multi-agent state to initialize. |
required |
Returns:
| Type | Description |
|---|---|
None
|
Multi-agent state dictionary or empty dict if not found. |
Source code in strands/session/session_manager.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
redact_latest_message(redact_message, agent, **kwargs)
abstractmethod
¶
Redact the message most recently appended to the agent in the session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
redact_message
|
Message
|
New message to use that contains the redact content |
required |
agent
|
Agent
|
Agent to apply the message redaction to |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/session_manager.py
62 63 64 65 66 67 68 69 70 | |
register_hooks(registry, **kwargs)
¶
Register hooks for persisting the agent to the session.
Source code in strands/session/session_manager.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
sync_agent(agent, **kwargs)
abstractmethod
¶
Serialize and sync the agent with the session storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent
|
Agent
|
Agent who should be synchronized with the session storage |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/session_manager.py
82 83 84 85 86 87 88 89 | |
sync_bidi_agent(agent, **kwargs)
¶
Serialize and sync the bidirectional agent with the session storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent
|
BidiAgent
|
BidiAgent who should be synchronized with the session storage |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/session_manager.py
157 158 159 160 161 162 163 164 165 166 167 168 | |
sync_multi_agent(source, **kwargs)
¶
Serialize and sync multi-agent with the session storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
MultiAgentBase
|
Multi-agent source object to persist |
required |
**kwargs
|
Any
|
Additional keyword arguments for future extensibility. |
{}
|
Source code in strands/session/session_manager.py
100 101 102 103 104 105 106 107 108 109 110 111 | |
strands.session.session_repository
¶
Session repository interface for agent session management.
SessionRepository
¶
Bases: ABC
Abstract repository for creating, reading, and updating Sessions, AgentSessions, and AgentMessages.
Source code in strands/session/session_repository.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
create_agent(session_id, session_agent, **kwargs)
abstractmethod
¶
Create a new Agent in a Session.
Source code in strands/session/session_repository.py
23 24 25 | |
create_message(session_id, agent_id, session_message, **kwargs)
abstractmethod
¶
Create a new Message for the Agent.
Source code in strands/session/session_repository.py
35 36 37 | |
create_multi_agent(session_id, multi_agent, **kwargs)
¶
Create a new MultiAgent state for the Session.
Source code in strands/session/session_repository.py
56 57 58 | |
create_session(session, **kwargs)
abstractmethod
¶
Create a new Session.
Source code in strands/session/session_repository.py
15 16 17 | |
list_messages(session_id, agent_id, limit=None, offset=0, **kwargs)
abstractmethod
¶
List Messages from an Agent with pagination.
Source code in strands/session/session_repository.py
50 51 52 53 54 | |
read_agent(session_id, agent_id, **kwargs)
abstractmethod
¶
Read an Agent.
Source code in strands/session/session_repository.py
27 28 29 | |
read_message(session_id, agent_id, message_id, **kwargs)
abstractmethod
¶
Read a Message.
Source code in strands/session/session_repository.py
39 40 41 | |
read_multi_agent(session_id, multi_agent_id, **kwargs)
¶
Read the MultiAgent state for the Session.
Source code in strands/session/session_repository.py
60 61 62 | |
read_session(session_id, **kwargs)
abstractmethod
¶
Read a Session.
Source code in strands/session/session_repository.py
19 20 21 | |
update_agent(session_id, session_agent, **kwargs)
abstractmethod
¶
Update an Agent.
Source code in strands/session/session_repository.py
31 32 33 | |
update_message(session_id, agent_id, session_message, **kwargs)
abstractmethod
¶
Update a Message.
A message is usually only updated when some content is redacted due to a guardrail.
Source code in strands/session/session_repository.py
43 44 45 46 47 48 | |
update_multi_agent(session_id, multi_agent, **kwargs)
¶
Update the MultiAgent state for the Session.
Source code in strands/session/session_repository.py
64 65 66 | |