# ContextVars

## Gets a list of currently known context variable names.

> This API requires a Giver session.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/ContextVarNames/{strSessionID}":{"get":{"tags":["ContextVars"],"summary":"Gets a list of currently known context variable names.","description":"This API requires a Giver session.","operationId":"ContextVars-GetContextVarNames","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetContextVarNamesResponse"}}}}}}}},"components":{"schemas":{"GetContextVarNamesResponse":{"type":"object","properties":{"contextVarNames":{"type":"array","items":{"type":"string"},"description":"The list of currently known context variable names.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Get Context Var Names request."}}}}
````

## Gets a list of currently known values for a named context variable.

> This API requires a Giver session.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/ContextVarValues/{strSessionID}/{contextVarName}":{"get":{"tags":["ContextVars"],"summary":"Gets a list of currently known values for a named context variable.","description":"This API requires a Giver session.","operationId":"ContextVars-GetContextVarValues","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}},{"name":"contextVarName","in":"path","description":"The name of the context variable","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetContextVarValuesResponse"}}}}}}}},"components":{"schemas":{"GetContextVarValuesResponse":{"type":"object","properties":{"contextVarName":{"type":"string","description":"The name of the context variable.","nullable":true},"contextVarValues":{"type":"array","items":{"type":"string"},"description":"The list of currently known values for the named context variable.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Get Context Var Values request."}}}}
````

## Gets a dictionary of all the known values of known context variables.

> This API requires a Giver session.

````json
{"openapi":"3.0.1","info":{"title":"Memori Web API V2","version":"v2"},"paths":{"/memori/v2/ContextVars/{strSessionID}":{"get":{"tags":["ContextVars"],"summary":"Gets a dictionary of all the known values of known context variables.","description":"This API requires a Giver session.","operationId":"ContextVars-GetContextVars","parameters":[{"name":"strSessionID","in":"path","description":"The session ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetContextVarsResponse"}}}}}}}},"components":{"schemas":{"GetContextVarsResponse":{"type":"object","properties":{"contextVars":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"nullable":true},"description":"The dictionary of all known values of known context variables.","nullable":true},"requestID":{"type":"integer","description":"Progressive number of the request (since the Server started).\r\nUse this number, together with the RequestDateTime property,\r\nto report an anomalous response.","format":"int64"},"requestDateTime":{"type":"string","description":"Timestamp of the request.\r\nUse this timestamp, together with the RequestID property,\r\nto report an anomalous response.","format":"date-time"},"resultCode":{"type":"integer","description":"Result code. A code of ```0``` means no errors.\r\nWhen the request fails, its value is equivalent to the HTTP\r\nstatus code.","format":"int32"},"resultMessage":{"type":"string","description":"Result message. A message of ```Ok``` means no errors.","nullable":true}},"additionalProperties":false,"description":"Response of a Get Context Vars request."}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aisuru.com/api/engine/contextvars.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
