npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@meetloyd/client

v0.1.0

Published

Official TypeScript SDK for MeetLoyd - The Platform for the Agentic Era

Readme

@meetloyd/client

Official TypeScript SDK for MeetLoyd - The Platform for the Agentic Era.

Installation

npm install @meetloyd/client
# or
bun add @meetloyd/client

Quick Start

import { MeetLoyd } from '@meetloyd/client'

const client = new MeetLoyd({
  apiKey: 'your-api-key',
  baseUrl: 'https://api.meetloyd.com', // optional, defaults to localhost:4000
})

// Execute an agent
const run = await client.agents.execute('agent_xyz', 'Hello, how can you help me?')
console.log(run.output)

Features

Agent Management

// List all agents
const { agents } = await client.agents.list()

// Create an agent
const agent = await client.agents.create({
  name: 'Support Bot',
  model: 'claude-sonnet-4-20250514',
  systemPrompt: 'You are a helpful support assistant.',
})

// Update an agent
await client.agents.update(agent.id, { name: 'Customer Support' })

// Pause/Resume
await client.agents.pause(agent.id)
await client.agents.resume(agent.id)

// Delete
await client.agents.delete(agent.id)

Conversations with Streaming

// Create a conversation
const conversation = await client.conversations.create({
  agentId: 'agent_xyz',
  title: 'Customer inquiry',
})

// Stream responses (real-time)
for await (const event of client.conversations.stream(conversation.id, 'What is 2+2?')) {
  switch (event.type) {
    case 'token':
      process.stdout.write(event.token)
      break
    case 'tool_call':
      console.log('\nTool called:', event.toolCall.name)
      break
    case 'done':
      console.log('\nTokens used:', event.data.tokenUsage.total)
      break
  }
}

// Or get the full response
const response = await client.conversations.send(conversation.id, 'Hello!')
console.log(response.content)

Usage Tracking

// Get usage summary
const summary = await client.usage.summary()
console.log(`Tokens used: ${summary.usage.tokens.quantity}`)
console.log(`Total cost: $${summary.usage.total.cost.toFixed(4)}`)

// Daily breakdown
const daily = await client.usage.daily(30) // Last 30 days
for (const day of daily.breakdown) {
  console.log(`${day.date}: ${day.tokens} tokens, $${day.cost.toFixed(4)}`)
}

// By agent
const byAgent = await client.usage.byAgent()
for (const agent of byAgent.breakdown) {
  console.log(`${agent.agentId}: ${agent.requests} requests`)
}

API Reference

MeetLoyd

The main client class.

new MeetLoyd({
  apiKey: string,      // Your API key
  baseUrl?: string,    // API base URL (default: http://localhost:4000)
  timeout?: number,    // Request timeout in ms (default: 30000)
})

client.agents

| Method | Description | |--------|-------------| | list(options?) | List all agents | | get(id) | Get agent by ID | | create(data) | Create a new agent | | update(id, data) | Update an agent | | delete(id) | Delete an agent | | execute(id, message, options?) | Execute an agent | | runs(id, options?) | Get execution history | | pause(id) | Pause an agent | | resume(id) | Resume an agent |

client.conversations

| Method | Description | |--------|-------------| | create(data) | Create a conversation | | get(id) | Get conversation with messages | | listByAgent(agentId, options?) | List conversations for an agent | | delete(id) | Delete a conversation | | stream(id, message, options?) | Send message and stream response | | send(id, message, options?) | Send message and get full response |

client.usage

| Method | Description | |--------|-------------| | summary() | Get usage summary | | history(options?) | Get detailed usage records | | daily(days?) | Get daily breakdown | | byAgent() | Get usage by agent |

Error Handling

import { MeetLoyd, MeetLoydError } from '@meetloyd/client'

try {
  await client.agents.get('invalid-id')
} catch (error) {
  if (error instanceof MeetLoydError) {
    console.log('Status:', error.status)
    console.log('Message:', error.message)
    console.log('Code:', error.code)
  }
}

TypeScript

Full TypeScript support with exported types:

import type { Agent, AgentRun, StreamEvent } from '@meetloyd/client'

License

MIT