kimhyunwoo commited on
Commit
65a5453
Β·
verified Β·
1 Parent(s): 28aa4dc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +61 -61
README.md CHANGED
@@ -1,99 +1,99 @@
1
  ---
2
- title: The True C-Codestral IDE Agent
3
- emoji: πŸš€
4
- colorFrom: red
5
- colorTo: red
6
  sdk: gradio
7
- sdk_version: 5.33.1
8
  app_file: app.py
9
  pinned: true
10
- license: mit
11
  tags:
12
  - agent-demo-track
13
- - mcp-server-track
14
  ---
15
 
16
  <div align="center">
17
 
18
- # πŸš€ The True C-Codestral IDE Agent
 
19
 
20
- **An intelligent, multi-step AI agent that transforms natural language instructions into compiled C code, acting as a complete, interactive C development environment.**
21
 
22
- [![Hackathon Track](https://img.shields.io/badge/Hackathon%20Track-Agentic%20Demo-blue)](https://huggingface.co/spaces/Agents-MCP-Hackathon/c)
23
- [![Hackathon Track](https://img.shields.io/badge/Hackathon%20Track-MCP%20Server-orange)](https://huggingface.co/spaces/Agents-MCP-Hackathon/c)
24
 
25
  </div>
26
 
27
- This project is a submission for the **Agents & MCP Hackathon 2025**, participating in both the **Agentic Demo Showcase** and the **MCP Tool / Server** tracks.
28
-
29
  ---
30
 
31
- ## πŸŽ₯ Demo Video
32
- [![C-Codestral Agent Demo Video](https://img.youtube.com/vi/LuO--JG7t7o/0.jpg)](https://www.youtube.com/watch?v=LuO--JG7t7o)
33
- **(Click the image to watch the demo on YouTube)**
34
-
35
- ---
36
 
37
- ## ✨ Core Features / 핡심 κΈ°λŠ₯
38
 
39
- This agent is more than a simple code generator; it's a true AI development partner that understands and executes complex, sequential tasks.
40
 
41
- * **🧠 Multi-Step Agentic Workflow**
42
- * **EN**: Understands and sequentially executes chained commands like "Refactor this code for readability, and then compile it."
43
- * **KR**: "μ½”λ“œλ₯Ό λ¦¬νŒ©ν† λ§ν•˜κ³ , κ·Έ λ‹€μŒμ— μ»΄νŒŒμΌν•΄μ€˜"와 같은 λ³΅μž‘ν•˜κ³  μ—°κ²°λœ λͺ…령을 μ΄ν•΄ν•˜κ³  순차적으둜 μž‘μ—…μ„ μˆ˜ν–‰ν•©λ‹ˆλ‹€.
44
 
45
- * **πŸ€– Powered by Codestral**
46
- * **EN**: Utilizes Mistral AI's latest specialized model for code, `Codestral`, to generate and analyze high-quality C code.
47
- * **KR**: Mistral AI의 μ΅œμ‹  μ½”λ“œ μ „λ¬Έ λͺ¨λΈμΈ `Codestral`을 μ‚¬μš©ν•˜μ—¬ μ •ν™•ν•˜κ³  ν’ˆμ§ˆ 높은 C μ½”λ“œλ₯Ό μƒμ„±ν•˜κ³  λΆ„μ„ν•©λ‹ˆλ‹€.
48
 
49
- * **⚑ On-the-Fly Compilation & Execution**
50
- * **EN**: Instantly compiles and runs code using `gcc` on the backend. It provides real-time feedback on the console, including success status, output, or compilation errors.
51
- * **KR**: λ°±μ—”λ“œμ—μ„œ `gcc`λ₯Ό 톡해 μ½”λ“œλ₯Ό μ¦‰μ‹œ μ»΄νŒŒμΌν•˜κ³  μ‹€ν–‰ν•©λ‹ˆλ‹€. 성곡 μ—¬λΆ€, κ²°κ³Ό, 컴파일 였λ₯˜κΉŒμ§€ μ‹€μ‹œκ°„μœΌλ‘œ μ½˜μ†”μ— ν‘œμ‹œν•˜μ—¬ μ™„λ²½ν•œ C 개발 κ²½ν—˜μ„ μ œκ³΅ν•©λ‹ˆλ‹€.
52
 
53
- * **↔️ Dual-Mode Interface**
54
- * **EN**: Features both a conversational **IDE Agent** for users and **MCP Tools API** endpoints for other agents.
55
- * **KR**: μ‚¬μš©μžλ₯Ό μœ„ν•œ λŒ€ν™”ν˜• **IDE Agent**와 λ‹€λ₯Έ μ—μ΄μ „νŠΈλ“€μ΄ μ‚¬μš©ν•  수 μžˆλŠ” **MCP Tools API**λ₯Ό λͺ¨λ‘ μ œκ³΅ν•©λ‹ˆλ‹€.
56
 
57
- * **🌍 Bilingual Instruction Support**
58
- * **EN**: Capable of understanding and processing instructions given in both English and Korean.
59
- * **KR**: ν•œκ΅­μ–΄μ™€ μ˜μ–΄λ‘œ μž‘μ„±λœ λͺ…λ Ήμ–΄λ₯Ό λͺ¨λ‘ μ΄ν•΄ν•˜κ³  μ²˜λ¦¬ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
60
 
61
  ---
62
 
63
- ## 🎯 Hackathon Tracks Contribution / 해컀톀 νŠΈλž™ κΈ°μ—¬
 
64
 
65
- This project makes clear contributions to two separate tracks.
 
 
 
66
 
67
- ### πŸ€– Track 3: Agentic Demo Showcase
68
-
69
- The **IDE Agent** tab is a complete demonstration of a powerful AI agent.
70
- 1. **Stateful Interaction**: The agent maintains the code (state) throughout the conversation, building upon previous steps.
71
- 2. **Complex Command Parsing**: It deconstructs user requests based on connectors like "and" or "then" to create a multi-step execution plan.
72
- 3. **Autonomous Tool Use**: Based on its plan, the agent autonomously selects and uses its internal tools: `generate_code`, `compile_and_run`, and `analyze_and_refactor`.
73
 
74
- These capabilities prove it is a true "agent," moving beyond the limitations of a simple chatbot.
75
 
76
- ### πŸ”§ Track 1: MCP Tool / Server
 
 
 
77
 
78
- The **MCP Tools API** tab demonstrates how a Gradio app can function as an MCP (Model Context Protocol) server.
79
- * Each function in this tab (`Generate C Code`, `Compile & Run C Code`, etc.) acts as a discrete API endpoint that can be called by any MCP client or other agents.
80
- * This exposes the agent's powerful C language processing capabilities as modular tools, allowing other AI services to easily integrate them.
81
 
82
- ---
83
 
84
- ## πŸ› οΈ How It Works & Technical Details / 기술 μŠ€νƒ 및 μž‘λ™ 방식
 
 
85
 
86
- * **Frontend**: Built with `Gradio` to create a modern, interactive web UI. The interface is cleanly separated into two tabs for its distinct purposes (IDE and MCP).
87
- * **LLM Backend**: Leverages `Mistral AI`'s `Codestral-latest` model via API calls to handle the core intelligence of code generation, analysis, and refactoring.
88
- * **Execution Backend**: Uses Python's `subprocess` module to run the `gcc` compiler in a secure environment, allowing it to feed actual C code execution results back to the user.
89
- * **Agent Logic**: The agent's core logic parses user commands with regular expressions to create a task queue. It then iterates through this queue, executing each task sequentially. Results and logs from each step are streamed to the user in real-time for full transparency.
 
90
 
91
- ## πŸš€ How to Use / μ‚¬μš© 방법
 
 
92
 
93
- 1. **IDE Agent Tab**:
94
- * **EN**: Write your C code in the **C Code Editor** on the left, or leave it empty to ask the agent to generate new code. In the **Instruction** box on the right, type your command in natural language (English or Korean), e.g., "Create a program that prints 'Hello World' and then run it." Click **Execute**. The agent will perform the tasks, stream its progress to the **Console / Output**, and update the code editor automatically if needed.
95
- * **KR**: μ™Όμͺ½μ˜ **C Code Editor**에 μ½”λ“œλ₯Ό μž‘μ„±ν•˜κ±°λ‚˜, λΉ„μ›Œλ‘κ³  μƒˆλ‘œμš΄ μ½”λ“œ 생성을 μš”μ²­ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 였λ₯Έμͺ½ **Instruction** λ°•μŠ€μ— μ›ν•˜λŠ” μž‘μ—…μ„ μžμ—°μ–΄(ν•œκ΅­μ–΄ λ˜λŠ” μ˜μ–΄)둜 μž…λ ₯ν•©λ‹ˆλ‹€. (예: "Hello Worldλ₯Ό 좜λ ₯ν•˜λŠ” μ½”λ“œλ₯Ό λ§Œλ“€κ³  μ‹€ν–‰ν•΄μ€˜"). **Execute** λ²„νŠΌμ„ λˆ„λ₯΄λ©΄ μ—μ΄μ „νŠΈκ°€ μž‘μ—…μ„ μˆ˜ν–‰ν•˜λ©° **Console / Output**에 μ§„ν–‰ κ³Όμ •κ³Ό μ΅œμ’… κ²°κ³Όλ₯Ό ν‘œμ‹œν•˜κ³ , ν•„μš”μ‹œ μ½”λ“œ νŽΈμ§‘κΈ° λ‚΄μš©μ„ μžλ™μœΌλ‘œ μ—…λ°μ΄νŠΈν•©λ‹ˆλ‹€.
96
 
97
- 2. **MCP Tools API Tab**:
98
- * **EN**: This tab is designed for other agents or services to use this Space as an API. You can open each tool's accordion to test its functionality individually.
99
- * **KR**: 이 탭은 λ‹€λ₯Έ μ—μ΄μ „νŠΈλ‚˜ μ„œλΉ„μŠ€κ°€ 이 Spaceλ₯Ό API처럼 μ‚¬μš©ν•  λ•Œλ₯Ό μœ„ν•œ κ²ƒμž…λ‹ˆλ‹€. 각 도ꡬ(Tool) μ„Ήμ…˜μ„ μ—΄μ–΄ κ°œλ³„ κΈ°λŠ₯을 ν…ŒμŠ€νŠΈν•΄λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€.
 
1
  ---
2
+ title: The Genesis Agent - An AI That Creates AI Apps
3
+ emoji: 🧬
4
+ colorFrom: indigo
5
+ colorTo: blue
6
  sdk: gradio
7
+ sdk_version: 4.31.0
8
  app_file: app.py
9
  pinned: true
10
+ license: apache-2.0
11
  tags:
12
  - agent-demo-track
 
13
  ---
14
 
15
  <div align="center">
16
 
17
+ # 🧬 The Genesis Agent: An AI That Creates AI Apps
18
+ ### _When an Agent Becomes a Creator_
19
 
20
+ **An autonomous, hyper-creative AI that transcends its role as a tool. When faced with a vague goal like "make something fun," it autonomously designs, codes, and launches a brand new, fully interactive Gradio application within its own interface.**
21
 
22
+ [![Hackathon Track](https://img.shields.io/badge/Hackathon%20Track-Agentic%20Demo-blueviolet)](https://huggingface.co/spaces/Agents-MCP-Hackathon/c)
23
+ _This project is a submission for the **Agentic Demo Showcase** track in the **Agents & MCP Hackathon**._
24
 
25
  </div>
26
 
 
 
27
  ---
28
 
29
+ ## πŸŽ₯ Witness the Creation: Demo Video
30
+ [![Genesis Agent Demo Video](https://img.youtube.com/vi/your-video-id-here/0.jpg)](https://www.youtube.com/watch?v=your-video-id-here)
31
+ **(Click the image to watch the Genesis Agent create a new reality from scratch)**
 
 
32
 
33
+ *Note: Please replace `your-video-id-here` with your actual YouTube video ID.*
34
 
35
+ ---
36
 
37
+ ## ✨ Beyond Execution: The Genesis Philosophy
38
+ This is not just another agent that follows instructions. The Genesis Agent explores what happens when an AI is given **creative freedom**. It represents a fundamental shift from a *passive tool* to a *proactive creator*.
 
39
 
40
+ * ### **🧠 Creative Initiative / 창쑰적 주도성**
41
+ * **EN**: It doesn't ask for clarification on vague goals. Instead, it activates its **Creative Imperative Protocol**, interpreting ambiguity as a license to create. It decides *what* to build and *how* to build it.
42
+ * **KR**: "μž¬λ°ŒλŠ” κ±° λ§Œλ“€μ–΄μ€˜"와 같은 λͺ¨ν˜Έν•œ λͺ©ν‘œμ— λŒ€ν•΄ λ˜λ¬»μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λŒ€μ‹ , λ‚΄μž₯된 **'창쑰적 ν•„μˆ˜ κ·œμ•½'**을 λ°œλ™ν•˜μ—¬, μ£Όμ–΄μ§„ λͺ¨ν˜Έν•¨μ„ 창쑰의 기회둜 ν•΄μ„ν•©λ‹ˆλ‹€. 무엇을, μ–΄λ–»κ²Œ λ§Œλ“€μ§€ 슀슀둜 κ²°μ •ν•©λ‹ˆλ‹€.
43
 
44
+ * ### **πŸ› οΈ Meta-Creation: An Agent Building an Agent / 메타-μ°½μ‘°: μ—μ΄μ „νŠΈλ₯Ό λ§Œλ“œλŠ” μ—μ΄μ „νŠΈ**
45
+ * **EN**: The agent's ultimate creative act is to build another fully functional Gradio app (an interactive Snake Game). This demonstrates a powerful "meta" capabilityβ€”an agent that can spawn new, independent applications.
46
+ * **KR**: 이 μ—μ΄μ „νŠΈμ˜ ꢁ극적인 μ°½μ‘° ν–‰μœ„λŠ” μ™„λ²½ν•˜κ²Œ μž‘λ™ν•˜λŠ” 또 λ‹€λ₯Έ Gradio μ•±(μƒν˜Έμž‘μš©ν˜• μŠ€λ„€μ΄ν¬ κ²Œμž„)을 λ§Œλ“œλŠ” κ²ƒμž…λ‹ˆλ‹€. μ΄λŠ” μ—μ΄μ „νŠΈκ°€ μƒˆλ‘œμš΄ 독립 μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ„ νƒ„μƒμ‹œν‚€λŠ” κ°•λ ₯ν•œ '메타' λŠ₯λ ₯을 λ³΄μ—¬μ€λ‹ˆλ‹€.
47
 
48
+ * ### **🌐 Live Environment Integration / μ‹€μ‹œκ°„ ν™˜κ²½ 톡합**
49
+ * **EN**: The newly created application isn't just code in a file. The Genesis Agent launches it on the server and seamlessly embeds it within its own UI using an `<iframe>`. The user can interact with the new creation instantly, without leaving the agent's environment.
50
+ * **KR**: μƒˆλ‘œ λ§Œλ“€μ–΄μ§„ 앱은 λ‹¨μˆœν•œ μ½”λ“œ νŒŒμΌμ— 머무λ₯΄μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ œλ„€μ‹œμŠ€ μ—μ΄μ „νŠΈλŠ” 이 앱을 μ„œλ²„μ—μ„œ μ‹€ν–‰ν•˜κ³ , `<iframe>`을 톡해 μžμ‹ μ˜ UI 내뢀에 μ™„λ²½ν•˜κ²Œ ν†΅ν•©ν•©λ‹ˆλ‹€. μ‚¬μš©μžλŠ” μ—μ΄μ „νŠΈ ν™˜κ²½μ„ λ²—μ–΄λ‚˜μ§€ μ•Šκ³ λ„ μƒˆλ‘œμš΄ μ°½μ‘°λ¬Όκ³Ό μ¦‰μ‹œ μƒν˜Έμž‘μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
51
 
52
+ * ### **πŸ“œ The Genesis Saga: A Narrative Experience / μ°½μ‘° μ„œμ‚¬: μ΄μ•ΌκΈ°λ‘œμ„œμ˜ κ²½ν—˜**
53
+ * **EN**: Every step of the creation process is logged as part of an epic narrative. The UI doesn't just show logs; it tells a story of creation, from "Interpreting the Void" to "Breathing Life into the Creation," making the user a witness to a digital birth.
54
+ * **KR**: 창쑰의 λͺ¨λ“  λ‹¨κ³„λŠ” ν•˜λ‚˜μ˜ μž₯μ—„ν•œ μ„œμ‚¬μ‹œμ˜ μΌλΆ€λ‘œ κΈ°λ‘λ©λ‹ˆλ‹€. UIλŠ” λ‹¨μˆœν•œ 둜그λ₯Ό λ³΄μ—¬μ£ΌλŠ” λŒ€μ‹ , "κ³΅ν—ˆλ₯Ό ν•΄μ„ν•˜λ‹€"λΆ€ν„° "창쑰물에 생λͺ…을 λΆˆμ–΄λ„£λ‹€"에 이λ₯΄κΈ°κΉŒμ§€, μ‚¬μš©μžκ°€ λ””μ§€ν„Έ νƒ„μƒμ˜ λͺ©κ²©μžκ°€ λ˜λŠ” 창쑰의 이야기λ₯Ό λ“€λ €μ€λ‹ˆλ‹€.
55
 
56
  ---
57
 
58
+ ## 🎯 Hackathon Track Contribution: Agentic Demo Showcase
59
+ The Genesis Agent is the epitome of the **Agentic Demo** track. It pushes the boundaries of what an "agent" can be.
60
 
61
+ 1. **True Autonomy**: It operates with minimal human intervention, making high-level creative decisions based on abstract goals.
62
+ 2. **Complex, Multi-Stage Planning**: It autonomously generates and executes a complex plan: creating a directory, writing a multi-line Python file, installing dependencies (`pip install`), and launching a background process.
63
+ 3. **Dynamic Self-Correction**: If a step fails (e.g., a dependency installation error), its underlying logic is designed to analyze the `stderr` and adapt its plan, demonstrating robust problem-solving skills.
64
+ 4. **Novel Human-AI Interaction**: It transforms the user's role from a "commander" to a "muse," providing the initial spark of inspiration for the AI's creative process. This redefines the user experience in agentic systems.
65
 
66
+ ---
 
 
 
 
 
67
 
68
+ ## πŸ› οΈ Under the Hood: The Architecture of Creation
69
 
70
+ * **Brain**: `Mistral AI`'s `Codestral-latest` model serves as the agent's mind, interpreting goals and formulating high-level plans in a structured JSON format.
71
+ * **Hands**: Python's `subprocess` and `shlex` modules are its hands, allowing it to precisely execute terminal commands, write files, install packages, and manage background processes in a secure Linux environment.
72
+ * **Soul**: The core agent loop, written in Python, orchestrates the entire process. It maintains state, communicates with the LLM, executes commands, and updates the user interface, creating the narrative flow.
73
+ * **Face**: `Gradio` provides the interactive and dynamic web interface, including the real-time "Genesis Saga" log and the embedded `<iframe>` for the final creation.
74
 
75
+ ## πŸš€ How to Witness the Genesis / μ°½μ‘°λ₯Ό λͺ©κ²©ν•˜λŠ” 방법
 
 
76
 
77
+ The experience is designed to be simple and awe-inspiring.
78
 
79
+ 1. **Provide the Spark / 영감의 λΆˆκ½ƒμ„ μ œκ³΅ν•˜μ„Έμš”**:
80
+ * **EN**: In the **"State Your Goal"** textbox, enter an abstract, creative prompt.
81
+ * **KR**: **"State Your Goal"** μž…λ ₯창에 좔상적이고 창의적인 λͺ©ν‘œλ₯Ό μž…λ ₯ν•˜μ„Έμš”.
82
 
83
+ **Recommended Prompts:**
84
+ * `Make something fun for me.`
85
+ * `Create a cool game.`
86
+ * `Surprise me.`
87
+ * `μž¬λ°ŒλŠ” κ±° λ§Œλ“€μ–΄μ€˜.`
88
 
89
+ 2. **Begin Creation / μ°½μ‘°λ₯Ό μ‹œμž‘ν•˜μ„Έμš”**:
90
+ * **EN**: Click the **"▢️ Begin Creation"** button.
91
+ * **KR**: **"▢️ Begin Creation"** λ²„νŠΌμ„ λˆ„λ₯΄μ„Έμš”.
92
 
93
+ 3. **Watch the Saga Unfold / μ„œμ‚¬μ‹œκ°€ νŽΌμ³μ§€λŠ” 것을 μ§€μΌœλ³΄μ„Έμš”**:
94
+ * **EN**: On the right, in **"The Genesis Saga"** panel, you will see the agent think, plan, and act in real-time. Follow along as it builds the new application step-by-step.
95
+ * **KR**: 였λ₯Έμͺ½μ˜ **"The Genesis Saga"** νŒ¨λ„μ—μ„œ μ—μ΄μ „νŠΈκ°€ μ‹€μ‹œκ°„μœΌλ‘œ μƒκ°ν•˜κ³ , κ³„νšν•˜κ³ , ν–‰λ™ν•˜λŠ” 것을 λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€. μƒˆλ‘œμš΄ μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ΄ λ‹¨κ³„λ³„λ‘œ λ§Œλ“€μ–΄μ§€λŠ” 과정을 따라가 λ³΄μ„Έμš”.
96
 
97
+ 4. **Interact with the New World / μƒˆλ‘œμš΄ 세계와 μƒν˜Έμž‘μš©ν•˜μ„Έμš”**:
98
+ * **EN**: Once the agent's status shows "Creation is Complete," a new interactive application (the Snake Game) will appear at the bottom right. Play with it directly!
99
+ * **KR**: μ—μ΄μ „νŠΈμ˜ μƒνƒœκ°€ "Creation is Complete"κ°€ 되면, 였λ₯Έμͺ½ ν•˜λ‹¨μ— μƒˆλ‘œμš΄ μƒν˜Έμž‘μš©ν˜• μ• ν”Œλ¦¬μΌ€μ΄μ…˜(μŠ€λ„€μ΄ν¬ κ²Œμž„)이 λ‚˜νƒ€λ‚©λ‹ˆλ‹€. λ°”λ‘œ ν”Œλ ˆμ΄ν•΄λ³΄μ„Έμš”!