Python β₯3.10 License: Apache 2.0
This is the Python edition of the Hedera Agent Kit for TypeScript/JavaScript.
It will provide a flexible and extensible framework for building AI-powered Hedera agents.
Planned features include:
-
π Third-party plugin support
-
π§ Integration with LangChain, MCP, and other AI frameworks
-
πͺ Tools for interacting with Hedera services, including:
- Token creation and management
- Smart contract execution
- Account operations
- Topic (HCS) creation and messaging
Before you begin, make sure you have Python β₯3.10 and Poetry installed.
Note: This project currently depends on a not-yet-released version of the Hiero SDK for Python. Youβll need to clone and set it up locally before installing the Hedera Agent Kit.
# Clone both repositories into the same directory
git clone https://github.com/hiero-ledger/hiero-sdk-python.git
git clone https://github.com/hashgraph/hedera-agent-kit-py.gitYour directory structure should look like this:
.
βββ hiero-sdk-python/
βββ hedera-agent-kit-py/
βββ python/
βββ hedera_agent_kit_py/
β βββ ... (core SDK modules)
βββ examples/
β βββ langchain/
β βββ plugin_tool_calling_agent.py
β βββ pyproject.toml β LangChain example project
βββ pyproject.toml β Main SDK project
βββ poetry.lock
cd hiero-sdk-python
# Upgrade pip and install dependencies in editable mode
pip install --upgrade pip
pip install -e .
# Generate protocol buffer files (required)
python generate_proto.py
# or, if using uv
# uv run python generate_proto.pyThis prepares the Hiero SDK so it can be used as a local dependency by the Hedera Agent Kit.
cd ../hedera-agent-kit-py/python
poetry installThis will:
- Create a Poetry-managed virtual environment
- Install all dependencies
- Link the local
hiero-sdk-pythonin editable mode
The LangChain example requires API keys and credentials to connect to Hedera and OpenAI.
Copy the example file and edit your own .env:
cd examples/langchain
cp .env.example .envThen open .env and fill in your details:
ACCOUNT_ID="0.0." # your operator account ID from https://portal.hedera.com/dashboard
PRIVATE_KEY="303..." # ECDSA encoded private key
OPENAI_API_KEY="sk-proj-" # your OpenAI API key
β οΈ Never commit your.envfile β it contains sensitive credentials.
poetry install
poetry run python plugin_tool_calling_agent.pyThis launches the example agent, demonstrating how to use the Hedera Agent Kit with LangChain tools and plugins.
hedera-agent-kit-py/python/examples/langchain β hedera-agent-kit-py/python/hedera_agent_kit_py β ../hiero-sdk-python
This plugin provides tools for Hedera Account Service operations:
| Tool Name | Description | Usage |
|---|
This plugin provides tools for fetching Account Service (HAS) related information from Hedera Mirror Node.
| Tool Name | Description | Usage |
|---|
A plugin for Consensus Service (HCS), enabling creation and posting to topics.
| Tool Name | Description | Usage |
|---|
This plugin provides tools for fetching Consensus Service (HCS) related information from Hedera Mirror Node.
| Tool Name | Description | Usage |
|---|
A plugin for the Hedera Token Service (HTS), enabling creation and management of fungible and non-fungible tokens.
| Tool Name | Description | Usage |
|---|
This plugin provides tools for fetching Token Service (HTS) related information from Hedera Mirror Node.
| Tool Name | Description | Usage |
|---|
This plugin provides tools for interacting with EVM smart contracts on Hedera, including creating and managing ERC-20 and ERC-721 tokens via on-chain factory contracts and standard function calls.
| Tool Name | Description | Usage |
|---|
This plugin provides tools for fetching EVM smart contract-related information from Hedera Mirror Node.
| Tool Name | Description | Usage |
|---|
Tools for transaction-related operations on Hedera.
| Tool Name | Description | Usage |
|---|
This plugin provides tools for fetching miscellaneous information from the Hedera Mirror Node.
| Tool Name | Description | Usage |
|---|
Scheduled transactions are not separate tools β they use the same tools you already know, but with additional optional parameters passed in a
schedulingParams object.
From the user's perspective, scheduling simply means asking to execute a transaction later, or once all signatures are collected, instead of immediately.
If schedulingParams.isScheduled is false or omitted, all other scheduling parameters are ignored.
Example usage in plain english
Schedule a mint for token 0.0.5005 with metadata https://example.com/nft/1.json
Schedule Mint 0.0.5005 with metadata: ipfs://baf/metadata.json. Make it expire at 11.11.2025 10:00:00 and wait for its expiration time with executing it.
Schedule mint for token 0.0.5005 with URI ipfs://QmTest123 and use my operator key as admin key
Schedule mint NFT 0.0.5005 with metadata https://example.com/nft.json and set admin key to 302a300506032b6570032100e0c8ec2758a5879ffac226a13c0c516b799e72e35141a0dd828f94d37988a4b7
Schedule mint NFT for token 0.0.5005 with metadata ipfs://QmTest456 and let account 0.0.1234 pay for it