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

# Prompting Replo

> How to ask Replo for what you want and get great results.

export const TryPromptButton = ({prompt, imageSrc, imageAlt = "Template preview", imageStyles = {}, buttonCta = "Build in Replo"}) => {
  const [isLoading, setIsLoading] = useState(false);
  const [error, setError] = useState(null);
  const API_BASE = "https://api.replo.app";
  const APP_URL = "https://dashboard.replo.app";
  const LoaderIcon = <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" style={{
    animation: "spin 1s linear infinite"
  }}>
      <path d="M21 12a9 9 0 1 1-6.219-8.56" />
    </svg>;
  const ChevronIcon = <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
      <path d="m9 18 6-6-6-6" />
    </svg>;
  async function postJSON(url, body, headers = {}, timeoutMs = 120000) {
    const controller = new AbortController();
    const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
    try {
      const response = await fetch(url, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          ...headers
        },
        body: JSON.stringify(body ?? ({})),
        signal: controller.signal
      });
      const responseText = await response.text();
      if (!response.ok) throw new Error(`API Error: ${response.status}`);
      return responseText ? JSON.parse(responseText) : {};
    } finally {
      clearTimeout(timeoutId);
    }
  }
  async function handleTryPrompt(event) {
    event.preventDefault();
    event.stopPropagation();
    setIsLoading(true);
    setError(null);
    try {
      const body = {
        prompt,
        file: null
      };
      const {seed} = await postJSON(`${API_BASE}/api/v1/marketing/issue-marketing-site-jwt`, body);
      if (!seed) throw new Error("No seed returned from API");
      const url = new URL(APP_URL);
      url.searchParams.set("type", "agent");
      url.hash = `seed=${encodeURIComponent(seed)}`;
      window.open(url.toString(), "_blank");
      setIsLoading(false);
    } catch (caughtError) {
      console.error("Failed to generate prompt:", caughtError);
      const message = caughtError instanceof Error ? caughtError.message : null;
      setError(message ?? "Something went wrong. Please try again.");
      setIsLoading(false);
    }
  }
  return <div style={{
    position: "relative",
    display: "inline-block",
    width: "100%"
  }}>
      {}
      {imageSrc && <img src={imageSrc} alt={imageAlt} style={{
    width: "100%",
    height: "auto",
    display: "block",
    borderRadius: "8px",
    opacity: 0.8,
    ...imageStyles
  }} />}

      {}
      <div style={imageSrc ? {
    position: "absolute",
    top: "50%",
    left: "50%",
    transform: "translate(-50%, -50%)",
    zIndex: 10
  } : {
    display: "flex",
    justifyContent: "flex-start",
    margin: "1.25rem 0"
  }}>
        <button type="button" className="try-replo-btn" onClick={handleTryPrompt} disabled={isLoading} style={{
    backgroundColor: "#274AE2",
    color: "#ffffff",
    padding: "0.5rem 1.1rem",
    fontSize: "0.875rem",
    fontWeight: 600,
    fontFamily: "inherit",
    border: "none",
    borderRadius: "9999px",
    cursor: isLoading ? "not-allowed" : "pointer",
    lineHeight: 1.4,
    whiteSpace: "nowrap",
    display: "inline-flex",
    alignItems: "center",
    justifyContent: "center",
    WebkitFontSmoothing: "antialiased",
    boxSizing: "border-box",
    opacity: isLoading ? 0.7 : 1,
    boxShadow: "0 1px 2px rgba(15, 23, 42, 0.08)",
    transition: "background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease"
  }}>
          <span style={{
    visibility: isLoading ? "hidden" : "visible",
    display: "inline-flex",
    alignItems: "center",
    gap: "0.375rem"
  }}>
            {buttonCta}
            {ChevronIcon}
          </span>
          {isLoading && <span style={{
    position: "absolute",
    display: "inline-flex",
    alignItems: "center",
    justifyContent: "center"
  }}>
              {LoaderIcon}
            </span>}
        </button>
      </div>

      {}
      <style>
        {`
          @keyframes spin {
            from {
              transform: rotate(0deg);
            }
            to {
              transform: rotate(360deg);
            }
          }
          .try-replo-btn:hover:not(:disabled) {
            background-color: #1f3ec0 !important;
            box-shadow: 0 4px 12px rgba(39, 74, 226, 0.35);
            transform: translateY(-1px);
          }
          .try-replo-btn:active:not(:disabled) {
            transform: translateY(0);
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
          }
          .try-replo-btn:focus-visible {
            outline: 2px solid #274AE2;
            outline-offset: 2px;
          }
        `}
      </style>

      {}
      {error && <div style={{
    marginTop: "12px",
    padding: "12px 16px",
    backgroundColor: "#fee",
    border: "1px solid #fcc",
    borderRadius: "6px",
    color: "#c33",
    fontSize: "14px",
    textAlign: "center"
  }} role="alert">
          {error}
        </div>}
    </div>;
};

Replo does what you ask, so the way you ask shapes what you get. This page covers the habits that produce the best results.

## Be specific

Tell Replo what you want, not just the goal. Name the sections, the layout, the colors, and the behavior. A vague prompt leaves Replo to guess, and a precise one gets you close on the first try.

<CardGroup cols={2}>
  <Card title="Be specific" icon="bullseye">Name the sections, layout, colors, and behavior you want.</Card>
  <Card title="Use references" icon="link">Paste URLs, images, or brand colors. Concrete references sharply improve output.</Card>
  <Card title="One thing at a time" icon="hand">Ask for one change per prompt for the most predictable results.</Card>
  <Card title="Iterate" icon="arrows-rotate">Start rough, then refine with follow-ups until it is right.</Card>
</CardGroup>

## Compare a weak prompt to a strong one

A weak prompt describes the goal and stops there:

```text theme={null}
Make me a store for candles.
```

A strong prompt describes the goal, the structure, and the style:

```text theme={null}
Build a site for hand-poured soy candles. Create a homepage with a hero, a 3-product grid, a reviews section, and a newsletter signup. Feature three scents with prices. Use a warm, minimal style with cream and charcoal tones.
```

<TryPromptButton prompt="Build a site for hand-poured soy candles. Create a homepage with a hero, a 3-product grid, a reviews section, and a newsletter signup. Feature three scents with prices. Use a warm, minimal style with cream and charcoal tones." />

The second prompt gives Replo enough to build something you can react to, instead of something you have to start over.

## Refine with follow-ups

After the first pass, change one thing at a time. Small, focused prompts are easier for Replo to get right and easier for you to review.

```text theme={null}
Make the hero darker and move the newsletter signup above the reviews.
```

## Use references

If you have a look in mind, show it. Paste a link to a site you like, drop in an image, or give Replo your brand colors. References anchor the result far better than adjectives.

## What to expect

Replo handles open-ended, multi-step requests, and it will tell you when it needs something from you, such as a connected integration or a missing detail. For larger requests it writes a [plan](/plans) first, so you can see its intended steps and redirect it before it commits to them. When a result is not what you wanted, say what is wrong and ask again. The fastest path to a great result is a short loop of clear prompts and quick corrections.

## Related

<CardGroup cols={2}>
  <Card title="Sessions & Mentions" icon="clock-rotate-left" href="/sessions-and-history">Attachments, mentions, and past conversations.</Card>
  <Card title="Plans" icon="list-check" href="/plans">See what Replo intends to do before it does it.</Card>
</CardGroup>
