# Webflow Page Client for LLM Agents - Essential Guide

API documentation is available at [Webflow Developers Portal](https://developers.webflow.com/designer/reference/introduction)

## Creating the client
You will need to have Site Token/OAuth token (should be created by the user manually), `siteId` and `pageId` for the pages you will need to update
```ts
import {PageClient} from '@webflow/page-client';

const client = new PageClient({
  token: WEBFLOW_TOKEN,
  siteId: WEBFLOW_SITE_ID,
  pageId: WEBFLOW_PAGE_ID,
  verboseLogging: true,
});
```

## Creating VS Updating
On a first run you will need to create elements on the page but on subsequent runs you will need to find and update previously created elements
Prepare for this by giving a meaningful and predictable IDs to elements and styles
Each ID for element or style should be unique

## Managing other than a page data
PageClient should only be used for working with a page elements. Other libraries like [Data API](https://developers.webflow.com/data/v2.0.0/reference/rest-introduction) should be used to iterate through the sites/pages, managing page assets, updating CMS data.

## Tips
Form elements (`FormTextInput` for example) must be nested inside of the `FormForm` wrapper

Shorthand CSS properties are not supported - use full syntax.

Do not use media queries in CSS. Instead read about [available breakpoints](https://help.webflow.com/hc/en-us/articles/33961300305811-Breakpoints-overview#h_01K6GFTB1ED4E31RS53S096AYQ). To use a breakpoint write:
```ts
style.setProperties({
  'font-size': '32px',
}, { breakpoint: 'small' });
```
