kimhyunwoo commited on
Commit
14f1277
Β·
verified Β·
1 Parent(s): 302b980

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -11
README.md CHANGED
@@ -1,10 +1,10 @@
1
  ---
2
- title: C-Codestral Agent
3
  emoji: πŸš€
4
  colorFrom: red
5
  colorTo: red
6
  sdk: gradio
7
- sdk_version: 5.33.0
8
  app_file: app.py
9
  pinned: true
10
  license: mit
@@ -13,19 +13,87 @@ tags:
13
  - mcp-server-track
14
  ---
15
 
16
- # πŸš€ C-Codestral Agent: The Interactive C Development Environment
17
 
18
- **C-Codestral Agent** is a powerful AI agent designed to be the ultimate co-pilot for C programming. Built with the latest stable version of **Gradio** and powered by Mistral's `Codestral` model, this agent can generate, compile, and execute C code seamlessly within a single, reliable interface.
19
 
20
- This project is a submission for the **Agents & MCP Hackathon 2025**.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  ---
23
 
24
- ## ✨ Core Features
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- * **πŸ’¬ Conversational AI Chat**: Interact with a powerful C-language expert.
27
- * **⚑ Instant Code Generation**: Get high-quality C code from natural language prompts.
28
- * **βœ… On-the-fly Compilation & Execution**: A secure backend with `gcc` compiles and runs your code instantly, showing the output or errors directly in the chat.
29
- * **πŸ› οΈ MCP-Enabled Tools**: The agent's core capabilities are exposed as MCP-compliant tools, ready to be used by other agents.
30
 
31
- ---
 
 
 
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
 
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) μ„Ήμ…˜μ„ μ—΄μ–΄ κ°œλ³„ κΈ°λŠ₯을 ν…ŒμŠ€νŠΈν•΄λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€.