> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memanto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Current Session

> Inspect the currently active session, including duration, expiration, and remaining time.

## Overview

Returns metadata for the session currently marked active in Memanto's local state — useful to verify session validity before executing memory operations. The endpoint reads the active session marker on the server; **no parameters are required**.

## Authentication

No session token — Memanto resolves the active session from local server state.

<ParamField header="Authorization" type="string">
  `Bearer <key>` — required unless the request originates from a loopback client. See [Management Endpoint Authentication](/api-reference/authentication#management-endpoint-authentication-agent-lifecycle).
</ParamField>

<ParamField header="X-Api-Key" type="string">
  Alternative to `Authorization: Bearer` — same credential.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "http://localhost:8000/api/v2/status"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - OK theme={null}
  {
    "session_id": "9f733fdb-ebf2-494e-8eb6-fb3320d6020d",
    "agent_id": "my-agent",
    "namespace": "memanto_agent_my-agent",
    "started_at": "2026-05-09T02:40:00.313078Z",
    "expires_at": "2026-05-09T08:40:00.313078Z",
    "status": "active",
    "time_remaining_seconds": 21573,
    "pattern": "support"
  }
  ```

  ```json 401 - Unauthorized (Management Auth Required) theme={null}
  {
    "detail": "Unauthorized. Agent management endpoints require either a loopback client or a valid management credential (Authorization: Bearer <key> or X-Api-Key)."
  }
  ```

  ```json 404 - Not Found (No Active Session) theme={null}
  {
    "detail": "No active session"
  }
  ```

  ```json 500 - Server Error theme={null}
  {
    "detail": {
      "error": "InternalServerError",
      "message": "An unexpected error occurred",
      "details": {
        "original_error": "..."
      }
    }
  }
  ```
</ResponseExample>

## Next Steps

* [Activate Agent](/api-reference/sessions/activate-agent) if no session is active
* [Deactivate Agent](/api-reference/sessions/deactivate-agent) to end the session early
