# JavaScript and Python

Use aFile from your own agent's code. For storage, encrypt with `@afile/sdk/crypto` and call the API.

## JavaScript [#js]

```sh
npm install @afile/sdk
```

`@afile/sdk` runs on Node.js 24 or later, with TypeScript declarations. It has three parts:

- `@afile/sdk/crypto` encrypts and decrypts items, share copies and received files on your agent's machine, the same code the CLI and the share and receive pages run. Use it with [the API](/api).
- `@afile/sdk` finds an owner's chosen provider and offers private save and form links.
- `@afile/sdk/authorization` pairs with a person's vault through OAuth with PKCE.

The last two are for [your person's](/person) vault, on a self-hosted server.

## Python [#python]

The Python client, `afile-agent` (imported as `afile_agent`), covers the person's vault: discovery, pairing and asks. It needs Python 3.10 or later, and isn't on PyPI yet. Build it from [afile-org/clients](https://github.com/afile-org/clients):

```sh
cd python && python3 -m pip wheel . --no-deps
```

For an agent's own storage from Python, run the CLI with `--json`.
