Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -1,13 +1,86 @@
|
|
1 |
---
|
2 |
-
title: C
|
3 |
-
emoji:
|
4 |
colorFrom: green
|
5 |
colorTo: gray
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
-
pinned:
|
10 |
license: mit
|
|
|
|
|
|
|
11 |
---
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
title: C-Codestral Agent
|
3 |
+
emoji: ๐ค
|
4 |
colorFrom: green
|
5 |
colorTo: gray
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.31.0 # langchain๊ณผ ํธํ์ฑ์ ์ํด 4.x ๋ฒ์ ์ ๋ช
์ํ๋ ๊ฒ์ด ์์ ์ ์ผ ์ ์์ต๋๋ค.
|
8 |
app_file: app.py
|
9 |
+
pinned: true
|
10 |
license: mit
|
11 |
+
tags:
|
12 |
+
- agent-demo-track
|
13 |
+
- mcp-server-track
|
14 |
---
|
15 |
|
16 |
+
# ๐ C-Codestral Agent: Your C-Language Co-pilot
|
17 |
+
|
18 |
+
**C-Codestral Agent** is a powerful, conversational AI agent designed to assist developers with C programming. Powered by Mistral's `Codestral` model and built with Gradio and LangChain, this agent can generate, analyze, refactor, compile, and run C code seamlessly within a single interface.
|
19 |
+
|
20 |
+
This project is a submission for the **Agents & MCP Hackathon 2025**, demonstrating the power of AI agents and the Model Context Protocol (MCP).
|
21 |
+
|
22 |
+
[](https://huggingface.co/spaces/Agents-MCP-Hackathon/c) <!-- ์ด ๋ถ๋ถ์ ์ค์ Space URL๋ก ์๋ ์ฐ๊ฒฐ๋ฉ๋๋ค -->
|
23 |
+
|
24 |
+
---
|
25 |
+
|
26 |
+
## ๐ฅ Demo Video
|
27 |
+
|
28 |
+
Here is a short video demonstrating the core functionalities of the C-Codestral Agent, including code generation, compilation, and its use as an MCP tool.
|
29 |
+
|
30 |
+
**(ใใใซใใขใใใชใธใฎใชใณใฏใๆฟๅ
ฅใใฆใใ ใใใไพ: [Watch the Demo on YouTube](https://youtu.be/your_video_id))**
|
31 |
+
|
32 |
+
*์ค์: ๋ฐ๋ชจ ์์ ๋งํฌ๋ฅผ ์ฌ๊ธฐ์ ๊ผญ ์ถ๊ฐํ์ธ์. Loom, YouTube, ๋๋ Space์ ์ง์ ์
๋ก๋ํ ์์ ๋งํฌ๋ ์ข์ต๋๋ค.*
|
33 |
+
|
34 |
+
---
|
35 |
+
|
36 |
+
## โจ Core Features
|
37 |
+
|
38 |
+
* **๐ค Conversational Code Generation**: Simply ask the agent in natural language to create C code for any task, from simple "Hello, World!" programs to complex algorithms.
|
39 |
+
* **โ
Instant Compilation & Execution**: Test the generated or provided C code immediately. The agent uses a secure backend with `gcc` to compile and run the code, showing you the output or any errors in real-time.
|
40 |
+
* **๐ง Intelligent Code Analysis & Refactoring**: Provide your existing C code and ask for improvements, optimizations, or explanations. The agent helps you write better, more efficient code.
|
41 |
+
* **๐ ๏ธ MCP-Enabled Tools**: The agent's core capabilities (generate, compile, refactor) are exposed as MCP-compliant tools. This allows other LLM agents (like Claude Desktop, Cursor, etc.) to use this Gradio Space as a powerful C programming "tool" to solve complex problems.
|
42 |
+
|
43 |
+
---
|
44 |
+
|
45 |
+
## ๐ ๏ธ Tech Stack & Architecture
|
46 |
+
|
47 |
+
This project integrates several cutting-edge technologies to create a robust agentic system:
|
48 |
+
|
49 |
+
* **LLM (The Brain)**: `codestral-latest` by Mistral AI for its state-of-the-art code generation and understanding capabilities.
|
50 |
+
* **Agent Framework**: `LangChain` to orchestrate the agent's logic, manage conversation history, and intelligently decide which tool to use.
|
51 |
+
* **Frontend & UI**: `Gradio` for creating a sleek, responsive, and interactive chat interface.
|
52 |
+
* **Backend & Execution Environment**: Hugging Face Spaces, utilizing a secure Linux container with `gcc` for C code compilation.
|
53 |
+
* **Tool Protocol**: Model Context Protocol (MCP) via Gradio's `@tool` and `gr.load_tools()` functionalities, making the agent's skills available to the wider AI ecosystem.
|
54 |
+
|
55 |
+
<p align="center">
|
56 |
+
<img src="https://i.imgur.com/your_architecture_diagram_url.png" width="700">
|
57 |
+
<em>(์ ํ ์ฌํญ: ์ํคํ
์ฒ ๋ค์ด์ด๊ทธ๋จ ์ด๋ฏธ์ง๋ฅผ ์ถ๊ฐํ๋ฉด ์ ๋ฌธ์ฑ์ ๋ํ ์ ์์ต๋๋ค.)</em>
|
58 |
+
</p>
|
59 |
+
|
60 |
+
---
|
61 |
+
|
62 |
+
## ๐ How to Use
|
63 |
+
|
64 |
+
1. **Chat with the Agent**: Open the Gradio app and start a conversation. You can ask it to:
|
65 |
+
* `"Generate a C program to find all prime numbers up to 100."`
|
66 |
+
* `(After code is generated) "Now, compile and run it."`
|
67 |
+
* `(Paste your code) "Refactor this code to be more memory-efficient."`
|
68 |
+
|
69 |
+
2. **Use as an MCP Tool**:
|
70 |
+
* Connect your favorite MCP client (e.g., a compatible version of Claude Desktop).
|
71 |
+
* Add this Hugging Face Space as a tool.
|
72 |
+
* You can now ask the client to perform C-related tasks, and it will use this agent's tools (`generate_c_code`, `compile_and_run_c_code`, etc.) to get the job done.
|
73 |
+
|
74 |
+
---
|
75 |
+
|
76 |
+
## ๐ Hackathon Submission Details
|
77 |
+
|
78 |
+
This project is submitted for the following tracks and awards:
|
79 |
+
|
80 |
+
* **Primary Track**: `agent-demo-track`
|
81 |
+
* **Secondary Track**: `mcp-server-track`
|
82 |
+
* **Hoping to be considered for**:
|
83 |
+
* Most Innovative Use of MCP Award
|
84 |
+
* Community Choice Award
|
85 |
+
|
86 |
+
Thank you for checking out our project!
|