# keep

`keep(**kwargs)`

Adds all provided arguments to the current integration namespace. Once kept, they can be accessed directly throughout the life of the integration, including in subsequent lifecycle hooks and as values within a field mapping.

The keyword given as a variable determines the variable name that's used to access the value subsequently.

```python
a = ["list", "items"]
keep(a=a)

keep(should_create_account = input.payload.create_account)

b, c = [], []
keep(test=b, c=c)

x = {"y": [], "z": []}
keep(**x)
```

Note that mutations to a variable after it is kept are **not** updated within the global namespace. Changes to a variable after it is kept must then be re-kept to persist for later access.

```
# Before hook
keep(foo = 123)
foo += 1

# Finaly hook
debug(foo) # This will print "123"
```


---

# 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://glyue.docs.sandboxbanking.com/reference/special_functions/keep.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.
