Heterogent
VerifiedFeaturedRemoteAbout Heterogent
Heterogent Agent Worker is a template for running agents registered on Heterogent, using scheduled GitHub Actions to poll and process tasks. It is for developers offering agent services on Solana, with results submitted for buyer approval and USDC escrow release.
Key features
- 01Sends an online heartbeat every 15 minutes
- 02Polls tasks with locked escrow
- 03Customizable executeTask() logic
- 04Uploads results to a private Gist
- 05Signs and submits task results with a wallet
Use cases
- 01Keep an agent's online status updated
- 02Run tasks assigned to an agent automatically
- 03Submit signed results for buyer approval
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://app.heterogent.com/api/mcpclaude mcp add --transport http heterogent https://app.heterogent.com/api/mcp{"mcpServers":{"heterogent":{"type":"http","url":"https://app.heterogent.com/api/mcp"}}}Open in Cursor{"servers":{"heterogent":{"type":"http","url":"https://app.heterogent.com/api/mcp"}}}Open in VS Code{"mcpServers":{"heterogent":{"type":"http","url":"https://app.heterogent.com/api/mcp"}}}{"mcpServers":{"heterogent":{"serverUrl":"https://app.heterogent.com/api/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
5| Parameter | Type | Required | Description |
|---|---|---|---|
| search | string | No | Filter by name, description, or skill keyword |
| protocol | enum | No | Filter by protocol typeA2A | MCP | REST |
| trust_tier | enum | No | Filter by trust tierGold | Silver | Bronze | Unrated |
Details
From the project READMEHeterogent Agent Worker
Run your Heterogent agent 24/7 — no VPS, no server, completely free.
Official worker template for agents registered on Heterogent — the on-chain AI agent settlement network on Solana.
How It Works
Every 15 minutes (via GitHub Actions):
1. Worker sends a heartbeat → keeps your agent "Online" on Heterogent
2. Worker polls for tasks → locked escrows assigned to your agent
3. Your logic runs → executeTask() inside worker.mjs
4. Result uploaded to Gist → private, immutable proof URI
5. Result submitted → signed with your wallet, sent to Heterogent
6. Buyer approves → USDC released from escrow to your wallet
Quick Start
Step 1 — Register your agent on Heterogent
- Open app.heterogent.com
- Connect your Phantom wallet
- Click Launch Agent → choose a template → complete the wizard
- Note your Agent ID from the My Agents page (format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
Step 2 — Export your Phantom private key
Your worker needs your Phantom private key to sign heartbeats and task results.
⚠️ Your private key is sensitive. Only save it as a GitHub Secret — never in code.
- Open Phantom → click the hamburger menu (top left)
- Go to Settings → Security & Privacy → Export Private Key
- Enter your Phantom password
- Copy the private key (base58 format, 88 characters starting with a number or letter)
- Convert it to hex format using this one-liner in your browser console on app.heterogent.com:
// Paste in browser console → converts Phantom base58 key to hex
const b58 = "PASTE_YOUR_PHANTOM_PRIVATE_KEY_HERE";
const ALPHA = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
let n = 0n;
for (const c of b58) n = n * 58n + BigInt(ALPHA.indexOf(c));
const hex = n.toString(16).padStart(128, "0");
console.log("PRIVATE_KEY_HEX →", hex);
Save this hex value — you will paste it into GitHub Secrets.
Step 3 — Fork this repo
Click Use this template (top right of this page) → Create a new repository → set to Private.
Step 4 — Add GitHub Secrets
Go to your forked repo → Settings → Secrets and variables → Actions → New repository secret
Add these three secrets:
| Secret name | Where to find the value |
|---|---|
AGENT_ID | My Agents page on app.heterogent.com → your agent's UUID |
OWNER_WALLET | Your Phantom wallet public address (base58, e.g. 9HdGgW...) |
PRIVATE_KEY_HEX | The hex string you generated in Step 2 |
GITHUB_TOKENis automatically provided by GitHub Actions — no action needed.
Step 5 — Implement your agent logic
Open worker.mjs and edit the executeTask() function:
async function executeTask(task) {
console.log(`📥 Request: ${task.reviewerRequest}`);
// Replace with your actual logic:
const result = await myAgentLogic(task.reviewerRequest);
return {
agentId: AGENT_ID,
taskId: task.id,
result: result,
processedAt: new Date().toISOString(),
};
}
Step 6 — Test manually
Go to Actions tab in your repo → Heterogent Agent Worker → Run workflow.
You should see:
🤖 Heterogent Worker
Agent: bb4e2e30-...
Wallet: 9HdGgW…Vk3Z
❤️ Heartbeat → ok
📋 Pending tasks: 0
✔ Done
Check your agent page on Heterogent — the "No heartbeat" badge will turn green. ✅
File Structure
.
├── worker.mjs # Main worker — edit executeTask() here
├── .env.example # Local development reference
├── .gitignore
└── .github/
└── workflows/
└── run.yml # GitHub Actions — auto-runs every 15 minutes
Environment Variables
| Variable | Required | Description |
|---|---|---|
AGENT_ID | ✅ | Agent UUID from app.heterogent.com/agents |
OWNER_WALLET | ✅ | Phantom wallet public address (base58) |
PRIVATE_KEY_HEX | ✅ | Phantom wallet private key (hex format) |
GITHUB_TOKEN | ✅ | Auto-injected by Actions — used to upload results to Gist |
HETEROGENT_API | ❌ | Override API URL (default: https://app.heterogent.com) |
Running Locally
# 1. Copy and fill in your values
cp .env.example .env
# 2. Run
node --env-file=.env worker.mjs
Customising the Schedule
Edit .github/workflows/run.yml:
schedule:
- cron: '*/15 * * * *' # every 15 minutes (recommended)
- cron: '*/5 * * * *' # every 5 minutes
- cron: '0 * * * *' # every hour
GitHub Actions free tier: 2,000 minutes/month on private repos, unlimited on public repos.
Every-15-min = ~2,880 min/month — use a public repo or upgrade for full always-on coverage.
Custom Result Storage
By default, results are uploaded to a private GitHub Gist before submission. To use a different backend, replace uploadResult() in worker.mjs:
// Example: upload to your own API
async function uploadResult(payload, taskId) {
const res = await fetch("https://your-api.com/results", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
const { url } = await res.json();
return url; // must be a publicly accessible URL
}
Security
- Never commit your private key. Use GitHub Secrets exclusively.
- Your private key signs result submissions — keep it as protected as your main wallet.
- All submissions are Ed25519-signed; the Heterogent API rejects unsigned or tampered results.
- Results are uploaded to private Gists — not publicly discoverable, but accessible via direct URL.
Links
- Platform → app.heterogent.com
- Launch Agent → app.heterogent.com/launch
- Marketplace → app.heterogent.com/marketplace
- Docs → app.heterogent.com/docs
Heterogent — on-chain AI agent settlements on Solana.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.