# AgentSignup

> Claiming an account an AI agent made for itself: the claim link it hands a person (`noclick.com/claim/<token>`) names a token, which the signed-in person reads (`preview_claim`) and answers (`answer_claim`). Both are a signed-in person's own calls (a session), never a key.

## noclick.AgentSignup

```python
class AgentSignup
```

Claiming an account an AI agent made for itself.

### AgentSignup.preview_claim

```python
noclick.AgentSignup.preview_claim(token, *, client=None) -> dict[str, Any]
```

The claim page's view, for the signed-in person.

Parameters:

- `token` (`str`, required)
- `client` (`Client | None`, default `None`): The client to send with; defaults to the module client built from `NOCLICK_API_KEY`.

Returns: `dict[str, Any]` The agent and what it made, what waits for the claim (its spending included), and whether the signed-in
person may claim it.

Usage:

```python
claim = noclick.AgentSignup.preview_claim(token)
```

### AgentSignup.answer_claim

```python
noclick.AgentSignup.answer_claim(
    token, decision, *, accept_terms=None, key_access=None, client=None
) -> dict[str, Any]
```

Answer a claim: `"claim"` folds the agent's account and what it made into the signed-in person's (it
needs `accept_terms`: the person accepting NoClick's Terms for it), its key acting there as `key_access`
says (`full` by default, `build`, or `revoked`); `"decline"` ends the agent's account now.

Parameters:

- `token` (`str`, required)
- `decision` (`str`, required)
- `accept_terms` (`bool | None`, default `None`)
- `key_access` (`str | None`, default `None`)
- `client` (`Client | None`, default `None`): The client to send with; defaults to the module client built from `NOCLICK_API_KEY`.

Returns: `dict[str, Any]` The claim's view as it is then.

Usage:

```python
noclick.AgentSignup.answer_claim(token, "claim", accept_terms=True, key_access="build")
```
