AgentSessionResource Class
- java.
lang. Object - com.
azure. ai. agents. models. AgentSessionResource
- com.
Implements
public final class AgentSessionResource
implements JsonSerializable<AgentSessionResource>
An agent session providing a long-lived compute sandbox for hosted agent invocations.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Agent |
fromJson(JsonReader jsonReader)
Reads an instance of Agent |
| String |
getAgentSessionId()
Get the agent |
|
Offset |
getCreatedAt()
Get the created |
|
Offset |
getExpiresAt()
Get the expires |
|
Offset |
getLastAccessedAt()
Get the last |
|
Agent |
getStatus()
Get the status property: The current status of the session. |
|
Offset |
getStoppedAt()
Get the stopped |
|
Version |
getVersionIndicator()
Get the version |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Method Details
fromJson
public static AgentSessionResource fromJson(JsonReader jsonReader)
Reads an instance of AgentSessionResource from the JsonReader.
Parameters:
Returns:
Throws:
getAgentSessionId
public String getAgentSessionId()
Get the agentSessionId property: The session identifier.
Returns:
getCreatedAt
public OffsetDateTime getCreatedAt()
Get the createdAt property: The Unix timestamp (in seconds) when the session was created.
Returns:
getExpiresAt
public OffsetDateTime getExpiresAt()
Get the expiresAt property: The Unix timestamp (in seconds) when the session expires (rolling, 30 days from last activity).
Returns:
getLastAccessedAt
public OffsetDateTime getLastAccessedAt()
Get the lastAccessedAt property: The Unix timestamp (in seconds) when the session was last accessed.
Returns:
getStatus
public AgentSessionStatus getStatus()
Get the status property: The current status of the session.
Returns:
getStoppedAt
public OffsetDateTime getStoppedAt()
Get the stoppedAt property: The Unix timestamp (in seconds) when the session sandbox was last observed to stop or go idle. Present only after the session has gone idle at least once, used for accurate idle-billing reconciliation.
Returns:
getVersionIndicator
public VersionIndicator getVersionIndicator()
Get the versionIndicator property: The version indicator determining which agent version backs this session.
Returns: