| commit | edae38950adb51b47352b6376d4b569f99f2d1e9 | [log] [tgz] |
|---|---|---|
| author | jinglinwei <weijinglin@sjtu.edu.cn> | Mon Oct 13 01:01:47 2025 +0800 |
| committer | imbajin <jin@apache.org> | Thu Oct 23 22:00:17 2025 +0800 |
| tree | 4697626f59fbee5169d3d3af7ccb3ad433a82b93 | |
| parent | 6ad8fd9ba6ed488923ba7902dfdec7bbc064a53a [diff] |
refactor: port batch build gremlin examples & delete some doc related to Pipeline(old design) & refactor some operator's design and implementation & code format
hugegraph-ai integrates HugeGraph with artificial intelligence capabilities, providing comprehensive support for developers to build AI-powered graph applications.
[!NOTE] For a complete deployment guide and detailed examples, please refer to hugegraph-llm/README.md
# Clone the repository git clone https://github.com/apache/incubator-hugegraph-ai.git cd incubator-hugegraph-ai # Set up environment and start services cp docker/env.template docker/.env # Edit docker/.env to set your PROJECT_PATH cd docker # same as `docker-compose` (Legacy) docker compose -f docker-compose-network.yml up -d # Access services: # - HugeGraph Server: http://localhost:8080 # - RAG Service: http://localhost:8001
# 1. Start HugeGraph Server docker run -itd --name=server -p 8080:8080 hugegraph/hugegraph # 2. Clone and set up the project git clone https://github.com/apache/incubator-hugegraph-ai.git cd incubator-hugegraph-ai # 3. Install dependencies with workspace management # uv sync automatically creates venv (.venv) and installs base dependencies # NOTE: If download is slow, uncomment mirror lines in pyproject.toml or use: uv config --global index.url https://pypi.tuna.tsinghua.edu.cn/simple # Or create local uv.toml with mirror settings to avoid git diff (see uv.toml example in root) uv sync --extra llm # Install LLM-specific dependencies # Or install all optional dependencies: uv sync --all-extras # 4. Activate virtual environment (recommended for easier commands) source .venv/bin/activate # 5. Start the demo (no uv run prefix needed when venv activated) cd hugegraph-llm python -m hugegraph_llm.demo.rag_demo.app # Visit http://127.0.0.1:8001
[!NOTE] Examples assume you've activated the virtual environment with
source .venv/bin/activate
# Install ML dependencies (ml module is not in workspace) uv sync --extra ml source .venv/bin/activate # Run ML algorithms cd hugegraph-ml python examples/your_ml_example.py
Large language model integration for graph applications:
Graph machine learning with 20+ implemented algorithms:
[!NOTE] hugegraph-ml is not part of the workspace but linked via path dependency
Python client for HugeGraph operations:
And here are links of other repositories:
We welcome contributions! Please see our contribution guidelines for details.
[!IMPORTANT] > For project contributors using AI coding tools, please follow these guidelines:
- Start Here: First read
rules/README.mdfor the complete AI-assisted development workflow- Module Context: When
AGENTS.mdexists in any module, rename it as context for your LLM (e.g.,CLAUDE.md,copilot-instructions.md)- Documentation Standards: Follow the structured documentation approach in
rules/prompts/project-general.md- Deep Analysis: For complex features, refer to
rules/prompts/project-deep.mdfor comprehensive code analysis methodology- Code Quality: Maintain consistency with existing patterns and ensure proper type annotations
- Testing: Follow TDD principles and ensure comprehensive test coverage for new features
These guidelines ensure consistent code quality and maintainable development workflow with AI assistance.
Development Setup:
# 1. Clone and navigate to project git clone https://github.com/apache/incubator-hugegraph-ai.git cd incubator-hugegraph-ai # 2. Install all development dependencies # uv sync creates venv automatically and installs base dependencies uv sync --all-extras # Install all optional dependency groups source .venv/bin/activate # Activate for easier command usage # 3. Run tests for workspace members cd hugegraph-llm && pytest cd ../hugegraph-python-client && pytest # 4. Run tests for path dependencies cd ../hugegraph-ml && pytest # If tests exist # 5. Format and lint code ./style/code_format_and_analysis.sh # 6. Add new dependencies to workspace uv add numpy # Add to base dependencies uv add --group dev pytest-mock # Add to dev group
Key Points:
hugegraph-ai is licensed under Apache 2.0 License.