peerline-ai
v0.2.5
Published
Programmatic SDK for spawning and managing Peerline seller nodes
Downloads
21
Readme
peerline-ai
Programmatic SDK for spawning, managing, and orchestrating Peerline seller nodes and AI service offerings.
The Peerline SDK provides a clean, declarative, and fluent API for defining AI service offerings (inference, agents, tools) and running multi-node simulations or production seller nodes directly from Node.js code.
Installation
npm install peerline-aiQuick Start
import { Network, Offering } from 'peerline-ai';
const net = new Network({
apiKey: 'sk-or-v1-...',
registryUrl: 'http://0.0.0.0:9000'
});
net.addSeller({
peerId: 'peer-llama-3-node',
offerings: [
new Offering('inference')
.name('Llama 3 8B Instruct')
.description('Fast open-source model perfect for basic tasks.')
.services(['llama-3-8b'])
.pricing({ inputUsdPerMillion: 0.05, outputUsdPerMillion: 0.05 })
.upstreamModel('meta-llama/llama-3-8b-instruct:free')
]
});
await net.start();