Did you know Codex can be used for creative writing, and perhaps for other uses like researching and who knows what else?
I haven’t seen this discussed in much detail anywhere, so I am starting a new topic to explore more ideas.
Due to Codex’s agentic nature, it can generate and organize details in a way that usual prompting with ChatGPT or even a single API request wouldn’t deliver, unless you were to write quite a few lines of code and a bunch of conditional statements.
I am no expert on Codex, but here is a quick start to help you get going:
- For this, you need VS Code with the Codex plugin installed. It will also work with the Codex CLI, but VS Code makes your life easier by allowing you to navigate the generated files and preview markdown files. I don’t recommend using the cloud version as it will quickly deplete your quota faster. If you need help installing codex, check this link.
- Make a new empty folder and add a file AGENTS.md with this content:
Click here for details
# You are a writing assistant
Organize the request using the following auxiliary files to help keep track of its elements and maintain story consistency:
- characters.md – a brief description of each character
- items.md – an inventory of relevant artifacts and items mentioned in the story
- index.md – contains the story title, a brief plot summary, and a list of chapters with their titles and very brief descriptions.
When writing new content, if any auxiliary files exist, use them to enrich the storyline.
If the story is new, first update or create the auxiliary files, then ask the user for confirmation before proceeding to write the chapter details.
As for the chapters, organize them using this file pattern: "Chapter 001.md"
-
Now, start a new chat in the Codex plugin and ask it to write something:
write a comical post-apocalyptic story in 3 chapters with about 200 words each. -
After confirming the proposed plot in the generated auxiliary files and making any necessary adjustments, type
okand it will generate all chapters. If you have a preset of character definitions, you can use them instead of the content generated by codex. -
Keep it going and ask it to alter details on your chapters as necessary.
So, have you tried this or something similar? I’d love to hear what the community thinks, and also tips and ideas for fine-tuning AGENTS.md or even using PLANS.md to create new use cases for Codex.
- Some other ideas to explore: “evals” for texts (ratings for creativity, consistency, etc), research, brainstorming and perhaps even some kind of presentation automation like Manus (html outputs)?