> ## 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.

# Power using ModuleX

> Go beyond the basics. Patterns, pro tips, and jump-off points that help you get more out of the ModuleX Assistant, AI Composer, workflows, integrations, and credits.

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>;
};

You already know how to run a workflow, chat with the [Assistant](/assistant/overview), and connect a tool. This section is about the next step: the patterns and habits that turn ModuleX from a thing you use into a thing you build with. None of it is required — it is the shortcut to doing more with less effort.

<Note>
  New to ModuleX? Start with [how ModuleX works](/concepts/overview) and [run your first workflow](/get-started/first-workflow) first. This section assumes you have built or run something at least once.
</Note>

## Who this is for

<CardGroup cols={3}>
  <Card title="Builders going deeper" icon="layers">
    You have shipped a workflow or two and want to combine features — the [Assistant](/assistant/overview), the [AI Composer](/concepts/ai-composer), [knowledge](/concepts/knowledge-rag), and [integrations](/integrations/overview) — into something repeatable.
  </Card>

  <Card title="Teams scaling up" icon="users">
    You run real work through ModuleX and want it to stay fast, predictable, and affordable as usage grows.
  </Card>

  <Card title="Tinkerers and explorers" icon="compass">
    You like to know what every feature does and how the pieces fit, so you can reach for the right one without guessing.
  </Card>
</CardGroup>

You do not need to be a developer to use this section. Where code helps, we show it — but every pattern works from the app too.

## How to use this section

Power using is three short reads, each answering a different question. Take them in any order.

<CardGroup cols={3}>
  <Card title="Feature map" icon="map" href="/power-using/feature-map">
    **"What can ModuleX do, and where do I find it?"** Every feature, what it is for, and the one page that explains it in depth. Use it as your index.
  </Card>

  <Card title="Recipes" icon="book-open" href="/power-using/recipes">
    **"How do I combine features to solve a real problem?"** Reusable patterns that mix the Assistant, Composer, workflows, knowledge, and tools — with links to the guides that walk each one.
  </Card>

  <Card title="Optimization" icon="gauge" href="/power-using/optimization">
    **"How do I make it faster, cheaper, and more reliable?"** Tune workflows and usage for speed, reliability, and [credits](/billing/credits). This one is the most technical of the three.
  </Card>
</CardGroup>

<MediaEmbed id="MX-MEDIA-4340" type="image" caption={"A simple three-panel signpost graphic for the Power using section: Feature map, Recipes, and Optimization, each with a one-line \"answers this question\" caption."} />

## Pro tips and patterns

A handful of habits pay off across almost everything you build in ModuleX.

### Pick the right surface for the job

ModuleX gives you three ways to get work done, and choosing well saves the most time of anything here.

<CardGroup cols={3}>
  <Card title="Prove it with the Assistant" icon="bot" href="/assistant/overview">
    Use the [Assistant](/assistant/overview) to do a task once, right now. It calls your connected tools step by step and answers in the chat — nothing to build first. Great for "is this even possible?"
  </Card>

  <Card title="Build it with Composer" icon="wand-sparkles" href="/concepts/ai-composer">
    When you will repeat the task, describe it to the [AI Composer](/concepts/ai-composer) and it lays out an editable [workflow graph](/concepts/workflows-and-runs) you can save, schedule, and run again.
  </Card>

  <Card title="Refine it on the canvas" icon="workflow" href="/workflow-builder/overview">
    Open the [workflow builder](/workflow-builder/overview) to fine-tune by hand: branching, loops, retries, and precise control over each node.
  </Card>
</CardGroup>

<Tip>
  The fastest path most people miss: **prove a task with the Assistant first, then rebuild the keeper as a workflow.** You learn which tools and steps you actually need before you commit to building anything.
</Tip>

### Let data flow between steps

Workflows get powerful when one step uses the output of an earlier step. ModuleX does this with references written as `{{node_id.field}}` — for example, pull a value produced by an LLM node into the prompt of the next node. You rarely type these by hand; the builder and the [AI Composer](/workflow-builder/composer) wire them for you. Understanding the idea, though, is what unlocks multi-step automations. See [variables and references](/workflow-builder/variables-and-references).

### Ground answers in your own knowledge

Both the [Assistant](/assistant/overview) and your workflows can answer from your own documents instead of guessing. Connect a [knowledge base](/concepts/knowledge-rag), and retrieval pulls the relevant context automatically at run time. This is the difference between a generic answer and one that knows your company's policies, products, or tickets.

### Reach for the 175 integrations

ModuleX ships with **175 integrations** exposing **600+ tools** — connectors to the services you already use, each with callable actions. Browse them in the [integration catalog](/integrations/catalog) and connect what you need in [authentication and credentials](/integrations/authentication). The same connected tools are available to the Assistant, the Composer, and your workflows, so you connect a service once and use it everywhere.

<Note>
  The integration registry is open and grows over time, so the live count can be higher than the figure above. Treat the [catalog](/integrations/catalog) as the source of truth for what is connectable today.
</Note>

### Keep humans in the loop on purpose

Agentic steps can pause to ask you a question or get approval before doing something sensitive — then carry on once you answer. Use this deliberately: let the [Assistant](/assistant/human-in-the-loop) or an [interrupt node](/workflow-builder/nodes/interrupt) check in at the risky moments, and run unattended everywhere else.

### Spend credits where they earn their keep

Managed usage in ModuleX is metered in [credits](/billing/credits). The two habits that keep costs predictable: choose the right model for each step (you do not need your most capable model everywhere), and watch where the [usage gate](/billing/usage-gating) would stop a run before it spends. If you bring your own provider keys, that usage is billed directly by the provider with no ModuleX markup. The [optimization](/power-using/optimization) page goes deep on this.

<Tip>
  Reuse beats rebuild. A saved [workflow](/concepts/workflows-and-runs) you can [schedule](/workflow-builder/execution/schedule) or trigger from an API costs you nothing to set up twice — so turn any task you do more than once into a workflow.
</Tip>

## Drive ModuleX from your own code

Everything in the app is also available over the API and the official [SDKs](/sdks/overview), so you can fold ModuleX into your own tools and scripts. Every request authenticates the same way: an `Authorization: Bearer mx_live_…` header plus your `X-Organization-ID`. Here is the shape of a run, three ways.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.modulex.dev/workflows/wf_your_workflow_id/run \
    -H "Authorization: Bearer mx_live_your_api_key" \
    -H "X-Organization-ID: org_your_organization_id" \
    -H "Content-Type: application/json" \
    -d '{
      "input": { "topic": "quarterly board update" }
    }'
  ```

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

  client = Modulex(
      api_key="mx_live_your_api_key",
      organization_id="org_your_organization_id",
  )

  run = client.executions.run(
      workflow_id="wf_your_workflow_id",
      input={"topic": "quarterly board update"},
  )
  print(run.run_id)
  ```

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

  const client = new Modulex({
    apiKey: "mx_live_your_api_key",
    organizationId: "org_your_organization_id",
  });

  const run = await client.executions.run({
    workflowId: "wf_your_workflow_id",
    input: { topic: "quarterly board update" },
  });
  console.log(run.runId);
  ```
</CodeGroup>

For the full walkthrough — authenticate, run, and stream the result — follow [run a workflow](/guides/run-a-workflow). For the complete request lifecycle and headers, see [authentication](/api-reference/authentication).

## Good to know before you go deep

<AccordionGroup>
  <Accordion title="Who on your team can do what">
    Some surfaces are restricted by role. As built today, the [Assistant](/assistant/overview) and the [AI Composer](/concepts/ai-composer) require the **owner** or **admin** role in the [organization](/concepts/organizations-roles); the older `member` role has been retired and is not a current role. If a teammate hits a permission error, check their role first. See [roles and permissions](/security/roles-permissions).
  </Accordion>

  <Accordion title="Runs are metered, and the gate fails closed">
    Managed runs, Assistant turns, Composer edits, and managed knowledge calls all pass through a billing gate before they spend anything. If your plan allowance is exhausted and overage is off, the call is declined up front with a clear message rather than running and surprising you later. Read [credits and the billing model](/concepts/credits-billing) and [usage gating and limits](/billing/usage-gating).
  </Accordion>

  <Accordion title="Not everything is shipped yet">
    A few app paths are known to be incomplete or unavailable today. Before you build a pattern around a feature, it is worth a glance at [known limitations](/reference/known-limitations) so you are not designing around something that is not ready.
  </Accordion>

  <Accordion title="When a word is unfamiliar">
    ModuleX has a precise vocabulary — runs, turns, nodes, credits, knowledge bases, and more. The [glossary](/reference/glossary) is the single source of truth for what each term means.
  </Accordion>
</AccordionGroup>

## Where to go next

<CardGroup cols={2}>
  <Card title="Feature map" icon="map" href="/power-using/feature-map">
    The index of everything ModuleX can do and where each feature is documented in depth.
  </Card>

  <Card title="Recipes" icon="book-open" href="/power-using/recipes">
    Reusable patterns that combine features to solve real problems, with links to the guides.
  </Card>

  <Card title="Optimization" icon="gauge" href="/power-using/optimization">
    Tune workflows and usage for speed, reliability, and cost.
  </Card>

  <Card title="Assistant examples" icon="sparkles" href="/assistant/examples">
    Worked, end-to-end examples of common Assistant tasks to copy and adapt.
  </Card>
</CardGroup>
