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

# Why [code]smith

> You handed the task to an agent. Why does it stop when you close your laptop?

export const TryInCodesmith = ({prompt, label, result, linkHref, linkText}) => {
  const href = `https://app.blacksmith.sh/sessions/new?prompt=${encodeURIComponent(prompt)}&entry=docs`;
  return <div className="try-codesmith not-prose">
      {label && <span className="try-codesmith-label">{label}</span>}
      <p>{prompt}</p>
      {result && <p className="try-codesmith-result">
          <span>You get back:</span> {result}
        </p>}
      <div className="try-codesmith-actions">
        {linkHref && <a className="try-codesmith-link" href={linkHref}>
            {linkText} →
          </a>}
        <a className="try-codesmith-button" href={href} target="_blank" rel="noopener noreferrer">
          <span>Try it in [code]smith</span>
          <span aria-hidden="true">→</span>
        </a>
      </div>
    </div>;
};

export const ProductEmbed = ({story, title, width, height}) => {
  const productionOrigin = "https://docs-embeds.blacksmith.sh";
  const knownOrigin = () => {
    if (typeof window === "undefined") return undefined;
    if (!(/^localhost$|\.mintlify\.(app|site)$/).test(window.location.hostname)) return productionOrigin;
    return window.__blacksmithEmbedOrigin;
  };
  const designWidth = width || 960;
  const designHeight = height || 600;
  const frameRef = useRef(null);
  const [embedOrigin, setEmbedOrigin] = useState(knownOrigin);
  const [ready, setReady] = useState(false);
  const [live, setLive] = useState(false);
  const [requested, setRequested] = useState(false);
  useEffect(() => {
    const frame = frameRef.current;
    const box = frame && frame.parentElement;
    if (requested || !box) return undefined;
    const request = () => setRequested(true);
    const observer = new IntersectionObserver(entries => {
      if (entries.some(entry => entry.isIntersecting)) request();
    }, {
      rootMargin: "100px 0px"
    });
    observer.observe(box);
    frame.addEventListener("blacksmith-embed-load", request);
    return () => {
      observer.disconnect();
      frame.removeEventListener("blacksmith-embed-load", request);
    };
  }, [embedOrigin, requested]);
  useEffect(() => {
    if (embedOrigin) return undefined;
    const resolve = () => setEmbedOrigin(knownOrigin() || productionOrigin);
    if (knownOrigin()) return resolve();
    window.addEventListener("blacksmith-embed-origin", resolve);
    const timer = setTimeout(resolve, 5000);
    return () => {
      window.removeEventListener("blacksmith-embed-origin", resolve);
      clearTimeout(timer);
    };
  }, [embedOrigin]);
  useEffect(() => {
    const frame = frameRef.current;
    const box = frame && frame.parentElement;
    if (!box) return undefined;
    const fit = () => {
      frame.style.transform = `scale(${box.clientWidth / designWidth})`;
    };
    fit();
    const observer = new ResizeObserver(fit);
    observer.observe(box);
    return () => observer.disconnect();
  }, [designWidth, embedOrigin]);
  useEffect(() => {
    const onMessage = event => {
      if (event.origin !== embedOrigin) return;
      if (!frameRef.current || event.source !== frameRef.current.contentWindow) return;
      if (event.data && event.data.source === "blacksmith-docs-embed" && event.data.type === "ready") {
        setReady(true);
        if (!event.data.snapshot) setLive(true);
      }
    };
    window.addEventListener("message", onMessage);
    return () => window.removeEventListener("message", onMessage);
  }, [embedOrigin]);
  if (!embedOrigin) return null;
  return <iframe ref={frameRef} className={ready ? "is-ready" : undefined} data-embed-live={live ? "" : undefined} src={requested ? `${embedOrigin}/embeds/${story}` : undefined} data-embed-story={story} width={designWidth} height={designHeight} title={title} onLoad={event => {
    if (event.currentTarget.getAttribute("src")) event.currentTarget.setAttribute("data-loaded", "");
  }} tabIndex={-1} />;
};

<div className="home-landing why-page">
  <div className="home-landing-inner">
    <h1 className="home-title">You handed the task to an agent. <br className="why-title-break" />Why does it stop when you close your laptop?</h1>
    <p className="home-lead">We think cloud agents will build most of the world's software. That only works if handing one a task feels like handing it to a teammate: describe it, walk away, and come back to a pull request with evidence.</p>

    <div className="home-actions">
      <a className="home-primary" href="https://app.blacksmith.sh/sessions/new?entry=docs" target="_blank" rel="noopener noreferrer"><span>Start a session</span><span aria-hidden="true">→</span></a>
    </div>

    <section className="why-section" id="trust">
      <h2 className="why-title">Writing code is cheap, but trusting it is not.</h2>
      <p className="why-body">A frontier model can write most of the changes you would ask for. The cost shows up afterwards, in an engineer's attention.</p>
      <p className="why-body">Someone still has to watch the terminal, rerun the tests, open the page and click through it before anyone can say the change works. That attention is the scarce resource now, and a good agent should need less of it.</p>
    </section>

    <section className="why-section" id="machine">
      <h2 className="why-title">Agents need their own machine.</h2>
      <p className="why-body">Real work means starting the app, running tests and driving a browser, often for several tasks at once. A laptop is a poor host for that. It sleeps when you close it, and two agents sharing one checkout get in each other's way.</p>
      <p className="why-body">Every \[code]smith task runs on its own cloud machine with your repository checked out, common languages and tools installed, and a browser for screenshots and recordings. You can run several tasks at once, and none of them use your laptop.</p>
      <p className="why-body">Your CI already knows how to install your dependencies, start your services and run your tests, so \[code]smith checks its work there. It pushes to the pull request, waits for your GitHub Actions jobs, reads the logs when one fails, and pushes fixes until the checks pass. When those jobs run on Blacksmith, it pulls a job's logs and resource usage directly.</p>
      <p className="why-body">Coming soon: \[code]smith will build each task's machine from your CI setup, so your dependencies, services and caches are ready before it runs its first command.</p>
    </section>

    <section className="why-section" id="evidence">
      <h2 className="why-title">Claims need evidence.</h2>
      <p className="why-body">A passing test suite says little about whether a page looks right or an animation got smoother. For that you need to see the change: screenshots of the page, a recording of the interaction, before and after numbers for a performance fix.</p>
      <p className="why-body">\[code]smith puts that evidence in the pull request. It can run Proof, a separate session that exercises the change and posts its screenshots and recordings to the PR, next to the diff. Evidence is what lets you trust work you didn't watch.</p>
    </section>

    <section className="why-section" id="outlives">
      <h2 className="why-title">Work shouldn't stop when you do.</h2>
      <p className="why-body">Plenty of tasks stall on something slow, like a CI run or a week of data. \[code]smith does the waiting. It checks back on CI, pushes fixes when a reviewer comments, and can schedule itself to pick the work up hours or days later.</p>
      <p className="why-body">When you come back, you find a pull request that is ready for review, with its CI results and evidence attached.</p>

      <div className="product-embed not-prose">
        <div className="product-embed-window">
          <div className="product-embed-screen" style={{ backgroundImage: "url(data:image/webp;base64,UklGRhIJAABXRUJQVlA4IAYJAAAQPACdASpAAcgAPtFmrVCoJaS1JNNJyqAaCWlu4W8hG/N55MWGypQW3Jrk08kr0v2AOJn/Eb8kKSAh3HHnfMJ4DUAK5VIx2xuqe0LFA0z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pSWmn0QR34L4n0Qq8ZCLrdkzsB3lbBNEskJEkiC7ikXMRAMQo6rlLjY4dWmTSRisXgGTT7+pAeDpC20WBQOyNc5ZWso1CmDAqcT2ONfKpmS4Uj1g4YkkVufseKN5cLnAVTwSidywULV9gtDNeFq3ymsxVbi93/PFdvdPhZ3bntl7NBl3cfFMRocn1BpxhlsGYiulK86oY8Gx4I/Rml/Nua9E2J2cc0R8Ky03WE+UPeVnZMKWtJ9jAj85/RFJgEaAiMbw8Z3GiVt1kbw7eQlnb7XH7Xcka4MJN9/iqFL6qKynnHgM4F+ROxlT16AyJBE5p+E5DH2gSynRc/g2/aatHHTGHlC1c/g4xyijajrPR2KoR7ADnOcvCHE1CVyKVSCAuwVjpQAANMLfS2KwYqHGTsm3Lce/6K/SyUv3zCuQ2udePaTtSSUFnEFVqFMqjAQVxR+A5uSC86NQiOtZWWA3JbOe0WaE6EO2WaYnPG1n3pGtNwWRVuXW37cUa80xYRoPWoDTkMRuUVENWB3HZGTj5nwoi2kw1CvlO6GE+UtELwC5Zdd22UwtA17HgldQkCZa3a3E6nOIOy/OQOjVfw+SpB5xToxUWqYH67PTpW6ILYGK/widgTHjUzoQF3XVjhIzMXWOB3iZ6+s5ogP9DSRBIF6Odp9RwxpbawIHyLHxkQkTZuugd4BK/Z0y0o0f6XY47hshwz5nVBFh57LMnvQry+ED5XxxNcvCwnmrFAxPRBUKYUfWzAJLf+gZQmI29ftiYHQtFQ3C7i3CnipuOBPOxQeObe+7mrkFI9eES3vTng0AAAA=)" }}>
            <img className="product-embed-poster" src="https://mintcdn.com/blacksmith/Itk-j1vuc5ra3oOQ/images/embeds/codesmith-outlives.png?fit=max&auto=format&n=Itk-j1vuc5ra3oOQ&q=85&s=c532cbe4ddffa8245500f0862ba4f5f1" alt="Work that outlives the conversation" noZoom width="1920" height="1200" data-path="images/embeds/codesmith-outlives.png" />

            <ProductEmbed story="docs-embeds-web-ui--outlives-the-conversation" title="Work that outlives the conversation" />
          </div>
        </div>
      </div>

      <TryInCodesmith prompt="When the new cache has a week of hit-rate data, compare it to the old one. If it's faster, open a PR to switch and ask me to review." />
    </section>

    <p className="why-next"><a href="/codesmith/examples">See what it can do →</a><a href="/codesmith/get-started">Get started →</a></p>
  </div>
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.