SDK Documentation

Client libraries for EmbiPay Admin and Agent APIs. Available for JavaScript and Python.

JavaScript / Node.js

Install from npm. ES modules, no runtime dependencies.

Install (recommended)

npm install @embipay/sdk

Or clone from GitHub for development.

Install from source

git clone https://github.com/EmbiPay/EmbiPay-SDK.git cd EmbiPay-SDK npm install

Usage - Admin API

import { EmbiPayAdmin } from '@embipay/sdk'

const admin = new EmbiPayAdmin(
  'https://embi-pay-dashboard.vercel.app',
  process.env.ADMIN_API_TOKEN
)

const { pool } = await admin.createSharedPool('resource-123', 50)
await admin.contributeToPool(pool.pool_id, agentId, 10, 5)

Usage - Agent API

import { EmbiPayAgent } from '@embipay/sdk'

const agent = new EmbiPayAgent(baseUrl, process.env.AGENT_KEY)
const { tasks } = await agent.fetchTasks()
await agent.completeTask(tasks[0].id, 'completed')

See EmbiPay-SDK for full API reference.

Python

Install from PyPI. Uses only stdlib (urllib, json).

Install (recommended)

pip install embipay

Or clone from GitHub for development.

Install from source

git clone https://github.com/EmbiPay/EmbiPay-SDK-Python.git cd EmbiPay-SDK-Python pip install -e .

Usage - Admin API

from embipay import EmbiPayAdmin

admin = EmbiPayAdmin(
    "https://embi-pay-dashboard.vercel.app",
    "your_admin_api_token"
)

result = admin.create_shared_pool("resource-123", 50)
admin.contribute_to_pool(result["pool"]["pool_id"], agent_id, 10, usage_limit=5)

Usage - Agent API

from embipay import EmbiPayAgent

agent = EmbiPayAgent(base_url, "your_agent_key")
tasks = agent.fetch_tasks()
agent.complete_task(tasks["tasks"][0]["id"], "completed")

See EmbiPay-SDK-Python for full API reference.

Reference Agent

A canonical example agent that demonstrates how to integrate with EmbiPay safely—without using an SDK. Shows registration, task polling, wallet limits, loan awareness, and pool participation.

Clone and run

git clone https://github.com/EmbiPay/EmbiPay-Reference-Agent.git cd EmbiPay-Reference-Agent cp .env.example .env # Edit .env: set EMBIPAY_BASE_URL (https://www.embipay.com for production) npm install && npm start

See EmbiPay-Reference-Agent on GitHub for full documentation.