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

# Chat history: browse, find & manage past chats

> Browse your ModuleX chat history, reopen past conversations, find an old chat, and delete chats one at a time or in bulk — plus where folders and built-in search stand today.

export const MediaEmbed = ({id, type = 'screenshot', caption = '', ext, ratio = '16 / 9'}) => {
  const isVideo = type === 'video' || type === 'app_video';
  const resolvedExt = ext || (isVideo ? 'mp4' : type === 'screenshot' ? 'webp' : 'svg');
  const src = 'https://media.modulex.dev/' + id + '.' + resolvedExt;
  const [status, setStatus] = useState('loading');
  const [isDev, setIsDev] = useState(false);
  const [inView, setInView] = useState(false);
  const boxRef = useRef(null);
  useEffect(() => {
    if (typeof window === 'undefined') return;
    const h = window.location.hostname;
    setIsDev(h === 'localhost' || h === '127.0.0.1' || h.endsWith('.mintlify.app'));
  }, []);
  useEffect(() => {
    if (inView) return;
    if (typeof IntersectionObserver === 'undefined') {
      setInView(true);
      return;
    }
    const el = boxRef.current;
    if (!el) return;
    const io = new IntersectionObserver(entries => {
      if (entries.some(e => e.isIntersecting)) {
        setInView(true);
        io.disconnect();
      }
    }, {
      rootMargin: '300px'
    });
    io.observe(el);
    return () => io.disconnect();
  }, [inView]);
  if (status === 'missing') {
    if (!isDev) return null;
    return <div style={{
      display: 'flex',
      flexDirection: 'column',
      justifyContent: 'center',
      gap: '0.4rem',
      padding: '1rem 1.25rem',
      margin: '1.25rem 0',
      width: '100%',
      aspectRatio: ratio,
      boxSizing: 'border-box',
      border: '1px dashed rgba(128,128,128,0.45)',
      borderRadius: '0.75rem',
      background: 'rgba(128,128,128,0.06)',
      color: 'currentColor',
      fontSize: '0.85rem',
      lineHeight: 1.45
    }}>
        <div style={{
      display: 'flex',
      alignItems: 'center',
      gap: '0.5rem',
      opacity: 0.75
    }}>
          <span aria-hidden="true">🎬</span>
          <code style={{
      fontSize: '0.75rem'
    }}>{id}</code>
          <span style={{
      fontSize: '0.65rem',
      textTransform: 'uppercase',
      letterSpacing: '0.04em',
      padding: '0.1rem 0.4rem',
      borderRadius: '0.4rem',
      background: 'rgba(128,128,128,0.18)'
    }}>
            {type}
          </span>
        </div>
        <div style={{
      opacity: 0.9
    }}>{caption || 'Media not uploaded yet.'}</div>
        <div style={{
      fontSize: '0.7rem',
      opacity: 0.5
    }}>
          Upload to R2 as <code>{id}.{resolvedExt}</code> — preview only, hidden in production.
        </div>
      </div>;
  }
  const mediaStyle = {
    display: status === 'loaded' ? 'block' : 'none',
    width: '100%',
    height: 'auto',
    borderRadius: '0.75rem'
  };
  const media = isVideo ? <video src={inView ? src : undefined} autoPlay loop muted playsInline preload="metadata" onLoadedData={() => setStatus('loaded')} onError={() => setStatus('missing')} style={mediaStyle} /> : <img src={inView ? src : undefined} alt={caption} onLoad={() => setStatus('loaded')} onError={() => setStatus('missing')} style={mediaStyle} />;
  return <figure style={{
    margin: '1.25rem 0'
  }}>
      <div ref={boxRef} style={status === 'loaded' ? {
    width: '100%'
  } : {
    width: '100%',
    aspectRatio: ratio,
    borderRadius: '0.75rem',
    background: 'rgba(128,128,128,0.06)'
  }}>
        {media}
      </div>
      {status === 'loaded' && caption ? <figcaption style={{
    marginTop: '0.5rem',
    textAlign: 'center',
    fontSize: '0.85rem',
    opacity: 0.7
  }}>
          {caption}
        </figcaption> : null}
    </figure>;
};

Every chat you have with the [Assistant](/concepts/assistant) is kept for you in the chat sidebar, so you can pick up a conversation where you left off. This page shows you how to browse that history, reopen a past chat, find the one you want, and clean up the chats you no longer need.

<Note>
  **A quick note on the words used here.** A "chat" and a "conversation" mean the same thing: one thread of messages with the Assistant. Your chat history is the running list of those threads, newest activity first.
</Note>

<MediaEmbed id="MX-MEDIA-3370" type="screenshot" caption={"The chat sidebar showing the history list next to an open conversation."} />

## Where your history lives

Your chats live in the **Assistant panel** — the secondary sidebar that opens beside the chat view. The panel lists your conversations as a single, scrollable list, with the most recently active chat at the top.

<CardGroup cols={2}>
  <Card title="New chat" icon="plus">
    The `+` button at the top of the panel starts a fresh conversation. A new chat appears in the list as soon as you send its first message.
  </Card>

  <Card title="Your chats only" icon="user">
    The list shows the chats **you** created in the current [organization](/concepts/organizations-roles). Switch organizations and the list reloads to show that organization's chats.
  </Card>

  <Card title="Newest first" icon="arrow-up">
    Chats are ordered by their most recent activity, so a conversation you just replied to jumps back to the top.
  </Card>

  <Card title="Auto-named" icon="tag">
    Each chat is named automatically from your first message, so you can recognize it later without naming it yourself.
  </Card>
</CardGroup>

<Tip>
  Don't see the panel? Open a chat from the main navigation, then look for the **Assistant** panel on the left. You can pin it open so it stays visible as you work.
</Tip>

## Browse and reopen a chat

The history list is built for skimming. Each row tells you what the chat is about and when you last touched it.

<Steps>
  <Step title="Scan the list">
    Each row shows the chat's title and a relative date — `Today`, `Yesterday`, `3 days ago`, or a short date like `Mar 4` for older chats. A green dot on a row means that chat is still running a response right now.
  </Step>

  <Step title="Open a chat">
    Select a row to open that conversation in the main view. The full message history loads, including any tool steps the Assistant took and any question it is still waiting on you to answer.
  </Step>

  <Step title="Load older chats">
    The list loads your most recent chats first. If you have more, a **Show more** button appears at the bottom — select it to pull in the next batch of older conversations.
  </Step>
</Steps>

<AccordionGroup>
  <Accordion title="What the green dot means" icon="circle-dot">
    A pulsing green dot marks a chat where the Assistant is actively working on a reply. You can open it to watch the response stream in live, or keep working elsewhere and come back — the chat keeps running in the background. See [Chat overview](/platform/chat/overview) for how a live response streams in.
  </Accordion>

  <Accordion title="Why the order changes" icon="arrows-up-down">
    The list is sorted by most recent activity, not by when the chat was created. Sending a new message in an old conversation brings it back to the top, so your active threads stay close at hand.
  </Accordion>

  <Accordion title="Reopening a chat that was waiting on you" icon="hand">
    If the Assistant paused to ask you something — for approval before it runs a tool, or for a missing detail — that question reappears when you reopen the chat, so you can answer and let it continue. Learn more in [Run a workflow from chat](/platform/chat/workflow-run) and [Chat with your knowledge](/platform/chat/knowledge-chat).
  </Accordion>
</AccordionGroup>

## Find a past chat

Today, you find an older chat by **browsing**: open the Assistant panel, scan from the top (newest activity first), and select **Show more** to reach older conversations. Because each chat is auto-named from its first message, the titles make the right one easy to spot.

<Warning>
  ModuleX does not yet have a built-in search box for filtering your chat history by keyword. To locate an older chat, browse the list and use **Show more** to load more of it. This is tracked in [Known limitations](/reference/known-limitations).
</Warning>

<Card title="Tips for finding a chat faster" icon="magnifying-glass">
  * Start your conversations with a clear, specific first line — that line becomes the chat's title and the easiest thing to recognize later.
  * Recently active chats sit at the top, so a conversation you touched today is rarely far down.
  * If a chat belongs to a different [organization](/concepts/organizations-roles), switch to that organization first — the list only shows the current organization's chats.
</Card>

## A note on folders

ModuleX does **not** organize chats into folders. Your conversations live in one flat, time-ordered list rather than in named folders or groups.

<Note>
  Folders were part of an earlier chat experience that has since been replaced by today's [Assistant](/concepts/assistant) chat, which uses the single time-ordered history described above. There is no way to create a folder or move a chat into one in the current app. If folder-style organization matters to your team, let us know through [Getting help](/help/getting-help) — and check [Known limitations](/reference/known-limitations) for the current state.
</Note>

## Delete chats you no longer need

You can remove a single chat or clear out several at once. Deleting a chat removes it and its messages from your history.

### Delete one chat

<Steps>
  <Step title="Open the row menu">
    Hover over a chat row and select the **more actions** (`⋯`) button that appears on the right.
  </Step>

  <Step title="Choose Delete">
    Select **Delete**. A confirmation dialog asks you to confirm — deleting removes the conversation and its messages from your chats.
  </Step>

  <Step title="Confirm">
    Confirm in the dialog. If you delete the chat you currently have open, the app returns you to a fresh new-chat view.
  </Step>
</Steps>

### Delete several chats at once

<Steps>
  <Step title="Enter select mode">
    Select **Select** at the top of the panel. Each row gains a checkbox.
  </Step>

  <Step title="Pick the chats">
    Tick every chat you want to remove. A counter shows how many you've selected.
  </Step>

  <Step title="Delete the selection">
    Select **Delete**, then confirm. The chats are removed together, and the panel leaves select mode.
  </Step>
</Steps>

<Warning>
  Deleting a chat cannot be undone from the app. Make sure you have what you need from a conversation before you remove it.
</Warning>

## Who can use chat

The Assistant chat — and therefore your chat history — is available to organization **owners** and **admins**. If you can't see the chat surface, ask an owner or admin in your [organization](/concepts/organizations-roles) about your role.

<Note>
  ModuleX uses two organization roles: **owner** and **admin**. The older `member` role has been retired and is not a current role. See [Roles & permissions](/security/roles-permissions) for what each role can do.
</Note>

## Browse your chats from the API

The same history you see in the sidebar is available programmatically. The list is **user-scoped** to the calling key's user and the organization in the request, returns your chats **newest activity first**, and is **cursor-paginated** — each page hands back a cursor you pass in to fetch the next, older page.

Authenticate every request with your API key and the organization header, exactly as on every other ModuleX endpoint (see [Authentication](/api-reference/authentication)):

* `Authorization: Bearer mx_live_…`
* `X-Organization-ID: <your organization id>`

Two query parameters control paging:

| Parameter | Type    | Default  | Notes                                                                                                                                                                     |
| --------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit`   | integer | `20`     | Chats per page. Allowed range is `1`–`100`.                                                                                                                               |
| `cursor`  | string  | *(none)* | The `next_cursor` from the previous page — an ISO timestamp of that page's last chat. Omit it for the first page. A value that isn't a valid ISO timestamp returns `400`. |

A response returns the page of chats in `items` and a `next_cursor`. When `next_cursor` is `null`, you've reached the end of the list.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.modulex.dev/assistant/chats?limit=20 \
    -H "Authorization: Bearer mx_live_xxxxxxxxxxxxxxxxxxxx" \
    -H "X-Organization-ID: org_8sJk2bQz9Lm4"
  ```

  ```python Python theme={null}
  import os
  from modulex import Modulex

  client = Modulex(
      api_key=os.environ["MODULEX_API_KEY"],               # mx_live_…
      organization_id=os.environ["MODULEX_ORGANIZATION_ID"],  # org_…
  )

  # First page (newest activity first)
  page = await client.assistant.list(limit=20)
  for chat in page.items:
      print(chat.id, chat.title, chat.updated_at)

  # Fetch the next, older page when there is one
  if page.next_cursor:
      older = await client.assistant.list(limit=20, cursor=page.next_cursor)
  ```

  ```javascript JavaScript theme={null}
  import { Modulex } from "modulex-js";

  const client = new Modulex({
    apiKey: process.env.MODULEX_API_KEY,            // mx_live_…
    organizationId: process.env.MODULEX_ORG_ID,     // org_…
  });

  // First page (newest activity first)
  const page = await client.assistant.list({ limit: 20 });
  for (const chat of page.items) {
    console.log(chat.id, chat.title, chat.updated_at);
  }

  // Fetch the next, older page when there is one
  if (page.next_cursor) {
    const older = await client.assistant.list({ limit: 20, cursor: page.next_cursor });
  }
  ```
</CodeGroup>

Each item in `items` carries the same fields the sidebar shows:

| Field        | Meaning                                                                                                         |
| ------------ | --------------------------------------------------------------------------------------------------------------- |
| `id`         | The chat's identifier. Use it to open or delete the chat.                                                       |
| `title`      | The auto-generated title (derived from the first message).                                                      |
| `created_at` | When the chat was created (ISO timestamp).                                                                      |
| `updated_at` | When the chat was last active (ISO timestamp). The list is sorted by this, and it doubles as the paging cursor. |
| `is_running` | `true` when the Assistant is mid-response — the green dot in the sidebar.                                       |

<Note>
  Like every managed-usage surface, the Assistant chat endpoints sit behind the [usage gate](/billing/usage-gating): a request can be refused with a `402`, `403`, or `429` and a billing denial body when your plan's limits are reached. Listing chat history is a read and does not consume credits, but starting or resuming a chat does. See [Errors & status codes](/api-reference/errors) for the response shapes.
</Note>

## Keep going

<CardGroup cols={2}>
  <Card title="Chat overview" icon="messages" href="/platform/chat/overview">
    What you can do in a chat: ask the Assistant, run a workflow, and query your knowledge.
  </Card>

  <Card title="Private & org chat" icon="lock" href="/platform/chat/private-org-chat">
    How chats are scoped to you and your organization, and who can see them.
  </Card>

  <Card title="Run a workflow from chat" icon="play" href="/platform/chat/workflow-run">
    Trigger and watch a workflow run without leaving the conversation.
  </Card>

  <Card title="The ModuleX app" icon="grid-2" href="/platform/overview">
    A tour of chat, the builder, knowledge, and integrations.
  </Card>
</CardGroup>
