Skip to content

Instantly share code, notes, and snippets.

@charl-kruger
Created August 19, 2025 18:32
Show Gist options
  • Select an option

  • Save charl-kruger/ec1d837c657eecac5165d3d1b4d717fc to your computer and use it in GitHub Desktop.

Select an option

Save charl-kruger/ec1d837c657eecac5165d3d1b4d717fc to your computer and use it in GitHub Desktop.
ok now that you fully understand how cloudflare agnets work, we want to update our agent to recieve a image via whatsapp (have a look at │
│ '/Users/charl.kruger/gpt5/fashn-hackathon/packages/fashn-whatsapp-agent' as a refrence of how to do the whatsapp webhook and recieve │
│ images), then we can ask the user what they want to do with it via ai.\ │
│ \ │
│ the tree use cases are:\ │
│ \ │
│ store the image as a profile pic, we will store this in cloudflare r2 and use this image if the user wants to do a model swap using the │
│ fashn FASHN Virtual Try-On v1.6 https://docs.fashn.ai/api-reference/tryon-v1-6\ │
│ \ │
│ create a model variation, Model Variation enables you to create new variations of existing fashion model images. Transform your images with │
│ subtle adjustments or strong modifications while maintaining the core composition. https://docs.fashn.ai/api-reference/model-variation\ │
│ \ │
│ Background Change, Background Change enables you to replace image backgrounds while preserving foreground subjects. The endpoint accurately │
│ separates the foreground from the background and applies harmonization so the subject blends seamlessly into the new environment. │
│ https://docs.fashn.ai/api-reference/background-change\ │
│ \ │
│ so we will need to support these capabilities.\ │
│ \ │
│ deeply analyse the fashn api here https://docs.fashn.ai/api-overview/api-fundamentals\ │
│ \ │
│ Whats important is while we await the response from fashn, we need to poll their api. this is where cloudflare agents Schedule tasks │
│ comes into play.\ │
│ \ │
│ create a detailed plan on how we will build this cloudflare angent that will allow a user to use whatsapp and acomplish the 3 things.\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment