> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nfig.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Samples

> Learn how to start building your intelligent automation using our sample scripts

#### Example -

<CodeGroup>
  ```javascript javascript theme={null}
  import { NfigClient } from "nfig-sdk";

  (async () => {
  const nfig = new NfigClient({
    apiKey: "API_KEY"
  })
  const session = await nfig.createSession();
    try {

      await nfig.act('go to amazon.com');
   
      await nfig.act('click on search input box');
    
      await nfig.act('type iPhone 16 Pro in search box');

      await nfig.act('Press enter');

      await nfig.endSession();

    } catch (error) {
      console.error('An error occurred:', error);
    }
  })();
  ```
</CodeGroup>

<br />
