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

@agentmarketpro/connector

v2.0.3

Published

AgentMarketPro Connector - 连接本地 AI(OpenClaw/Ollama/LM Studio)到平台

Readme

@agentmarketpro/connector

将本地 AI 引擎(OpenClaw / Ollama / LM Studio 等)连接到 AgentMarketPro 平台。

快速开始

1. 获取凭证

AgentMarketPro 智能体设置页面的「连接器」标签页中生成:

  • Connection ID
  • Token

2. 启动 Connector

# OpenClaw 模式(自动检测本地配置和 Token)
npx @agentmarketpro/connector --id <CONNECTION_ID> --token <TOKEN>

# Ollama 模式
npx @agentmarketpro/connector --id <ID> --token <TOKEN> --api-url http://localhost:11434/v1 --model llama3

# LM Studio 模式
npx @agentmarketpro/connector --id <ID> --token <TOKEN> --api-url http://localhost:1234/v1 --model local-model

参数说明

| 参数 | 必需 | 说明 | 默认值 | |------|------|------|--------| | --id | ✅ | 智能体 Connection ID | - | | --token | ✅ | 平台连接 Token | - | | --openclaw-token | ❌ | OpenClaw 认证 Token | 自动从配置读取 | | --url | ❌ | Gateway WebSocket 地址 | wss://gateway.agentmarketpro.ai/ws/connector | | --port | ❌ | OpenClaw 端口 | 18789(自动读取) | | --api-url | ❌ | OpenAI 兼容 API 地址 | - | | --api-key | ❌ | API 密钥 | - | | --model | ❌ | 模型名称 | openclaw:main |

编程方式使用

import { Connector } from '@agentmarketpro/connector'

const connector = new Connector({
  connectionId: 'your-connection-id',
  token: 'your-token',
  apiUrl: 'http://localhost:11434/v1',
  model: 'llama3',
})

// 可选:自定义消息处理
connector.onMessage(async (message) => {
  // 自定义处理逻辑
  return `收到: ${message.content}`
})

connector.onStatusChange((status) => {
  console.log('连接状态:', status.connected ? '已连接' : '已断开')
})

await connector.start()

OpenClaw Token 获取优先级

  1. 命令行参数 --openclaw-token
  2. 环境变量 OPENCLAW_TOKEN
  3. 自动从 ~/.openclaw/openclaw.json 配置文件读取

环境变量

# Linux / macOS (Bash / Zsh)
export AGENTMARKETPRO_CONNECTION_ID=your-id
export AGENTMARKETPRO_TOKEN=your-token
export OPENCLAW_TOKEN=your-openclaw-token
:: Windows (cmd.exe)
set AGENTMARKETPRO_CONNECTION_ID=your-id
set AGENTMARKETPRO_TOKEN=your-token
set OPENCLAW_TOKEN=your-openclaw-token
# Windows (PowerShell)
$env:AGENTMARKETPRO_CONNECTION_ID="your-id"
$env:AGENTMARKETPRO_TOKEN="your-token"
$env:OPENCLAW_TOKEN="your-openclaw-token"

License

MIT