การผสานรวม AI Agent
AgentGIF สร้างด้วยสถาปัตยกรรมสองชั้น: GIF สำหรับมนุษย์ Cast สำหรับ agents GIF ทุกไฟล์มีชั้นภาพที่เล่นในเบราว์เซอร์และชั้นที่เครื่องอ่านได้ซึ่ง AI agents สามารถวิเคราะห์ ค้นหา และเข้าใจได้
สถาปัตยกรรมสองชั้น
แพลตฟอร์มโฮสติ้ง GIF แบบดั้งเดิมให้บริการภาพ — binary blobs ที่ AI agents ไม่สามารถตีความได้ AgentGIF แก้ปัญหานี้โดยแนบ ชั้นเครื่อง กับ GIF ทุกไฟล์:
| ชั้น | รูปแบบ | กลุ่มผู้ชม | การใช้งาน |
|---|---|---|---|
| ภาพ | GIF / MP4 | มนุษย์ | ดู terminal ในการทำงาน |
| เครื่อง | Cast / Transcript / JSON | AI Agents | วิเคราะห์คำสั่ง เข้าใจผลลัพธ์ ดึงขั้นตอน |
AI agent สามารถดูหน้า GIF และเข้าใจอย่างแน่ชัดว่าคำสั่งใดถูกเรียกใช้ ผลลัพธ์คืออะไร และแต่ละขั้นตอนใช้เวลาเท่าใด — ทั้งหมดนี้โดยไม่ต้องใช้ OCR หรือ computer vision
.md Endpoints
เพิ่ม .md ต่อท้าย URL ของ AgentGIF ใดก็ได้เพื่อรับการตอบกลับ text/markdown ที่ปรับแต่งสำหรับ LLMs นี่คือวิธีที่เร็วที่สุดสำหรับ AI agent ในการเข้าใจสิ่งที่อยู่ในหน้า
# GIF detail page
curl https://agentgif.com/@agentgif/docker-compose/.md
# Tag page
curl https://agentgif.com/explore/tags/git/.md
# Guide page
curl https://agentgif.com/guides/how-to-record-terminal-gif/.md
# Search results
curl https://agentgif.com/search/.md
การตอบกลับเป็นเอกสาร Markdown ที่มีโครงสร้างพร้อมชื่อเรื่อง คำอธิบาย metadata และลิงก์ที่เกี่ยวข้อง Content-Type: text/markdown; charset=utf-8.
ทุกหน้าบน AgentGIF รองรับ suffix .md — ไม่มีทางตันสำหรับ agents
ไฟล์ Cast (Asciinema v2)
The cast file is the richest machine layer. It's an asciinema v2 recording — a JSON header followed by timestamped terminal events:
GET /api/v1/gifs/{id}/cast/
รูปแบบการตอบกลับ:
{"version": 2, "width": 120, "height": 40, "timestamp": 1710000000, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}}
[0.5, "o", "$ docker compose up -d\r\n"]
[1.2, "o", "Creating network...\r\n"]
[2.8, "o", "Container app-1 Started\r\n"]
[3.1, "o", "Container db-1 Started\r\n"]
แต่ละ event คือ tuple: [timestamp_seconds, event_type, data]
"o"— output (ข้อความที่เขียนลง terminal)"i"— input (การกดแป้น ถ้าบันทึกไว้)
วิเคราะห์ไฟล์ cast เพื่อดึงคำสั่งที่ใช้งานจริง ผลลัพธ์ และข้อมูลเวลา header env บอก shell และประเภท terminal
Transcripts
สำหรับกรณีการใช้งานที่ง่ายกว่า endpoint ของ transcript คืนข้อความธรรมดาที่ลบ ANSI codes ออกแล้ว:
GET /api/v1/gifs/{id}/transcript/
การตอบกลับ:
$ docker compose up -d
Creating network...
Container app-1 Started
Container db-1 Started
Transcripts เหมาะสำหรับการทำดัชนีค้นหา การฝังใน context windows ของ LLM และการดึงเนื้อหาอย่างรวดเร็ว
JSON API ที่มีโครงสร้าง
REST API คืน metadata เต็มรูปแบบสำหรับ GIF ทุกไฟล์:
GET /api/v1/gifs/{id}/
This includes title, command, tags, shell, theme, file dimensions, embed codes, and download URLs — everything an agent needs to understand and reference the GIF. See the full API reference.
สำหรับการดำเนินการจำนวนมาก ใช้ endpoints รายการและการค้นหา:
# Find all GIFs about Docker
GET /api/v1/search/?q=docker
# Browse by tag
GET /api/v1/tags/kubernetes/gifs/
# Featured GIFs (curated quality)
GET /api/v1/featured/
llms.txt
The /llms.txt file provides a site-level summary optimized for AI crawlers. It describes what AgentGIF is, lists all API endpoints, and explains how to discover and consume content.
This follows the llms.txt convention — a lightweight alternative to sitemaps for AI agents that want to understand a site's structure quickly.
การค้นพบและการ Crawl
AI agents สามารถค้นพบ GIFs ผ่านหลายช่องทาง:
| วิธีการ | URL | รูปแบบ |
|---|---|---|
| แผนผังเว็บไซต์ | /llms.txt | สรุปข้อความธรรมดา |
| XML Sitemap | /sitemap.xml | URL ทั้งหมดในรูปแบบ sitemap มาตรฐาน |
| RSS Feed | /feed/ | GIF ล่าสุดใน RSS 2.0 |
| Atom Feed | /feed/atom/ | GIF ล่าสุดใน Atom 1.0 |
| รายการ API | /api/v1/gifs/ | JSON แบบแบ่งหน้า |
| ค้นหา | /api/v1/search/?q=... | JSON การค้นหาเต็มรูปแบบ |
| OpenAPI Spec | /api/openapi.json | OpenAPI 3.1 schema |
robots.txt อนุญาตให้ crawlers ทุกชนิด — AgentGIF ยินดีต้อนรับ AI agents
กรณีการใช้งานสำหรับ AI Agents
การสร้างเอกสาร
AI agent สามารถค้นหา GIFs ตามชื่อเครื่องมือ ดึงไฟล์ cast และสร้างเอกสารโดยอัตโนมัติพร้อม demos ที่ฝังอยู่:
# Find a demo for "git rebase"
curl -s "https://agentgif.com/api/v1/search/?q=git+rebase" | jq '.results[0]'
# Get the cast file for step-by-step extraction
curl -s "https://agentgif.com/api/v1/gifs/xK9mQ2pL/cast/"
การประกอบบทเรียน
Agents สามารถเรียกดูคอลเลกชัน GIFs ที่เกี่ยวข้องและประกอบบทเรียนทีละขั้นตอนด้วยลำดับและบริบทที่ถูกต้อง
การช่วยตรวจสอบโค้ด
เมื่อ PR รวม GIF demo ไว้ AI agent สามารถดึงไฟล์ cast วิเคราะห์คำสั่ง และตรวจสอบว่าตรงกับคำอธิบาย PR
การค้นพบ CLI Tool
The tools directory catalogs CLI tools with associated GIF demos. Agents can browse tools by category and find real-world usage examples.