๐ป Web Apps
Create Web Apps Provider (Playwright Assisted)โ
The HTTP provider generator enables you to capture real web requests by interacting directly with a browser, using Playwright under the hood. This is ideal for non-API-first applications where interaction flows through a frontend.
โ Prerequisitesโ
Make sure youโve installed the project with browser support:
poetry install --extras playwright
Then install Playwright browsers (only once):
poetry run playwright install
๐ How It Worksโ
- The tool launches a real browser session via Playwright.
- You browse the app (e.g.,
https://kissan.ai/chat
) and insert the placeholderFUZZ
where the dynamic prompt goes. - When done, close the browser.
- The tool captures the request, parses it, and builds a complete provider config.
๐งช Starting the Captureโ
python main.py providers generate http --url https://kissan.ai/chat
You'll be prompted to open the browser:
Do you want to open a browser and start capturing requests for https://kissan.ai/chat? [y/n]: y
Once the browser opens:
- Paste
FUZZ
into a relevant field (usually a prompt or input). - Submit the request.
- Close the browser when you're done.
๐ฆ Example Console Outputโ
โฏ python main.py providers generate http --url https://kissan.ai/chat
Do you want to open a browser and start capturing requests for https://kissan.ai/chat? [y/n]: y
โญโโโโโโโโโโโโโโโโโโโโโโ ๐งช Insert FUZZ and Close Browser โโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Please insert your FUZZ marker into the prompt or input field in the browser. โ
โ Once done, close the browser to generate provider configuration. โ
โฐโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ๏ธ Provider Builder โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Building provider configurations... โ
โ This step will analyze requests and convert them to reproducible providers. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Converting requests... โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% 0:00:00
โ
Successfully built 1 providers.
Configuration saved to http_providers.yml โ
๐งพ Sample Output File (http_providers.yml
)โ
providers:
- id: http
config:
max_retries: 3
validate_response: status == 200
transform_request: null
transform_response: json
example_response: '{"answer":"...","question":"FUZZ"}'
raw_request: |
POST /v1/inference/text/web HTTP/1.1
Host: {{ENV_HOST}}
Content-Type: multipart/form-data; boundary=...
...
------WebKitFormBoundary...
Content-Disposition: form-data; name="question"
{{prompt}}
...
use_https: true
environments:
- vars:
ENV_HOST: env.ENV_HOST
๐ก Tipsโ
- Always use
{{prompt}}
orFUZZ
to mark where dynamic input should be. - If there are dynamic hosts or headers, theyโll be extracted into
ENV
variables automatically. - Works best with
POST
forms, JSON APIs, and multi-part submissions.