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

@aismarttalk/aismarttalk-sdk

v1.4.1

Published

SDK for AiSmartTalk API

Downloads

404

Readme

AI SmartTalk SDK

npm version License: MIT

Official TypeScript SDK for the AI SmartTalk API.

📚 API documentation: https://docs.aismarttalk.tech/docs/api

Install

npm i @aismarttalk/aismarttalk-sdk

Requires Node.js 18+.

Quick start

import { AiSmartTalk } from '@aismarttalk/aismarttalk-sdk';

const client = new AiSmartTalk('your-chat-model-id', 'your-token');

const docs = await client.searchDocuments({ query: 'How do I reset my password?' });

The constructor accepts an optional { baseUrl } for self-hosted instances.

What's covered

  • Documents — search, import, full CRUD (FAQ, document, product)
  • SmartForms — list, fetch, submit (one-by-one or batch), file upload, share links
  • Sequences — multi-form workflows, delegation, batch submit, instance tracking, quiz analysis
  • SmartFlows — execute workflows, list/install/uninstall templates
  • Categories — CRUD on content categories
  • Chat model — configuration, AI models & packs, avatar, theme, biography (versioned + translation)
  • Integrations — list available integrations and connection status
  • Plan & usage — tokens, documents, agents, seats
  • Simple storage — key/value scoped to the chat model
  • CRM — bulk customer import
  • User & permissions — current user, permissions across chat models (OAuth)

Full method list and types are available via TypeScript autocomplete after install. See the API docs for endpoint details.

Examples

SmartForms

const forms = await client.listSmartForms();
const form = await client.getSmartForm('form-id');

// Single-shot submission
await client.batchSubmitSmartForm('form-id', {
    answers: { name: 'Alice', email: '[email protected]' },
    executeWorkflow: true
});

// File field — upload first, then submit the JSON as the answer value
const upload = await client.uploadSmartFormFile('form-id', formData);
await client.batchSubmitSmartForm('form-id', {
    answers: { resume: JSON.stringify(upload.data) }
});

Sequences

const sequences = await client.listSequences({ categoryId: 'cat-id' });

const start = await client.startSequence('seq-id', { email: '[email protected]' });
const next = await client.answerSequenceQuestion('seq-id', start.instanceId, {
    value: 'My answer'
});

// Batch submit an entire sequence
await client.batchSubmitSequence('seq-id', {
    formAnswers: {
        form_a: { company_name: 'Acme' },
        form_b: { contact_email: '[email protected]' }
    }
});

// Quiz scoring with per-answer breakdown
const scored = await client.getSequenceInstanceAnswers('seq-id', start.instanceId);
console.log(scored.summary.overallPercentage, '%');

Documents

const list = await client.listDocuments({ page: 1, limit: 20, statusFilter: 'ACTIVE' });

await client.createDocument({
    type: 'faq',
    question: 'How do I reset my password?',
    answer: 'Go to Settings > Security > Reset Password.'
});

await client.updateDocument('doc-id', { favorite: true });
await client.deleteDocument('doc-id');

Chat model

// Pick a preset model pack (sovereign, openai, custom, …)
await client.applyAIModelPack({ packKey: 'sovereign' });

// Or set models individually
await client.updateAIModels({ aiModelType: 'GPT4O_MINI' });

// Versioned biography
await client.createBiographyVersion({
    configurationType: 'CHAT_ANONYMOUS',
    responseBiography: 'You are a helpful assistant…'
});

Categories

const categories = await client.getCategories();
await client.createCategory({ name: 'Help', type: ['KNOWLEDGE'] });

Error handling

Errors are thrown as { message, status } objects with the API's response message and HTTP status.

try {
    await client.getSmartForm('missing-id');
} catch (err) {
    console.error(err.status, err.message);
}

Development

git clone https://github.com/AI-SmartTalk/aismarttalk-sdk.git
cd aismarttalk-sdk
npm install
npm run build

Integration tests hit a live API. Copy .env.example to .env and fill in the values:

npm run test:integration
npm run test:document
npm run test:sequence
# …etc

Releasing

Pushing a v* tag triggers the Publish to npm GitHub Action. Bump package.json, update CHANGELOG.md, commit, then:

git tag -a vX.Y.Z -m "..."
git push origin vX.Y.Z

The workflow checks that the tag matches package.json before publishing.

License

MIT