# ReadonlyContext

interface ReadonlyContext

A readonly view of the invocation context.

#### Inheritors

CallbackContext

## Properties

agentName
Link copied to clipboard
abstract val agentName: String

The name of the agent that is being invoked.

artifactService
Link copied to clipboard
abstract val artifactService: ArtifactService?

The ArtifactService instance.

branch
Link copied to clipboard
abstract val branch: String?

The branch of the invocation context.

invocationId
Link copied to clipboard
abstract val invocationId: String

The unique ID of this invocation.

memoryService
Link copied to clipboard
abstract val memoryService: MemoryService?

The MemoryService instance.

runConfig
Link copied to clipboard
abstract val runConfig: RunConfig?

The run configuration for this invocation.

session
Link copied to clipboard
abstract val session: Session

The session that this invocation is a part of.

state
Link copied to clipboard
abstract val state: Map<String, Any>

The state of the session.

userContent
Link copied to clipboard
abstract val userContent: Content?

The user content that this invocation is processing.

userId
Link copied to clipboard
abstract val userId: String

The user ID of the user that initiated the session.

## Functions

getEvents
Link copied to clipboard
abstract suspend fun getEvents(currentInvocation: Boolean = false, currentBranch: Boolean = false): List<Event>

Returns the events from the current session.