Skip to content
anuma-aiPublic

About

A TypeScript SDK for building AI-powered applications with streaming chat completions, long-term memory, tool calling, and end-to-end encryption.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

726 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anuma SDK

A TypeScript SDK for building AI-powered applications with streaming chat completions, long-term memory, tool calling, and end-to-end encryption.

To learn more, check out the Documentation.

Installation

npm install @anuma/sdk

Testing prereleases

Stable releases go to the default latest tag (the command above). Prerelease builds for trying out unreleased changes are published to the next tag — install them explicitly:

npm install @anuma/sdk@next

These carry a X.Y.Z-next.<timestamp> version and never affect latest. Maintainers publish them on demand via the Publish Next (prerelease) GitHub Actions workflow.

Getting Started

Create an app on the Anuma Dashboard to get your API key or configure Privy authentication.

Usage

React Hooks

import { useChat } from "@anuma/sdk/react";

const { sendMessage, isLoading, stop } = useChat({
  getToken: async () => token,
  onData: (chunk) => console.log(chunk),
});

await sendMessage({
  messages: [{ role: "user", content: [{ type: "text", text: "Hello!" }] }],
  model: "fireworks/accounts/fireworks/models/kimi-k2p5",
});

API Functions

import { postApiV1Responses } from "@anuma/sdk/client";

const response = await postApiV1Responses({
  body: {
    messages: [
      { role: "user", content: [{ type: "text", text: "Hello!" }] },
    ],
    model: "fireworks/accounts/fireworks/models/kimi-k2p5",
  },
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});

Platforms

The SDK provides entry points for different platforms:

  • @anuma/sdk/react — React hooks
  • @anuma/sdk/expo — React Native / Expo
  • @anuma/sdk/client — Generated API client and types

iCloud backups

Add a backupRevision field with type String to the ConversationBackup record type in the development schema. Deploy the schema to production before you release a client that uses iCloud backup.

The SDK compares this saved revision with the local conversation and message data. The next backup replaces older files that have no saved revision.

Features

The SDK gives you access to a unified API across multiple LLM providers through a single integration. Key capabilities include:

  • Streaming chat completions with tool calling and auto-execution
  • Extended thinking and reasoning support
  • Long-term memory with semantic search and encrypted storage
  • Best-effort client-side PII redaction (see PII_REDACTION.md)
  • Voice recording and transcription via Whisper
  • PDF and image text extraction (OCR)
  • Phone call integration
  • End-to-end encryption with wallet-based key management
  • Credit and subscription management

Documentation

https://docs.anuma.ai/

Contributing

Contributions are welcome. Please open an issue or pull request on GitHub.

Before opening a PR, run pnpm test and pnpm check.

Tool, app-generation and slide e2e tests

pnpm e2e:tools runs the live-model tests in test/tools/ and test/classifier/ (vitest.e2e.config.mts) against a real portal. Copy .env.example to .env and set PORTAL_API_KEY (and ANUMA_API_URL to point at a portal other than dev). Pass a file-name filter to run a subset:

pnpm e2e:tools              # everything
pnpm e2e:tools weather      # test/tools/weather.ts only
pnpm e2e:tools slide        # the slide-generation tests

CI runs the same suite on PRs that touch the tool, app-generation or slide code (see the changes job in .github/workflows/e2e-tools.yml for the exact paths) and again in the merge queue. PRs without access to the PORTAL_API_KEY secret (forks, Dependabot) skip it and get their result in the queue. On a PR the result is advisory; the queue run is the one that blocks.

About

A TypeScript SDK for building AI-powered applications with streaming chat completions, long-term memory, tool calling, and end-to-end encryption.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages