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

> ## Agent Instructions
> Start with /introduction/getting-started. Use the Direct Query API (POST /query) with the Newton Fusion model (text, image, and video reasoning) or the Newton Omega encoder (time-series embeddings). ATAI_API_ENDPOINT must include the version path: /v0.5 for most APIs, /v0.6 for the Fine-Tuning Service. Pages whose descriptions are marked (Archived) document the legacy Lens runtime — do not use them for new projects.

# Manual Generation Agent

> Analyzes video recordings of a procedure and generates step-by-step work instructions, with a relevant image pulled for every step. Every step comes back as editable structured text, ready to refine and publish.

Generates a comprehensive, step-by-step Standard Operating Procedure from a video recording. The
output transforms the demonstrated process into an actionable manual that enables any user to
complete the task independently.

The generated SOP includes:

* Sequential step-by-step instructions with clear, concise language
* The time range in the source video during which each step takes place
* Descriptions of actions, expected outcomes, and important context
* Callouts for critical warnings, tips, prerequisites, or dependencies

## Use Cases

* **Generate work instructions and standard operating procedures (SOPs):** Extracts the
  procedure from a video into ordered steps, each with a title, a description, a timestamp, and
  a frame image, ready to edit and export.

* **Document maintenance and inspection procedures:** One recording of the procedure done
  correctly produces a draft manual, every step linked to the moment in the video it came from.

* **Create visual training and onboarding materials:** Every step comes with a visual reference,
  so the work can be followed and completed correctly.

## Configuration

For best results, use input videos whose duration is under five minutes.

<Note icon="gear">
  The default prompt for the Manual Generation Agent caps the number of steps generated to 10.
  If your video demonstrates more than 10 steps, provide a custom prompt that states a higher
  cap on the number of steps. For example:

  > Generate a concise, ordered list of every distinct step performed in this video, covering
  > the procedure from the first action to the last. Include brief steps and steps that are
  > repeated. Use up to 25 steps. Keep each step to at most 20 words. Use both what is shown and
  > what is said. Do not invent steps that are not shown or stated in the video.

  Note the inclusion of the instruction "Use up to 25 steps."
</Note>

## Output Artifacts

The output from a successful run of a Manual Generation agent is a JSONL file describing the
manual generated by the agent. The JSONL contains a `results` list; each entry in the list
describes one step of the procedure shown in the video.

Each step in the procedure contains the following properties:

| Property          | Description                                                |
| ----------------- | ---------------------------------------------------------- |
| `frame_start`     | The video frame number at which the described step begins. |
| `frame_end`       | The video frame number at which the described step ends.   |
| `instruction`     | The text of the instruction for the step.                  |
| `step`            | The step number (starting at 0).                           |
| `timestamp_start` | The timestamp at which the action begins in the video.     |
| `timestamp_end`   | The timestamp at which the action ends in the video.       |

## See an Interactive Example

Try out the Manual Generation agent with a predefined data set using our interactive example.

<Card title="Manual Generation: Mouse Assembly Agent" icon="screwdriver-wrench" href="https://agents-playground.archetypeai.workers.dev/?agent=mga">
  Generates a step-by-step manual from a recorded procedure. Watches the mouse assembly build
  and returns numbered steps with the time range each one spans.
</Card>

## Using the Archetype AI Python Client

How to use the [Archetype AI Python client](https://github.com/archetypeai/python-client/) to
work with the Manual Generation agent.

<Card title="Manual Generation Agent Example" icon="python" href="https://github.com/archetypeai/python-client/tree/main/examples/agents/agent_mga.py">
  An example that runs a Manual Generation agent on a procedure video using a canonical
  blueprint and a newly created bundle.
</Card>
