# Persistence Annotations

The following annotations can be placed in the component declaration to tell the WireBox injector where to persist the constructed object. If no scope annotations are found on the component or mappings then the object is treated as **NO SCOPE** or a prototype/transient object; one that gets constructed and discarded every time.

* `singleton` - A singleton object that persists for the entire life-time of the application
* `scope="registered_scope"` : Persist in a registered scope: session, request, singleton, custom, etc.

```javascript
component singleton{}

component scope="singleton"{}

component scope="request"{}

component singleton threadsafe{}
```


---

# 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://wirebox.ortusbooks.com/2/configuration/component-annotations/persistence-annotations.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.
