▶SUBTHAIแปลไทย · ซับ · พากย์⚙
บทความแปลภาษาไทย · YouTube

I Built the Simplest Software Factory (You Can Copy It)

0:000:00
เล่นเสียงต้นฉบับของวิดีโอ พร้อมแสดงซับไทยซิงก์ตามเวลา
กำลังโหลดวิดีโอ…
01

สรุปย่อ

ประเด็นสำคัญจากวิดีโอ

- **ช่อง:** Leon van Zyl · **ความยาว:** ~28 นาที · **ลิงก์:** https://www.youtube.com/watch?v=AsvzMlLyQ38

# สรุป: I Built the Simplest Software Factory (You Can Copy It)

- **ช่อง:** Leon van Zyl · **ความยาว:** ~28 นาที · **ลิงก์:** https://www.youtube.com/watch?v=AsvzMlLyQ38

## ประเด็นหลัก

- Software Factory คือระบบที่ให้การเข้าถึงกลุ่ม coding agents หลายตัวที่รออยู่ในสถานะ standby
- มี workflow ที่ประกอบด้วย signal, triage, assignment, execution และ monitoring
- Agent แต่ละตัวทำงานใน sandbox แยกกันเพื่อความปลอดภัยและการจัดทรัพยากรที่ดี
- ใช้ Upstash VPS ในการ run agents บน cloud เพื่อความสะดวกและความต่อเนื่อง
- สามารถใช้ mix ของ agents ต่างๆ (Claude, Codex, GPT-6 Astra) ได้ตามความเหมาะสม

## ความเห็นสรุป

Leon van Zyl ได้สร้าง software factory ที่เรียบง่ายและสามารถ copy ได้โดยใช้ GitHub เป็นฐาน ระบบนี้ช่วยให้การทำงานของ coding agents มีประสิทธิภาพ ปลอดภัย และสามารถขยายได้ โดยอาศัย GitHub issues เป็น signal และใช้ Upstash VPS ในการ run agents ด้วยวิธีนี้ทำให้ไม่จำเป็นต้องมีเครื่องมือเพิ่มเติมและสามารถทำงานได้ตลอดเวลา
02

คำแปลเต็ม

แปลตามบทสนทนาต้นฉบับ ปรับเป็นภาษาไทยธรรมชาติ

สักฟอร์มของ task จาก signal นี้อาจจะเป็น Slack message, Telegram message, GitHub issue หรืออะไรก็ตามที่จะ trigger มัน มันจะทำ review ของ change นั้นแล้ว assign ให้กับ coding agent ที่ว่างอยู่ มันเป็นระบบที่รับผิดชอบในการ manage ทั้ง workflow นี้

นี่คือ factory loop ที่พบได้บ่อยมาก ดังที่ผมได้บอกไป อาจจะมี signal บางประเภท มีระบบบางอย่างที่คน report bugs เข้ามา อาจจะเป็น GitHub issues หรือ Slack message อะไรก็ตามก็สามารถเป็น signal ที่ trigger software factory ได้ แล้วเราก็มี triage step นี้ ซึ่งอาจจะเป็น triage, orchestration, delegation step หรือว่าเราจะเรียกมันว่าอะไรก็ได้ ง่ายๆ คือใน step นี้ เรารับ task เข้ามา เราสามารถใช้ LLM ในการ classify task นั้นได้ถ้าเราต้องการ เช่นถ้าคุณใช้ Jev คุณสามารถใช้มันในการ classify change เป็น bug, new feature หรือ documentation แล้วก็สามารถกำหนดว่า change นี้ควรถูก assign ให้ coding agent ตัวไหน หรือในตัวอย่างของผม ผมไม่ได้ include LLM เลย มันเพียงแต่เป็น piece of code ที่ทำงาน

ที่จะ grab task แล้ว assign ให้กับ coding agent ตัวหนึ่งที่ว่างอยู่ แล้ว coding agent ตัวหนึ่งก็จะ implement change นั้น มันสามารถ validate มันได้โดยการ run reviews, unit tests และอื่นๆ และในที่สุดมันจะ release change นั้นโดยการ create pull request หรือ maybe even ship the code แล้ว software factory ก็จะ keep monitoring สำหรับ any new signals และคุณสามารถ include human gates ได้มากเท่าที่คุณอยากได้ เช่น architectural decisions, breaking changes, active incidents หรือแค่ review และ merge pull requests

และนี่คือวิธีที่เราจะ implement มัน Signal ของเราจะเป็น GitHub issue และ triage step ของเราจะเป็น dispatcher ซึ่งจะรับ issue นั้นแล้ว assign ให้กับ agent ตัวหนึ่งที่ว่างอยู่ ถ้า agent ยังไม่ ready มันจะ keep retrying จนกว่า agent จะ become ready นอกจากนี้ถ้า user assign label เพื่อ assign agent ให้ Codex หรือ Claude Code หรือโดย the way คุณสามารถใช้ agent อื่นๆ ได้เหมือนกัน ผมแค่ใช้ Claude หรือ Codex เป็นตัวอย่างใน tutorial นี้เท่านั้น มันจะ assign task ไปให้ agent ที่ถูกต้อง หลังจาก agent นี้ complete แล้ว มันจะ create pull requests หรือมันจะ update original issues กับ any comments ถ้ามัน run into any issues หรือมัน need a design decision และแน่นอนเราจะ add human in the loop ด้วย คุณสามารถ review pull requests และ decide ว่าคุณจะ close มัน, add more comments หรือ merge pull request

ก็ว่าทำไมเราอาจจะอยากจะมี mix ของ agents ต่างๆ? ทำไมไม่ใช้ Claude สำหรับทุกอย่างล่ะ? ดีนะ ความสนุกของ software factory คือคุณสามารถ lean into the strengths ของ agents ต่างๆ ได้ เช่น Claude Fable นั้น really good at writing complex code และ models อย่าง GPT-6 Astra นั้น really good at 3D work ตัวอย่างหนึ่งคือใน triage step หรือ orchestration step คุณสามารถใช้ LLM ในการ scan incident ถ้ามัน involves any 3D work มันสามารถ assign task ให้ Codex model หรือถ้ามัน involves complex coding ก็ assign ให้ Claude Fable agent หรือถ้า change นั้น involves super simple documentation update มันสามารถใช้ model ที่ simple, quick และ cheap

นี่คือเรื่องที่ really important คือแต่ละ agent จะ run ใน sandbox ของตัวเอง และคุณอาจจงคาว่าทำไมเราถึงอยากจะทำเช่นนี้ ก่อนอื่นนะการ run models ใน sandbox จะปลอดภัยกว่า ทำให้พวกมันไม่สามารถ access secrets บนเครื่องของคุณ, run harmful commands และอื่นๆ จำไว้ว่า issues อาจจะ contain harmful instructions ผ่าน prompt injection และถ้า agent กำลัง run ใน sandbox ที่ contained ความเสียหายจะถูก limit อย่างสมบูรณ์ Agents ไม่สามารถ access laptop, files, secrets ของคุณได้อะไรเลย

อย่างอื่นที่น่าสนใจคือแต่ละ agent เหล่านี้จะ run บน VPS ของตัวเอง ซึ่งนี่หมายความว่าพวกมันมี hardware allocation ของตัวเอง เช่นตัวนี้มี 2 CPUs และ 4 gigs of RAM ซึ่งนี่หมายความว่า agents เหล่านี้ไม่ต้อง fight over resources บนเครื่องของคุณ จินตนาการว่าคุณกำลัง run 10 หรือ 20 หรือ 100 agents พร้อมกัน ทั้งหมด fight สำหรับ resources เดียวกัน แม้ว่า please let me know ใน comments ถ้าคุณจะต้องการ agents จำนวนนั้นมาก

และ benefit อีกอย่างที่ชัดเจนของการ run agents บน VPS คือพวกมันมักจะออนไลน์ตลอดเวลา ดังนั้นถ้าฉันปิด laptop งานจะ continue as per usual ฉันสามารถไปได้ที่ไหนก็ได้ ฉันสามารถ open GitHub บนโทรศัพท์ แล้ว log an issue แล้ว agents ตัวหนึ่งก็จะ create pull request

OK พอดีมาทฤษฎีพอแล้ว เรามา build software factory กัน ในการเริ่มต้น เราจะต้องมีอย่างน้อย 1 GitHub repo สำหรับให้ software factory manage เพียงแค่ใช้ GitHub repo ของคุณที่มีอยู่ หรือถ้าคุณอยากให้ปลอดภัย deploy a simple to-do app ว่า repo เหล่านี้สามารถเป็น private หรือ public ก็ได้ขึ้นอยู่กับคุณ แต่คุณต้องเปิดว่าถ้า repo เป็น public คนอื่นก็ assign issues ได้ซึ่งจะ trigger software factory ของคุณได้ด้วย คุณสามารถ update triage step ได้เพื่อให้มัน process GitHub issues ที่ถูก assign โดยคุณเท่านั้น

สำหรับวิดีโอนี้ ผมจะใช้ 2 repos ที่ต่างกัน นั่นก็คือ RTS demo และ to-do app แล้วเราก็ต้อง run agents ใน cloud สำหรับ software factories ผมไม่ชอบ run agents บน local machine เหมือนที่เคยบอกไปเพราะเหตุผลที่กล่าวมาแล้ว และหนึ่งในวิธีง่ายๆ ที่ผมเจอในการ run agents ใน cloud คือด้วย Upstash คุณสามารถ follow along กับ free tier ของพวกเขาได้ เพียงแค่ create Upstash account แล้วไปที่ box option และถ้าคุณไปที่ boxes คุณจะเห็นว่าเรายังไม่มี boxes ที่กำลัง run อยู่ Box คือ Linux virtual machine ขนาดเล็ก และ agents เช่น Claude Code และ Codex จะ run บนเครื่องเหล่านี้

และสุดท้ายทั้งหมดที่เราต้องทำคือ create software factory ของเรา ดังที่ผมบอกไปแล้วว่า software factory เองไม่ใช่ coding agent มันคือ environment หรือ program หรือ wrapper ที่รับผิดชอบในการ receive those triggers, receive issues แล้ว assign ให้ coding agents และ manage ทั้ง process ดังนั้นสิ่งที่เราจะทำคือ get coding agent ของเรามา build factory ให้เรา เราไม่ต้อง code อะไรเลย แล้วเราจะ deploy factory ของเราไปที่ GitHub และสิ่งที่ cool คือ code ของ software factory จะ run ภายใน GitHub เอง คุณจะเห็นว่ามันจริงๆ แล้ว really, really cool

การ set up ทั้งหมดนี้สามารถเป็น tricky ได้ และผมต้อง reference multiple articles เพื่อใหม่ทำงานได้ มี article ที่ดีมากสำหรับเรื่องนี้จาก Upstash เอง ที่พวกเขา discuss เกี่ยวกับ the need to have a separate sandbox per agent ใน software factory มี valuable insight มากมายใน article นี้ และผมยังต้อง reference bunch ของ articles อื่นๆ เพื่อ understand how boxes work, GitHub Actions และอะไรทั้งหมดที่เราต้องในการ build this factory ดังนั้นแทนที่จะ bore คุณกับ technical details ทั้งหมด ผมจะไปตรงประเด็นเลย

ผมตัดสินใจที่จะ create reusable agent skill ซึ่งคุณสามารถ install แล้ว get agent ของคุณมา build factory ให้คุณได้ ใน description ของวิดีโอนี้ คุณจะเจอ link ไปที่ GitHub repo ที่มี skills ที่แตกต่างกันของผมทั้งหมด และใน skills folder คุณจะเจอ create Upstash software factory skill นี้ ซึ่งนี่จะให้ agent มี references ของทุกอย่างที่ผมใช้ในการ build software factory นี้ ดังนั้นถ้าคุณต้องการ deep understanding ของว่าทุกอย่างนี้ทำงานอย่างไร คุณสามารถ...

ที่นี่เราจะเห็น smoke-test Codex box และหลังจากนั้น agent จะ delete boxes เหล่านี้โดยอัตโนมัติ และ agent ของเราได้ confirm แล้วว่ามันสามารถ create boxes และ run coding agents ภายใน boxes เหล่านี้ได้ มันจะ set up software factory บน GitHub ตอนนี้ message นี้มัน loaded มาก มันถามว่ามันจะไป set up ทั้งหมด triggers ต่างๆ ใน factory เองได้ไหม ดังนั้นตอนนี้ทั้งหมดที่คุณต้องท่างคือพูว่า "Yes, apply both" นะครับ ดีกันแล้ว agent ของเราได้ progress ดีมาก และมันกำลังจะไปถึง point นี้ คือ stage five ที่มันจะถามให้คุณ merge pull requests ให้ผมอธิบายว่านี้ทำงานอย่างไรนะครับ software factory จะสามารถ update issues และ create pull requests บน repos ที่แตกต่างกันที่มัน manage ได้ แต่ project repos เองก็ต้องมีวิธีในการ fire off triggers ไปยัง software factory ดังนั้นอาจจะให้ตัวอย่างเล็กๆ เพื่อให้เข้าใจ ถ้าผมไปที่ project เอง แล้วไปที่ issues เมื่อเรา create issue และ assign label ว่า ready นั่นก็จะ trigger software factory ของเรา และในที่สุดมันก็จะ assign task ให้ coding agent ตัวหนึ่ง

ผมต้องขอบคุณทุกคนที่รับชมวิดีโอนี้ และถ้าคุณชอบวิดีโอนี้อย่าลืมกด like button และ subscribe channel เพื่อไม่พลาดวิดีโอใหม่ๆ และถ้าคุณต้องการสนับสนุนผมเพิ่มเติม คุณสามารถเข้าร่วม community ของผมที่ Agentic Labs ได้ ซึ่งนี้จะให้คุณ access ไปยัง courses พิเศษเพิ่มเติม เช่น Agentic Coding Masterclass ที่ผมสอนคุณเกี่ยวกับ fundamentals ของการใช้ coding agents และเราจะ build full applications ที่ include payment processing, user authentication และอีกมากมาย นี้จะให้คุณ access ไปยัง live sessions เช่น Tuesday Coffee sessions และ Thursday Deep Dive sessions ของเราด้วย

ผมยังต้องขอบคุณ Upstash ที่ sponsor วิดีโอนี้อีกด้วย และผมขอแนะนำให้ check this out ผมจะเจอคุณในวิดีโอต่อไปนะครับ บายๆ

04

อภิธานศัพท์เทคนิค

คำศัพท์และชื่อผลิตภัณฑ์ที่คงรูปภาษาอังกฤษ

ศัพท์คำแปล / คำอธิบาย
Software Factoryโรงงานซอฟต์แวร์ - ระบบที่จัดการกลุ่ม coding agents และ workflow
Coding Agentsตัวแทนที่เขียนโค้ด - AI agents ที่ทำงานเกี่ยวกับการเขียนโปรแกรม
Swarmกลุ่ม - กลุ่มของ agents ที่ทำงานร่วมกัน
Triageการแยกชนิด - ขั้นตอนในการประเมินและจัดการ tasks
Dispatcherตัวจัดส่ง - ระบบที่ assign tasks ให้กับ agents
Sandboxบริเวณที่ปลอดภัย - สภาพแวดล้อมแยกกันสำหรับการ run agents
VPSเซิร์ฟเวอร์ส่วนตัวเสมือน - เครื่องเสมือนสำหรับการ run agents
GitHub Actionsการดำเนินการของ GitHub - ระบบ automation บน GitHub
Pull Requestคำขอเพื่อดึงข้อมูล - การเสนอการเปลี่ยนแปลงใน repository
Guardrailsรั้วป้องกัน - กฎหรือข้อจำกัดเพื่อความปลอดภัย
Harnessระบบห่วง - ส่วนที่ควบคุมและจัดการ agents
Prompt Injectionการฉีด prompt - การโจมตีที่พยายามแทรกแทรงผ่าน prompts
Upstashบริษัทที่ให้บริการ cloud sandbox - ใช้สำหรับการ run agents
Claude Codeเครื่องมือเขียนโค้ดของ Claude - coding agent สำหรับการเขียนโค้ด
Codexระบบของ OpenAI - coding agent สำหรับการเขียนโค้ด
LLMแม่แบบภาษาขนาดใหญ่ - AI models ที่สามารถประมวลผลภาษาได้
05

ซับไตเติ้ลภาษาไทย

ดาวน์โหลดหรือดูซับทั้งหมด

1
00:00:00,000 --> 00:00:11,328
สักฟอร์มของ task จาก signal นี้อาจจะเป็น Slack message,

2
00:00:11,328 --> 00:00:17,507
Telegram message, GitHub issue

3
00:00:17,507 --> 00:00:26,775
หรืออะไรก็ตามที่จะ trigger มัน มันจะทำ review

4
00:00:26,775 --> 00:00:36,250
ของ change นั้นแล้ว assign ให้กับ coding agent
thai-subtitles.srt
SubRip — ใช้กับเครื่องเล่นวิดีโอส่วนใหญ่
↓ ดาวน์โหลด
thai-subtitles.vtt
WebVTT — ใช้กับเว็บ / YouTube
↓ ดาวน์โหลด
เปิดดูซับไตเติ้ลทั้งหมด (194 segments)
1
00:00:00,000 --> 00:00:11,328
สักฟอร์มของ task จาก signal นี้อาจจะเป็น Slack message,

2
00:00:11,328 --> 00:00:17,507
Telegram message, GitHub issue

3
00:00:17,507 --> 00:00:26,775
หรืออะไรก็ตามที่จะ trigger มัน มันจะทำ review

4
00:00:26,775 --> 00:00:36,250
ของ change นั้นแล้ว assign ให้กับ coding agent

5
00:00:36,250 --> 00:00:44,488
ที่ว่างอยู่ มันเป็นระบบที่รับผิดชอบในการ

6
00:00:44,488 --> 00:00:53,551
manage ทั้ง workflow นี้ นี่คือ factory loop

7
00:00:53,551 --> 00:01:01,789
ที่พบได้บ่อยมาก ดังที่ผมได้บอกไป อาจจะมี

8
00:01:01,789 --> 00:01:10,646
signal บางประเภท มีระบบบางอย่างที่คน report

9
00:01:10,646 --> 00:01:20,120
bugs เข้ามา อาจจะเป็น GitHub issues หรือ Slack

10
00:01:20,120 --> 00:01:28,358
message อะไรก็ตามก็สามารถเป็น signal ที่

11
00:01:28,358 --> 00:01:36,597
trigger software factory ได้ แล้วเราก็มี

12
00:01:36,597 --> 00:01:44,218
triage step นี้ ซึ่งอาจจะเป็น triage,

13
00:01:44,218 --> 00:01:47,101
orchestration,

14
00:01:47,101 --> 00:01:58,223
delegation step หรือว่าเราจะเรียกมันว่าอะไรก็ได้ ง่ายๆ

15
00:01:58,223 --> 00:02:07,698
คือใน step นี้ เรารับ task เข้ามา เราสามารถใช้

16
00:02:07,698 --> 00:02:16,760
LLM ในการ classify task นั้นได้ถ้าเราต้องการ

17
00:02:16,760 --> 00:02:24,587
เช่นถ้าคุณใช้ Jev คุณสามารถใช้มันในการ

18
00:02:24,587 --> 00:02:33,237
classify change เป็น bug, new feature หรือ

19
00:02:33,237 --> 00:02:41,682
documentation แล้วก็สามารถกำหนดว่า change

20
00:02:41,682 --> 00:02:49,920
นี้ควรถูก assign ให้ coding agent ตัวไหน

21
00:02:49,920 --> 00:02:58,983
หรือในตัวอย่างของผม ผมไม่ได้ include LLM เลย

22
00:02:58,983 --> 00:03:08,045
มันเพียงแต่เป็น piece of code ที่ทำงาน ที่จะ

23
00:03:08,045 --> 00:03:16,489
grab task แล้ว assign ให้กับ coding agent

24
00:03:16,489 --> 00:03:24,110
ตัวหนึ่งที่ว่างอยู่ แล้ว coding agent

25
00:03:24,110 --> 00:03:33,172
ตัวหนึ่งก็จะ implement change นั้น มันสามารถ

26
00:03:33,172 --> 00:03:40,175
validate มันได้โดยการ run reviews,

27
00:03:40,175 --> 00:03:49,238
unit tests และอื่นๆ และในที่สุดมันจะ release

28
00:03:49,238 --> 00:03:57,888
change นั้นโดยการ create pull request หรือ

29
00:03:57,888 --> 00:04:07,362
maybe even ship the code แล้ว software factory

30
00:04:07,362 --> 00:04:16,219
ก็จะ keep monitoring สำหรับ any new signals

31
00:04:16,219 --> 00:04:22,810
และคุณสามารถ include human gates

32
00:04:22,810 --> 00:04:31,460
ได้มากเท่าที่คุณอยากได้ เช่น architectural

33
00:04:31,460 --> 00:04:40,729
decisions, breaking changes, active incidents

34
00:04:40,729 --> 00:04:48,555
หรือแค่ review และ merge pull requests

35
00:04:48,555 --> 00:04:57,206
และนี่คือวิธีที่เราจะ implement มัน Signal

36
00:04:57,206 --> 00:05:05,650
ของเราจะเป็น GitHub issue และ triage step

37
00:05:05,650 --> 00:05:13,683
ของเราจะเป็น dispatcher ซึ่งจะรับ issue

38
00:05:13,683 --> 00:05:19,450
นั้นแล้ว assign ให้กับ agent

39
00:05:19,450 --> 00:05:28,100
ตัวหนึ่งที่ว่างอยู่ ถ้า agent ยังไม่ ready

40
00:05:28,100 --> 00:05:36,751
มันจะ keep retrying จนกว่า agent จะ become

41
00:05:36,751 --> 00:05:45,401
ready นอกจากนี้ถ้า user assign label เพื่อ

42
00:05:45,401 --> 00:05:53,434
assign agent ให้ Codex หรือ Claude Code

43
00:05:53,434 --> 00:06:01,672
หรือโดย the way คุณสามารถใช้ agent อื่นๆ

44
00:06:01,672 --> 00:06:09,705
ได้เหมือนกัน ผมแค่ใช้ Claude หรือ Codex

45
00:06:09,705 --> 00:06:18,149
เป็นตัวอย่างใน tutorial นี้เท่านั้น มันจะ

46
00:06:18,149 --> 00:06:26,800
assign task ไปให้ agent ที่ถูกต้อง หลังจาก

47
00:06:26,800 --> 00:06:35,244
agent นี้ complete แล้ว มันจะ create pull

48
00:06:35,244 --> 00:06:44,513
requests หรือมันจะ update original issues กับ

49
00:06:44,513 --> 00:06:52,545
any comments ถ้ามัน run into any issues

50
00:06:52,545 --> 00:07:01,814
หรือมัน need a design decision และแน่นอนเราจะ

51
00:07:01,814 --> 00:07:10,670
add human in the loop ด้วย คุณสามารถ review

52
00:07:10,670 --> 00:07:19,733
pull requests และ decide ว่าคุณจะ close มัน,

53
00:07:19,733 --> 00:07:38,063
add more comments หรือ merge pull request ก็ว่าทำไมเราอาจจะอยากจะมี mix ของ agents ต่างๆ?

54
00:07:38,063 --> 00:07:45,478
ทำไมไม่ใช้ Claude สำหรับทุกอย่างล่ะ?

55
00:07:45,478 --> 00:08:03,397
ดีนะ ความสนุกของ software factory คือคุณสามารถ lean into the strengths ของ agents ต่างๆ

56
00:08:03,397 --> 00:08:11,841
ได้ เช่น Claude Fable นั้น really good at

57
00:08:11,841 --> 00:08:20,698
writing complex code และ models อย่าง GPT-6

58
00:08:20,698 --> 00:08:27,495
Astra นั้น really good at 3D work

59
00:08:27,495 --> 00:08:34,703
ตัวอย่างหนึ่งคือใน triage step หรือ

60
00:08:34,703 --> 00:08:44,178
orchestration step คุณสามารถใช้ LLM ในการ scan

61
00:08:44,178 --> 00:08:53,652
incident ถ้ามัน involves any 3D work มันสามารถ

62
00:08:53,652 --> 00:09:01,479
assign task ให้ Codex model หรือถ้ามัน

63
00:09:01,479 --> 00:09:10,541
involves complex coding ก็ assign ให้ Claude

64
00:09:10,541 --> 00:09:20,015
Fable agent หรือถ้า change นั้น involves super

65
00:09:20,015 --> 00:09:29,490
simple documentation update มันสามารถใช้ model

66
00:09:29,490 --> 00:09:38,346
ที่ simple, quick และ cheap นี่คือเรื่องที่

67
00:09:38,346 --> 00:09:46,791
really important คือแต่ละ agent จะ run ใน

68
00:09:46,791 --> 00:09:50,292
sandbox ของตัวเอง

69
00:09:50,292 --> 00:09:58,737
และคุณอาจจงคาว่าทำไมเราถึงอยากจะทำเช่นนี้

70
00:09:58,737 --> 00:10:05,945
ก่อนอื่นนะการ run models ใน sandbox

71
00:10:05,945 --> 00:10:14,390
จะปลอดภัยกว่า ทำให้พวกมันไม่สามารถ access

72
00:10:14,390 --> 00:10:19,333
secrets บนเครื่องของคุณ,

73
00:10:19,333 --> 00:10:28,601
run harmful commands และอื่นๆ จำไว้ว่า issues

74
00:10:28,601 --> 00:10:38,076
อาจจะ contain harmful instructions ผ่าน prompt

75
00:10:38,076 --> 00:10:46,932
injection และถ้า agent กำลัง run ใน sandbox

76
00:10:46,932 --> 00:10:54,347
ที่ contained ความเสียหายจะถูก limit

77
00:10:54,347 --> 00:11:03,409
อย่างสมบูรณ์ Agents ไม่สามารถ access laptop,

78
00:11:03,409 --> 00:11:09,794
files, secrets ของคุณได้อะไรเลย

79
00:11:09,794 --> 00:11:18,857
อย่างอื่นที่น่าสนใจคือแต่ละ agent เหล่านี้จะ

80
00:11:18,857 --> 00:11:22,976
run บน VPS ของตัวเอง

81
00:11:22,976 --> 00:11:32,450
ซึ่งนี่หมายความว่าพวกมันมี hardware allocation

82
00:11:32,450 --> 00:11:41,307
ของตัวเอง เช่นตัวนี้มี 2 CPUs และ 4 gigs of

83
00:11:41,307 --> 00:11:50,575
RAM ซึ่งนี่หมายความว่า agents เหล่านี้ไม่ต้อง

84
00:11:50,575 --> 00:11:57,990
fight over resources บนเครื่องของคุณ

85
00:11:57,990 --> 00:12:07,052
จินตนาการว่าคุณกำลัง run 10 หรือ 20 หรือ 100

86
00:12:07,052 --> 00:12:16,526
agents พร้อมกัน ทั้งหมด fight สำหรับ resources

87
00:12:16,526 --> 00:12:26,001
เดียวกัน แม้ว่า please let me know ใน comments

88
00:12:26,001 --> 00:12:34,033
ถ้าคุณจะต้องการ agents จำนวนนั้นมาก และ

89
00:12:34,033 --> 00:12:43,302
benefit อีกอย่างที่ชัดเจนของการ run agents บน

90
00:12:43,302 --> 00:12:50,098
VPS คือพวกมันมักจะออนไลน์ตลอดเวลา

91
00:12:50,098 --> 00:12:59,367
ดังนั้นถ้าฉันปิด laptop งานจะ continue as per

92
00:12:59,367 --> 00:13:08,841
usual ฉันสามารถไปได้ที่ไหนก็ได้ ฉันสามารถ open

93
00:13:08,841 --> 00:13:17,080
GitHub บนโทรศัพท์ แล้ว log an issue แล้ว

94
00:13:17,080 --> 00:13:25,730
agents ตัวหนึ่งก็จะ create pull request OK

95
00:13:25,730 --> 00:13:35,205
พอดีมาทฤษฎีพอแล้ว เรามา build software factory

96
00:13:35,205 --> 00:13:43,443
กัน ในการเริ่มต้น เราจะต้องมีอย่างน้อย 1

97
00:13:43,443 --> 00:13:52,711
GitHub repo สำหรับให้ software factory manage

98
00:13:52,711 --> 00:14:00,744
เพียงแค่ใช้ GitHub repo ของคุณที่มีอยู่

99
00:14:00,744 --> 00:14:10,218
หรือถ้าคุณอยากให้ปลอดภัย deploy a simple to-do

100
00:14:10,218 --> 00:14:19,281
app ว่า repo เหล่านี้สามารถเป็น private หรือ

101
00:14:19,281 --> 00:14:24,636
public ก็ได้ขึ้นอยู่กับคุณ

102
00:14:24,636 --> 00:14:34,110
แต่คุณต้องเปิดว่าถ้า repo เป็น public คนอื่นก็

103
00:14:34,110 --> 00:14:42,349
assign issues ได้ซึ่งจะ trigger software

104
00:14:42,349 --> 00:14:51,617
factory ของคุณได้ด้วย คุณสามารถ update triage

105
00:14:51,617 --> 00:15:00,062
step ได้เพื่อให้มัน process GitHub issues

106
00:15:00,062 --> 00:15:09,124
ที่ถูก assign โดยคุณเท่านั้น สำหรับวิดีโอนี้

107
00:15:09,124 --> 00:15:18,392
ผมจะใช้ 2 repos ที่ต่างกัน นั่นก็คือ RTS demo

108
00:15:18,392 --> 00:15:26,837
และ to-do app แล้วเราก็ต้อง run agents ใน

109
00:15:26,837 --> 00:15:35,899
cloud สำหรับ software factories ผมไม่ชอบ run

110
00:15:35,899 --> 00:15:40,636
agents บน local machine

111
00:15:40,636 --> 00:15:49,287
เหมือนที่เคยบอกไปเพราะเหตุผลที่กล่าวมาแล้ว

112
00:15:49,287 --> 00:15:58,349
และหนึ่งในวิธีง่ายๆ ที่ผมเจอในการ run agents

113
00:15:58,349 --> 00:16:06,794
ใน cloud คือด้วย Upstash คุณสามารถ follow

114
00:16:06,794 --> 00:16:15,238
along กับ free tier ของพวกเขาได้ เพียงแค่

115
00:16:15,238 --> 00:16:24,095
create Upstash account แล้วไปที่ box option

116
00:16:24,095 --> 00:16:33,157
และถ้าคุณไปที่ boxes คุณจะเห็นว่าเรายังไม่มี

117
00:16:33,157 --> 00:16:42,426
boxes ที่กำลัง run อยู่ Box คือ Linux virtual

118
00:16:42,426 --> 00:16:51,488
machine ขนาดเล็ก และ agents เช่น Claude Code

119
00:16:51,488 --> 00:16:58,491
และ Codex จะ run บนเครื่องเหล่านี้

120
00:16:58,491 --> 00:17:06,523
และสุดท้ายทั้งหมดที่เราต้องทำคือ create

121
00:17:06,523 --> 00:17:15,586
software factory ของเรา ดังที่ผมบอกไปแล้วว่า

122
00:17:15,586 --> 00:17:25,060
software factory เองไม่ใช่ coding agent มันคือ

123
00:17:25,060 --> 00:17:32,681
environment หรือ program หรือ wrapper

124
00:17:32,681 --> 00:17:41,125
ที่รับผิดชอบในการ receive those triggers,

125
00:17:41,125 --> 00:17:50,188
receive issues แล้ว assign ให้ coding agents

126
00:17:50,188 --> 00:17:54,925
และ manage ทั้ง process

127
00:17:54,925 --> 00:18:03,369
ดังนั้นสิ่งที่เราจะทำคือ get coding agent

128
00:18:03,369 --> 00:18:12,638
ของเรามา build factory ให้เรา เราไม่ต้อง code

129
00:18:12,638 --> 00:18:21,700
อะไรเลย แล้วเราจะ deploy factory ของเราไปที่

130
00:18:21,700 --> 00:18:30,763
GitHub และสิ่งที่ cool คือ code ของ software

131
00:18:30,763 --> 00:18:37,147
factory จะ run ภายใน GitHub เอง

132
00:18:37,147 --> 00:18:46,416
คุณจะเห็นว่ามันจริงๆ แล้ว really, really cool

133
00:18:46,416 --> 00:18:55,066
การ set up ทั้งหมดนี้สามารถเป็น tricky ได้

134
00:18:55,066 --> 00:19:02,687
และผมต้อง reference multiple articles

135
00:19:02,687 --> 00:19:08,454
เพื่อใหม่ทำงานได้ มี article

136
00:19:08,454 --> 00:19:16,281
ที่ดีมากสำหรับเรื่องนี้จาก Upstash เอง

137
00:19:16,281 --> 00:19:25,755
ที่พวกเขา discuss เกี่ยวกับ the need to have a

138
00:19:25,755 --> 00:19:35,229
separate sandbox per agent ใน software factory

139
00:19:35,229 --> 00:19:43,468
มี valuable insight มากมายใน article นี้

140
00:19:43,468 --> 00:19:51,912
และผมยังต้อง reference bunch ของ articles

141
00:19:51,912 --> 00:20:01,181
อื่นๆ เพื่อ understand how boxes work, GitHub

142
00:20:01,181 --> 00:20:10,037
Actions และอะไรทั้งหมดที่เราต้องในการ build

143
00:20:10,037 --> 00:20:18,276
this factory ดังนั้นแทนที่จะ bore คุณกับ

144
00:20:18,276 --> 00:20:27,544
technical details ทั้งหมด ผมจะไปตรงประเด็นเลย

145
00:20:27,544 --> 00:20:36,400
ผมตัดสินใจที่จะ create reusable agent skill

146
00:20:36,400 --> 00:20:45,669
ซึ่งคุณสามารถ install แล้ว get agent ของคุณมา

147
00:20:45,669 --> 00:20:53,495
build factory ให้คุณได้ ใน description

148
00:20:53,495 --> 00:21:02,558
ของวิดีโอนี้ คุณจะเจอ link ไปที่ GitHub repo

149
00:21:02,558 --> 00:21:11,620
ที่มี skills ที่แตกต่างกันของผมทั้งหมด และใน

150
00:21:11,620 --> 00:21:21,095
skills folder คุณจะเจอ create Upstash software

151
00:21:21,095 --> 00:21:29,127
factory skill นี้ ซึ่งนี่จะให้ agent มี

152
00:21:29,127 --> 00:21:37,572
references ของทุกอย่างที่ผมใช้ในการ build

153
00:21:37,572 --> 00:21:47,046
software factory นี้ ดังนั้นถ้าคุณต้องการ deep

154
00:21:47,046 --> 00:21:55,902
understanding ของว่าทุกอย่างนี้ทำงานอย่างไร

155
00:21:55,902 --> 00:22:05,171
คุณสามารถ... ที่นี่เราจะเห็น smoke-test Codex

156
00:22:05,171 --> 00:22:13,409
box และหลังจากนั้น agent จะ delete boxes

157
00:22:13,409 --> 00:22:21,648
เหล่านี้โดยอัตโนมัติ และ agent ของเราได้

158
00:22:21,648 --> 00:22:30,916
confirm แล้วว่ามันสามารถ create boxes และ run

159
00:22:30,916 --> 00:22:39,773
coding agents ภายใน boxes เหล่านี้ได้ มันจะ

160
00:22:39,773 --> 00:22:48,011
set up software factory บน GitHub ตอนนี้

161
00:22:48,011 --> 00:22:57,486
message นี้มัน loaded มาก มันถามว่ามันจะไป set

162
00:22:57,486 --> 00:23:02,635
up ทั้งหมด triggers ต่างๆ

163
00:23:02,635 --> 00:23:16,846
ใน factory เองได้ไหม ดังนั้นตอนนี้ทั้งหมดที่คุณต้องท่างคือพูว่า "Yes,

164
00:23:16,846 --> 00:23:25,909
apply both" นะครับ ดีกันแล้ว agent ของเราได้

165
00:23:25,909 --> 00:23:34,765
progress ดีมาก และมันกำลังจะไปถึง point นี้

166
00:23:34,765 --> 00:23:43,621
คือ stage five ที่มันจะถามให้คุณ merge pull

167
00:23:43,621 --> 00:23:52,684
requests ให้ผมอธิบายว่านี้ทำงานอย่างไรนะครับ

168
00:23:52,684 --> 00:24:01,540
software factory จะสามารถ update issues และ

169
00:24:01,540 --> 00:24:07,513
create pull requests บน repos

170
00:24:07,513 --> 00:24:16,164
ที่แตกต่างกันที่มัน manage ได้ แต่ project

171
00:24:16,164 --> 00:24:25,226
repos เองก็ต้องมีวิธีในการ fire off triggers

172
00:24:25,226 --> 00:24:29,757
ไปยัง software factory

173
00:24:29,757 --> 00:24:38,614
ดังนั้นอาจจะให้ตัวอย่างเล็กๆ เพื่อให้เข้าใจ

174
00:24:38,614 --> 00:24:46,646
ถ้าผมไปที่ project เอง แล้วไปที่ issues

175
00:24:46,646 --> 00:24:55,297
เมื่อเรา create issue และ assign label ว่า

176
00:24:55,297 --> 00:25:04,771
ready นั่นก็จะ trigger software factory ของเรา

177
00:25:04,771 --> 00:25:13,216
และในที่สุดมันก็จะ assign task ให้ coding

178
00:25:13,216 --> 00:25:16,099
agent ตัวหนึ่ง

179
00:25:16,099 --> 00:25:23,102
ผมต้องขอบคุณทุกคนที่รับชมวิดีโอนี้

180
00:25:23,102 --> 00:25:32,576
และถ้าคุณชอบวิดีโอนี้อย่าลืมกด like button และ

181
00:25:32,576 --> 00:25:41,021
subscribe channel เพื่อไม่พลาดวิดีโอใหม่ๆ

182
00:25:41,021 --> 00:25:48,230
และถ้าคุณต้องการสนับสนุนผมเพิ่มเติม

183
00:25:48,230 --> 00:25:57,292
คุณสามารถเข้าร่วม community ของผมที่ Agentic

184
00:25:57,292 --> 00:26:06,560
Labs ได้ ซึ่งนี้จะให้คุณ access ไปยัง courses

185
00:26:06,560 --> 00:26:16,035
พิเศษเพิ่มเติม เช่น Agentic Coding Masterclass

186
00:26:16,035 --> 00:26:24,891
ที่ผมสอนคุณเกี่ยวกับ fundamentals ของการใช้

187
00:26:24,891 --> 00:26:34,365
coding agents และเราจะ build full applications

188
00:26:34,365 --> 00:26:41,780
ที่ include payment processing, user

189
00:26:41,780 --> 00:26:51,254
authentication และอีกมากมาย นี้จะให้คุณ access

190
00:26:51,254 --> 00:26:59,287
ไปยัง live sessions เช่น Tuesday Coffee

191
00:26:59,287 --> 00:27:07,526
sessions และ Thursday Deep Dive sessions

192
00:27:07,526 --> 00:27:17,000
ของเราด้วย ผมยังต้องขอบคุณ Upstash ที่ sponsor

193
00:27:17,000 --> 00:27:25,856
วิดีโอนี้อีกด้วย และผมขอแนะนำให้ check this

194
00:27:25,856 --> 00:27:33,683
out ผมจะเจอคุณในวิดีโอต่อไปนะครับ บายๆ