# What Programming Language Is Used in datawhalechina/hello-agents?

> Explore the datawhalechina/hello-agents repository, built entirely in Python. Learn basic Python skills to implement and extend this educational agent framework effectively.

- Repository: [Datawhale/hello-agents](https://github.com/datawhalechina/hello-agents)
- Tags: tutorial
- Published: 2026-05-09

---

**The datawhalechina/hello-agents repository is built entirely in Python, requiring basic Python programming skills to implement and extend its educational agent framework.**

The **Hello-Agents** project by DataWhale China provides an open-source framework for learning autonomous agent development. If you are investigating what programming language is used in datawhalechina/hello-agents, the codebase confirms that **Python** serves as the sole implementation language, from documentation prerequisites to core framework modules located in the `hello_agents/` directory.

## Evidence from Repository Documentation

The project explicitly identifies Python as its prerequisite in the primary documentation. According to [`README_EN.md`](https://github.com/datawhalechina/hello-agents/blob/main/README_EN.md), users must possess "basic Python programming skill" to follow the tutorials and extend the framework.

This requirement aligns with the repository's composition, which contains dozens of Python scripts ranging from utility files like [`fix_bold_format.py`](https://github.com/datawhalechina/hello-agents/blob/main/fix_bold_format.py) to tutorial entry points such as [`code/chapter9/project/main.py`](https://github.com/datawhalechina/hello-agents/blob/main/code/chapter9/project/main.py). The consistent use of `.py` extensions throughout the codebase confirms Python as the dominant programming language.

## Core Python Implementation Files

The framework's architecture is organized into modular Python packages that demonstrate specific agent capabilities:

**SimpleAgent Class**: The file [`hello_agents/agent/simple_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/hello_agents/agent/simple_agent.py) defines the `SimpleAgent` class, which provides the foundational logic for agent initialization and execution through its `run()` method.

**TerminalTool Utility**: Located in [`hello_agents/tools/builtin/terminal_tool.py`](https://github.com/datawhalechina/hello-agents/blob/main/hello_agents/tools/builtin/terminal_tool.py), this module implements the `TerminalTool` class, enabling agents to execute shell commands via Python's native subprocess capabilities.

**Context Management**: The [`hello_agents/context/builder.py`](https://github.com/datawhalechina/hello-agents/blob/main/hello_agents/context/builder.py) module handles memory and retrieval operations essential for stateful agent interactions, illustrating Python's suitability for complex agent architectures.

## Practical Implementation Examples

The repository contains runnable Python snippets that demonstrate typical usage patterns. Below are implementations derived directly from the source code.

The following example shows how to create a simple agent by extending the `HelloAgentsLLM` base class and implementing the `completion()` method:

```python
from hello_agents.agent import SimpleAgent
from hello_agents.llm import HelloAgentsLLM

class MyLLM(HelloAgentsLLM):
    def completion(self, prompt, **kwargs):
        # Call OpenAI / Azure / local LLM here

        return "model response"

agent = SimpleAgent(llm=MyLLM())
response = agent.run("Explain the concept of ReAct.")
print(response)

```

This pattern is implemented in [`hello_agents/agent/simple_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/hello_agents/agent/simple_agent.py) and serves as the primary entry point for agent creation.

To demonstrate tool integration, the `TerminalTool` allows agents to interact with the system shell:

```python
from hello_agents.tools.builtin.terminal_tool import TerminalTool

terminal = TerminalTool()
result = terminal.run({"command": "ls -1 *.py | head -n 5"})
print("First 5 Python files:", result)

```

This utility, found in [`hello_agents/tools/builtin/terminal_tool.py`](https://github.com/datawhalechina/hello-agents/blob/main/hello_agents/tools/builtin/terminal_tool.py), accepts a dictionary parameter with a `command` key and returns the shell output as a string.

## Summary

- **Python is the exclusive language** used throughout the datawhalechina/hello-agents repository, as stated in [`README_EN.md`](https://github.com/datawhalechina/hello-agents/blob/main/README_EN.md) and evidenced by the `.py` file structure.
- **Core modules** include [`simple_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/simple_agent.py) for agent logic, [`terminal_tool.py`](https://github.com/datawhalechina/hello-agents/blob/main/terminal_tool.py) for system integration, and [`builder.py`](https://github.com/datawhalechina/hello-agents/blob/main/builder.py) for context management.
- **Implementation requires** extending base classes like `HelloAgentsLLM` and utilizing method signatures such as `completion()` and `run()`.
- **Tutorial chapters** (e.g., Chapter 8 and Chapter 9) reference these Python modules to teach progressive agent development concepts.

## Frequently Asked Questions

### Is the datawhalechina/hello-agents repository written entirely in Python?

Yes. The repository is implemented entirely in Python, from the core framework files in `hello_agents/` to tutorial scripts like [`code/chapter9/project/main.py`](https://github.com/datawhalechina/hello-agents/blob/main/code/chapter9/project/main.py) and utility files such as [`fix_bold_format.py`](https://github.com/datawhalechina/hello-agents/blob/main/fix_bold_format.py). The documentation explicitly lists Python as the-required programming language for contributors.

### What Python skills are required to use the hello-agents framework?

According to the [`README_EN.md`](https://github.com/datawhalechina/hello-agents/blob/main/README_EN.md) file, users need "basic Python programming skill" to work with the project. This includes understanding object-oriented concepts to extend classes like `HelloAgentsLLM` and `SimpleAgent`, as well as familiarity with dictionary structures for tool parameter passing.

### Can I integrate hello-agents with existing Python projects?

Yes. The framework is designed as a modular Python package. You can import components directly from the `hello_agents` namespace, such as `from hello_agents.agent import SimpleAgent`, allowing seamless integration with existing Python codebases and virtual environments.

### Where are the main Python source files located in the repository?

The primary source code resides in the `hello_agents/` directory, with key files including [`hello_agents/agent/simple_agent.py`](https://github.com/datawhalechina/hello-agents/blob/main/hello_agents/agent/simple_agent.py) for agent logic and [`hello_agents/tools/builtin/terminal_tool.py`](https://github.com/datawhalechina/hello-agents/blob/main/hello_agents/tools/builtin/terminal_tool.py) for system utilities. Tutorial examples are located in the `code/` directory, organized by chapter.