YouTube2Text

OpenAI Codex Tutorial #6 - Using the AGENTS.md file — Transcript

by Net Ninja · 906 words · 129 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Okay then my friends in the previous
  2. 0:02lesson we talked about commands which
  3. 0:04come baked into the Codex CLI tool and
  4. 0:07one of those commands was the init
  5. 0:08command which generates an agents.md
  6. 0:11file for us in this project. Now we're
  7. 0:13going to run this command shortly but
  8. 0:15just very quickly first of all I want to
  9. 0:16talk about what an agents file actually
  10. 0:18is and why we would use one. So you can
  11. 0:21think of an agents file as a bit like a
  12. 0:24readme but instead of being written for
  13. 0:25humans it's written for the coding
  14. 0:27agents that you're working with. It
  15. 0:29lives in your project, usually in the
  16. 0:31root folder, and it tells the agent how
  17. 0:33your codebase works, what commands it
  18. 0:35should use to build and test things,
  19. 0:37what coding styles you prefer, how your
  20. 0:39project is structured, and so forth.
  21. 0:41It's basically like a little cheat sheet
  22. 0:43that helps the agent slot into your
  23. 0:44workflow and code basically how you
  24. 0:47would like them to code. So, Codeex
  25. 0:50leans heavily into this agents.md file.
  26. 0:53And whenever you ask Codeex to do
  27. 0:55something either locally or on Codex
  28. 0:57cloud, it's going to look for that file
  29. 0:59in your project, if it's there, it's
  30. 1:01going to use any information inside that
  31. 1:03file as context within your prompts and
  32. 1:05any task that you give it. If you've
  33. 1:08used any other AI coding agents like
  34. 1:11Claude Code or Copilot, you have
  35. 1:13probably seen similar kinds of files in
  36. 1:15those things. In Clawed Code, we use a
  37. 1:17claw.md file for projectwide
  38. 1:19instructions. And in copilot, we use a
  39. 1:22copilot instructions markdown file for
  40. 1:24the same kind of uh stuff. And these all
  41. 1:27serve a similar purpose, right? In that
  42. 1:29they give each agent memory and concise
  43. 1:32project context. Where they differ is
  44. 1:35that the agents.mmd file is being pushed
  45. 1:38as a standard across different AI coding
  46. 1:41tools. So that instead of juggling these
  47. 1:43different files for different coding
  48. 1:44agents, the idea is that we can have
  49. 1:47just a unified agents file which could
  50. 1:50then be used across all of them. And
  51. 1:52there's already a bunch of different
  52. 1:53tools incorporating this agents.mmd
  53. 1:55file. So let's head back to the code
  54. 1:58then and use the codec cli to scaffold
  55. 2:01an agents file for us. Okay then. So I'm
  56. 2:04currently in a codec session and I'm
  57. 2:06going to use the init command to
  58. 2:08generate a new agents.mmd file. And when
  59. 2:12we use this command, codeex is
  60. 2:14automatically going to scan the codebase
  61. 2:16and scaffold the file for us with any
  62. 2:18code styles, testing preferences, and
  63. 2:21other things it finds. Sometimes it
  64. 2:23might add its own personal preferences
  65. 2:25as well. So you have to rein those in a
  66. 2:27little bit if you see those. And along
  67. 2:29the way, we might need to approve
  68. 2:30certain commands as well. But then after
  69. 2:32a few moments, it's going to make it for
  70. 2:33us and place it in the root of our
  71. 2:35project. Okay, so it looks like it's
  72. 2:38done it. Let's go and have a look over
  73. 2:40here at this new file. And you can see
  74. 2:42it's written some fairly comprehensive
  75. 2:44guidelines. It's a little lean, but you
  76. 2:47can always add to this later. So we have
  77. 2:49different headings for different things.
  78. 2:50So for example, the project structure
  79. 2:52and module organization talks about
  80. 2:54where different things live. So we have
  81. 2:57the app which lives inside this folder
  82. 2:59and then we have different route
  83. 3:02segments like this. We also have the
  84. 3:04layout and the global CSS file. Reusable
  85. 3:07UI components live here. Okay. So that
  86. 3:09all looks pretty good. Uh we've got some
  87. 3:12building testing and development
  88. 3:13commands down here which all look quite
  89. 3:16accurate. Yep. Then we have some coding
  90. 3:19style and naming conventions. It says
  91. 3:21use Pascal case like this. Okay. So
  92. 3:24basically this is all generic stuff but
  93. 3:26all it's doing is looking at our current
  94. 3:29uh project as it is at the moment and
  95. 3:32inferring the guidelines from there and
  96. 3:34it all looks quite accurate at the
  97. 3:36moment. It's got some testing guidelines
  98. 3:38down here as well and it talks about
  99. 3:41this test folder to put the test inside
  100. 3:44and then at the bottom we've got some
  101. 3:45commit and pull request guidelines as
  102. 3:47well. Awesome. So then you should also
  103. 3:50probably commit this agents file to your
  104. 3:52GitHub repository if you want the Codex
  105. 3:54cloud to use it when you're running
  106. 3:56remote tasks because again whenever you
  107. 3:58ask it to do something on the cloud it's
  108. 4:00going to look for this file
  109. 4:01automatically and it's going to use it
  110. 4:03as context for that task. And for that
  111. 4:05reason I'm going to push this change up
  112. 4:07to the GitHub repo once I finish
  113. 4:08recording this video just to keep
  114. 4:10everything up to date and in sync. And
  115. 4:12by the way, this file isn't something
  116. 4:14you should just create and forget about.
  117. 4:16As your project changes and evolves, you
  118. 4:18should update your agent file as well
  119. 4:20with anything new the coding agent
  120. 4:22should know about. For example, if you
  121. 4:24start using particular libraries or
  122. 4:26frameworks or if you change your project
  123. 4:28structure or testing procedures, etc.
  124. 4:31Because if you don't keep the file up to
  125. 4:33date, then codeex might go off track and
  126. 4:35do things the old way as outlined in the
  127. 4:37original agents file if you don't change
  128. 4:39it. So definitely come back and update
  129. 4:42the file as and when you need to.

About this transcript

This page contains the full transcript of OpenAI Codex Tutorial #6 - Using the AGENTS.md file by Net Ninja, generated from the public captions YouTube serves with the video. The transcript has 906 words across 129 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.