Skip to content

pabloleaf/plugin-targe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@targe/plugin-eliza

LLM token sharing for ElizaOS agents. Call Claude, GPT, or Gemini via Targe's pool proxy — pay per token in USDC on Base, no API key required. Register your idle LLM key and earn USDC per token served.

The self-funding loop: Earnings from key sharing credit the same wallet your agent uses for pool calls. No transfer step. Share enough capacity and your agent's LLM usage costs nothing — permanently.

Note: elizaOS already operates x402.elizaos.ai. Targe is built on the same x402 payment standard.

Actions

Action Description
TARGE_CALL_POOL Call Claude/GPT/Gemini via Targe pool. USDC per token, drop-in API format.
TARGE_REGISTER_KEY Share an idle LLM key. Earn 90% of token revenue in USDC.
TARGE_CHECK_BALANCE Check agent's USDC balance and deposit address.
TARGE_CHECK_EARNINGS Check USDC earned from a shared key.

Provider

TARGE_CONTEXT — injected into every message context: current pool size, cheapest available model, agent balance. Agent stays aware of Targe status without polling.

Quick Start

1. Install

npx elizaos plugins add @targe/plugin-eliza

2. Configure

# .env
TARGE_PRIVATE_KEY=0xYourBaseWalletPrivateKey

3. Fund wallet

Register your agent and deposit USDC to the returned address:

curl -X POST https://api.targe.io/agent/register \
  -H "Content-Type: application/json" \
  -d '{"address":"0xYourWallet","signature":"0xSig","timestamp":1234567890000}'
# Returns: { agent: { address, reputationScore, ... } }
# Send USDC on Base to: GET https://api.targe.io/agent/deposit-address

4. Add to character

{
  "name": "MyAgent",
  "plugins": ["@targe/plugin-eliza"],
  "settings": {
    "TARGE_PRIVATE_KEY": "0x..."
  }
}

5. Call the pool

The agent can now respond to natural language:

"Use Targe to ask Claude to summarise this document"
"Call GPT via Targe pool"
"Check my Targe balance"

Or trigger directly:

await runtime.processAction('TARGE_CALL_POOL', {
  provider: 'anthropic',
  model: 'claude-haiku-4-5-20251001',
  messages: [{ role: 'user', content: 'Hello' }]
});

The Self-Funding Loop

If your agent has an idle Anthropic, OpenAI, or Google API key:

await runtime.processAction('TARGE_REGISTER_KEY', {
  llmProvider: 'anthropic',
  apiKey: 'sk-ant-...',
  models: ['claude-haiku-4-5-20251001'],
  markupPercent: 20
});

Earnings accumulate in your agent's wallet. The same wallet pays for pool calls. No transfer needed. Once earning exceeds spending — your agent reasons for free.

Network

  • Chain: Base Mainnet (eip155:8453)
  • Payment: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
  • Revenue split: 90% to key owner, 10% to Targe
  • Auth: EIP-191 wallet signature — wallet = identity = balance

Links

License

MIT

About

ElizaOS plugin for Targe LLM token sharing — call Claude/GPT/Gemini via USDC micropayments, earn from idle keys

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors