# Admin API

<!-- Canonical: https://www.atlaso.ai/docs/admin -->

`atlaso.admin` is the cross-tenant escape hatch. Every function takes a literal `confirm` string so importing the module is a code-review event.

## Why a separate module

Per-user isolation is the default. Cross-tenant queries — search all users for a string, list all user IDs, write to the unscoped shard — are sometimes necessary (audits, migrations, debugging) but should never be reachable from tab-completion on `Memory`. Atlaso puts them in their own module and requires a literal confirm string so the function is *greppable* by auditors.

## Shape

```python
from atlaso import Memory
from atlaso.admin import (
    search_across_users,
    search_across_users_async,
    list_all_user_ids,
    search_unscoped,
    add_unscoped,
)

m = Memory()

hits = search_across_users(
    m,
    "leaked api key",
    confirm="I_UNDERSTAND_THIS_CROSSES_TENANTS",
    limit=100,
)
```

The `confirm` parameter is a `Literal["I_UNDERSTAND_THIS_CROSSES_TENANTS"]` — static checkers reject any other value. Auditors can grep for the string to find every call site that crossed tenants.

## Functions

- `search_across_users(memory, query, *, confirm, limit=100) -> list[Deposit]`
- `search_across_users_async(memory, query, *, confirm, limit=100)`
- `list_all_user_ids(memory, *, confirm) -> list[str]`
- `search_unscoped(memory, query, *, confirm, limit=100) -> list[Deposit]`
- `add_unscoped(memory, text, *, confirm) -> str`

## v0.1 status

The admin transport is not wired in v0.1. Every function raises `NotImplementedError("v0.1.0a0: admin transport pending")`. The contract above is design-locked — when v0.2 ships the transport, your call sites don't change.

## Why "import is a code-review event"

Tab-completing `m.` never offers an admin verb. The word `admin` appears in the import statement and the confirm string appears in every call. Any reviewer reading a diff can't miss it. Greppable by design.

---

<!-- atlaso:doc-trailer -->
**Source:** <https://www.atlaso.ai/docs/admin>  
**Edit on GitHub:** <https://github.com/imashishkh21/atlaso/tree/main/docs/admin.md>  
**Updated:** 2026-05-12
