Hedera Agent Kit
Configuration
Configure the ClawPay Hedera Agent Kit plugin for testnet or mainnet
Default Configuration
By default, the plugin connects to Hedera Testnet with the ClawPay AgentRegistry contract. No configuration needed for testnet:
import { clawPayPlugin } from "@clawpay-hedera/hak-plugin";
// Uses testnet defaults — ready to go
const toolkit = new HederaLangchainToolkit({
client,
configuration: { plugins: [clawPayPlugin] },
});Custom Configuration
Override any config option using createClawPayPlugin():
import { createClawPayPlugin } from "@clawpay-hedera/hak-plugin";
const plugin = createClawPayPlugin({
network: "mainnet",
registryAddress: "0x...",
operatorId: "0.0.xxxxx",
operatorKey: process.env.HEDERA_OPERATOR_KEY,
facilitatorFeePayer: "0.0.7162784",
});Environment Variables
The plugin reads these environment variables as fallbacks:
| Variable | Description | Default |
|---|---|---|
HEDERA_OPERATOR_ID | Your Hedera account ID | 0.0.6514537 (testnet) |
HEDERA_OPERATOR_KEY | ECDSA private key (hex) | — |
Config Options
| Option | Type | Default | Description |
|---|---|---|---|
network | "testnet" | "mainnet" | "testnet" | Hedera network to use |
registryAddress | 0x${string} | 0x4112...02b | AgentRegistry contract address |
rpcUrl | string | https://testnet.hashio.io/api | JSON-RPC endpoint |
reputationTopicId | string | 0.0.8107518 | HCS topic for reputation logs |
paymentTopicId | string | 0.0.8058213 | HCS topic for payment logs |
operatorId | string | from env | Hedera account ID for transactions |
operatorKey | string | from env | ECDSA private key for signing |
facilitatorFeePayer | string | 0.0.7162784 | Blocky402 facilitator fee payer |
Standalone Usage
The plugin can also be used without Hedera Agent Kit — the tools array works with any LangChain setup:
import { createClawPayPlugin } from "@clawpay-hedera/hak-plugin";
const plugin = createClawPayPlugin();
const tools = plugin.tools();
// Use tools directly
const agents = await tools[0].execute({ toolName: "hedera_account_deep_dive" });