# Element Generator

Source: https://docs.arcweave.com/project-tools/ai-features/element-generator
Section: Project Tools > AI tools
Description: How to generate elements using Arcweave's AI tools

The Element Generator creates a new element based on the context you provide in your prompt, in a way similar to the [Element Enhancer](https://docs.arcweave.com/project-tools/ai-features/element-enhancer). The difference is that it creates a new element, complete with a suggested title, content, and component mentions tailored to your project's needs.

Video: https://www.youtube.com/watch?v=x86KqQZuKJI

## Data collection

Context: Arcweave docs > Project Tools > AI tools > Element Generator > Data collection

The Element Generator gathers context from the following sources:

- Your prompt text (up to 200 characters)
- The current element's title and content.
- The elements immediately preceding the current in the flow.
- Components [mentioned](https://docs.arcweave.com/project-tools/mentions) in your prompt, and their [attributes](https://docs.arcweave.com/project-items/attributes).
- All of the above elements' components and their attributes. These components can be:
  - Attached to any of the elements.
  - Mentioned in any of the element's title or content.

This context is used as input for the AI, ensuring the generated result aligns with your project's structure and tone.

## Use the Element Generator

Context: Arcweave docs > Project Tools > AI tools > Element Generator > Use the Element Generator

The Element Generator follows the shared [AI access requirements](https://docs.arcweave.com/project-tools/ai-features/overview#access-requirements).

To generate an element using the Element Generator, follow the next steps:

1. Right-click on an element and choose **AI > "Generate element"** from the menu.
2. Type your prompt in the input field, to guide the generation process. You can do any of the following:

- Use the prompt box to guide the story in your desired direction.
- @-[mentioning](https://docs.arcweave.com/project-tools/mentions) components to include their attributes in the context.

3. Click **Generate**.

A new element will be generated, with its title and content written according to the context you provided. It will be automatically connected with the element you have selected.

> ℹ️ Each generated element costs **1 AI credit** from your workspace's monthly allowance. See [monthly AI credits by workspace plan](https://docs.arcweave.com/project-tools/ai-features/overview#monthly-ai-credits).
