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

# Explore the example world

> Explore the Worldsmith workspace, follow recorded activity, and inspect tasks and scorers.

export const productExplorerAsset = "/assets/worldsmith-explorer-75f0f564ed6e.json";

export const ProductExplorer = ({source, variant = "world"}) => {
  const timeline = variant === "timeline";
  const [html, setHtml] = useState(null);
  const [loading, setLoading] = useState(false);
  const [error, setError] = useState(null);
  const [height, setHeight] = useState(840);
  const frame = useRef(null);
  const request = useRef(null);
  const initialized = useRef(false);
  const sendContext = useCallback(() => {
    const target = frame.current?.contentWindow;
    if (!target) return;
    target.postMessage({
      type: "chronicle-demo-theme",
      dark: document.documentElement.classList.contains("dark")
    }, "*");
    if (!timeline) {
      const views = {
        "#company": "overview",
        "#overview": "overview",
        "#timeline": "timeline",
        "#twins": "twins",
        "#connected-records": "twins",
        "#tasks": "tasks",
        "#agent-task": "task",
        "#scores": "scores"
      };
      target.postMessage({
        type: "chronicle-demo-view",
        view: views[window.location.hash] || "overview"
      }, "*");
    }
  }, [timeline]);
  const open = async () => {
    if (loading) return;
    setLoading(true);
    setError(null);
    const controller = new AbortController();
    request.current = controller;
    try {
      const response = await fetch(source, {
        signal: controller.signal
      });
      if (!response.ok) throw new Error("The example could not be loaded. Try again.");
      const content = await response.json();
      if (!content || typeof content !== "object" || Array.isArray(content) || typeof content.html !== "string" || !content.html.startsWith("<!doctype html>")) throw new Error("The example could not be loaded. Try again.");
      if (!controller.signal.aborted) setHtml(content.html);
    } catch (reason) {
      if (!controller.signal.aborted) setError(reason.message || "The example could not be loaded. Try again.");
    } finally {
      if (!controller.signal.aborted) setLoading(false);
    }
  };
  useEffect(() => () => request.current?.abort(), []);
  useEffect(() => {
    if (!html) return;
    const updateTheme = () => frame.current?.contentWindow?.postMessage({
      type: "chronicle-demo-theme",
      dark: document.documentElement.classList.contains("dark")
    }, "*");
    const resize = event => {
      if (event.source !== frame.current?.contentWindow) return;
      if (event.data?.type === "chronicle-demo-ready") {
        sendContext();
        return;
      }
      if (timeline && event.data?.type === "chronicle-demo-open-world" && event.data.view === "twins") {
        window.location.assign("/product-explorer#twins");
        return;
      }
      if (event.data?.type !== "chronicle-demo-size") return;
      if (Number.isFinite(event.data.height)) setHeight(Math.min(2400, Math.max(400, event.data.height + 2)));
      if (!initialized.current && event.data.height > 200) {
        initialized.current = true;
        sendContext();
      }
    };
    window.addEventListener("message", resize);
    window.addEventListener("hashchange", sendContext);
    const observer = new MutationObserver(updateTheme);
    observer.observe(document.documentElement, {
      attributes: true,
      attributeFilter: ["class"]
    });
    frame.current?.focus();
    return () => {
      window.removeEventListener("message", resize);
      window.removeEventListener("hashchange", sendContext);
      observer.disconnect();
    };
  }, [html, sendContext, timeline]);
  return <div className="chronicle-product-explorer not-prose">
      {!timeline ? <>
      <span id="company" className="chronicle-explorer-anchor" />
      <span id="overview" className="chronicle-explorer-anchor" />
      <span id="timeline" className="chronicle-explorer-anchor" />
      <span id="twins" className="chronicle-explorer-anchor" />
      <span id="tasks" className="chronicle-explorer-anchor" />
      <span id="connected-records" className="chronicle-explorer-anchor" />
      <span id="agent-task" className="chronicle-explorer-anchor" />
      <span id="scores" className="chronicle-explorer-anchor" />
      </> : null}
      {html ? <iframe ref={frame} title={timeline ? "Interactive Timeline: recorded requests and state changes" : "Worldsmith interactive example: overview, timeline, twins, and tasks"} srcDoc={html} sandbox="allow-scripts" style={{
    height
  }} onLoad={sendContext} /> : <div className="chronicle-explorer-start">
          <p className="chronicle-explorer-eyebrow">{timeline ? "EXPLORE THE TIMELINE" : "EXPLORE WORLDSMITH"}</p>
          <h3>{timeline ? "Follow a request to its changes." : "Explore a simulated system."}</h3>
          <p>{timeline ? "Filter recorded events, inspect a request, and compare the record before and after." : "Open the Worldsmith workspace, inspect recorded activity, and explore twins, tasks, and scorers."}</p>
          <button type="button" onClick={open} disabled={loading}>{loading ? "Loading example…" : error ? "Retry loading example" : timeline ? "Open interactive Timeline" : "Open interactive example"} <span aria-hidden="true">↗</span></button>
          <p className="chronicle-explorer-note" role="status">{loading ? "Loading the product views." : timeline ? "Recorded local activity. No sign-in required." : "Built-in example data. No sign-in required."}</p>
          {error ? <p role="alert">{error}</p> : null}
        </div>}
    </div>;
};

Explore a company's invoice workflow in the Worldsmith workspace. Open its
records, follow a recorded request through the Timeline, and inspect the tasks
and scorers that define success.

<ProductExplorer source={productExplorerAsset} />

1. **Overview:** inspect the organization, people, and scenario background.
2. **Timeline:** open the Linear update request, then its state change to see
   what changed on **ENG-2**.
3. **Twins:** expand **Linear → Issues → ENG-2**, then explore the related
   Salesforce, SAP, and Slack records.
4. **Tasks:** choose a task, read its instructions, and open an attached scorer
   to inspect its code. Local edits can be undone with **Reset example**.

The Timeline contains recorded requests from a local example world, not an agent
evaluation. Edits stay in this preview; launching, generation, and scorer
execution require the product. The separate score examples use illustrative values.
To create and run your own world, follow the
[Worldsmith quickstart](/worldsmith/quickstart).
