Make a manga with Codex

A two-page manga in English and ten more languages, or a right-to-left manga in Japanese, Korean and Chinese. Codex, an AI agent from OpenAI, plans the pages with you, draws the art and builds the pages in MangaLoft. You approve the plan and the characters, check the pages, and export.

What you'll make

Page 2 of the right-to-left sample in Japanese, read from the top right: Pip's spell loosens the sword, Rowan shouts as the sword lands in Pip's hands with concentration lines behind them, and Pip asks him to carry it; the lettering is vertical The same page in Korean, with the same art and balloons and vertical Korean lettering
The same page in Japanese and Korean, made with the right-to-left kit. The art and balloons are shared; each language has its own lettering.

Read the left-to-right sample: The Legendary Sword → Both pages, with a menu to switch between nine languages. This is exactly what MangaLoft's HTML (ZIP) export made from the pages Codex built with the earlier kit, after we asked Codex to move Rowan's shout balloon. Unzip the same export onto your own website to publish your manga.

Before you start

1. Turn on AI agents in MangaLoft

First, close any manuscript you don't want an agent to see. While the switch is on, any program on this Mac can read and edit every open document, including ones you open later. Shared collaboration documents are never open to agents.

Choose MangaLoft ▸ Settings, then in AI Agents turn on Allow AI agents to connect. The first time, MangaLoft explains what an agent can see; choose Allow Connections. It then shows the address agents connect to, usually 127.0.0.1:47615.

MangaLoft Settings, AI Agents: Allow AI agents to connect is on, Listening on 127.0.0.1:47615, with Copy Connection Settings, Disconnect All Agents and Show Agent Copies

The switch is off each time MangaLoft starts, so turn it on again whenever you work with Codex, and off when you finish. Connect an AI agent explains what an agent can and can't do, and how to keep one document out.

2. Add MangaLoft to Codex

You usually do this once. In MangaLoft's Settings, choose Copy Connection Settings: it copies the address to use. It is usually this one; if another program already uses that port, MangaLoft picks another, and the copied settings show it.

http://127.0.0.1:47615/mcp

In Codex, open Settings ▸ Plugins, then MCPs, and choose Add. Add a server named mangaloft, of the Streamable HTTP kind, with the http://…/mcp address from the copied settings, and follow Codex's prompts (it may ask to restart). Or, if you have Codex in Terminal, run this, with your copied address if it differs:

codex mcp add mangaloft --url http://127.0.0.1:47615/mcp

mangaloft then shows in the list of servers, switched on. To test it, start a new task in Codex and ask "Can you connect to MangaLoft and list its open documents?" An empty list is fine.

Codex Settings, Plugins, MCPs: the servers list with mangaloft switched on

3. Get a starter kit

There are two kits. Choose the one for the way your readers read:

Panel order, balloon order and the page turn follow the reading direction, so a story is planned and drawn for one of them. Pick one per manga.

Open the ZIP. You get a folder, manga-starter or manga-starter-rtl, your kit folder; move it where you keep your work, for example Documents. It holds plain text files that Codex reads, and two folders it fills:

Both kits hold the same sample story, The Legendary Sword: Rowan, a knight, and Pip, an apprentice mage, in a sword-and-magic world. Make it once as it is, then make your own (see the end of this page).

4. Ask Codex to start

In Codex, start a new task in your kit folder and type:

Read AGENTS.md and make episode 1

Codex reads the kit and MangaLoft's own guide, then the story. If the story files are empty, it interviews you about your story first. If something is missing or unclear, it asks; answer it, and it goes on.

Depending on Codex's permission setting, it may ask before an action that needs more access. If it asks, read what it wants to do before you approve: creating the document folder and converting panel images in your kit folder are part of this tutorial. While it waits for your answer, it doesn't go on, so check back during the run. We switched to a setting that asks less for the long drawing part; see OpenAI's pages on permissions before you change it.

If image generation isn't available on your plan, or you reach a limit, Codex tells you. Keep the document. When you're ready, open it in MangaLoft, then tell Codex to resume episode 1, with the full path of manga-ep-01.mangaloft and where it stopped.

5. Approve the panel plan

Before it draws anything, Codex shows you a plan for each page: the panels in reading order, what we see in each, who speaks and their line, and the kind of balloon. It may suggest an effect for a panel, at most one, from TONES.md: a sky gradation, concentration lines, speed lines, or a Shock background. It also lists the objects that appear in more than one panel, which get design sheets. Anything it made up is marked "proposed".

Codex shows the panel plan for both pages in right-to-left reading order: for each panel what we see, the speaker, balloon kind and Japanese line, and a proposed sky gradation and concentration lines; below, the design sheets it will make for Rowan, Pip, the sword, the mossy stone and Pip's staff

Change what you like, for example "No effect on page 1, panel 2" or "Keep the speed lines clear of Pip's face," then approve:

Plan approved. Go ahead.

Codex writes the approved plan into story/. Only the effects you approved are added later.

After you approve, Codex makes the document itself: manga-ep-01.mangaloft appears in your kit folder and opens in MangaLoft, with the kit's reading direction, paper, original language and translation languages, and the right number of pages. MangaLoft shows a banner saying an AI agent can read and edit it. If Codex says it can't edit the document, choose File ▸ AI Agent Access ▸ Can Read and Edit with that document in front, and tell Codex to go on.

6. Approve the design sheets

Codex draws a design sheet of each character: front, three-quarter, side and back views, with a few expressions. Each object that appears in more than one panel, such as Pip's staff or the sword, gets its own sheet too, with its size next to the character who carries it. Then Codex waits for you. Look at the sheets closely. Codex uses them as references when it draws the panels. If something is off, say what to change, for example "Redo Pip with the star patch on her hat." When you're happy:

All approved. Go ahead with the panel art.
Two design sheets: Rowan in front, three-quarter, side and back views with four expressions, and the sword in three views beside Rowan and Pip for scale and held in each one's hands
Two of the five design sheets from our right-to-left run: Rowan, and the sword with Rowan and Pip for scale.

7. Let Codex work

Now Codex works on its own: it draws each panel, splits each page into frames, places the art, adds the approved effects, the balloons and the original lettering, then the translations, each on its own layer. It looks at every page in every language and fixes text that doesn't fit. Leave the document alone while it works.

The effects are MangaLoft tones, not part of the art, so you can select, change or delete each one later. For an effect that goes behind the characters, such as Shock, Codex first makes a cut-out of the characters from the same panel image and checks that it lines up with the art; the effect then goes between the art and the cut-out. If the cut-out doesn't line up, Codex skips that effect and tells you.

When it's done, it tells you what it made, any line it shortened, the effects it placed or skipped, and anything it wasn't sure of.

Codex reports: both right-to-left pages finished with vertical lettering in Japanese, Korean, Traditional and Simplified Chinese, every line at 12 pt or larger and none shortened; two ovals enlarged and a burst tail removed; the sky gradation and the concentration lines placed and checked; and how to export

8. Check the pages, and work on them together

Codex is a co-author, not a finished-manga button. Its first pages are a draft: look at them as an editor would. In one of our runs, the sword changed length between the panels, and Pip held it the wrong way. We told Codex so; it redrew the two panels as new versions and showed each one for approval before it went into MangaLoft, and it took a few rounds. That is why the kits now make design sheets: in our next runs, the sword kept its length from panel to panel. Use the design sheets to compare recurring objects across panels. Check their size, shape, and how each character holds them before you approve the pages.

Tell Codex what to change and what to keep, as precisely as you can. A redrawn panel can change more than you asked, so check it before you accept it. What we said:

If you see either of these problems in your pages, try the matching request:

Or change it yourself. In MangaLoft, open each page: the art, frames, effects, balloons and lettering are ordinary MangaLoft objects, so you can move a balloon, redraw a tail, change a tone or fix a line. If you then ask Codex for more, tell it what you changed, so it doesn't undo your work.

Page 1 of the right-to-left document in MangaLoft, viewed in Japanese with vertical lettering, and the banner An AI agent can read and edit this document. The layer list has Text zh-Hans, Text zh-Hant, Text ko and Text ja, each tagged with its language, above Balloons and the three frames, each with its Art layer and one with a Tones layer
Each language's lettering is on its own layer, tagged with the language. The art, effects and balloons are shared.

The editor shows every language at once, so the lettering piles up in the balloons. To check one language, choose View (the eye) in the toolbar, then All languages and the language (once you've chosen one, that menu shows its name). See Language layers.

9. Export

Exporting is yours: Codex never exports, but it tells you how when it finishes. In the page list choose File ▸ Export Document… and set Color to Grayscale:

See Export.

Make your own story

If something goes wrong