# Loading the Program

Before utilizing the Anchor methods associated with the Squads program, you'll need to instantiate the program.  Ensure that you have properly setup an AnchorProvider, as well.

{% code overflow="wrap" %}

```
const provider = new AnchorProvider(connection, wallet);
// the squads-mpl program on both mainnet and devnet have the same address
const squadsProgram = await Program.at("SMPLecH534NA9acpos4G6x7uf3LWbCAwZQE9e8ZekMu", provider);
```

{% endcode %}


---

# 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://docs.squads.so/main/squads-legacy/development/anchor-idl/loading-the-program.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.
