Skip to main content
Home

@deco/sdk@0.1.2

latest
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
29%
Published
3 months ago (0.1.2)

@deco/sdk

The official SDK for building applications with deco.chat's AI capabilities and integrations.

Overview

The @deco/sdk package provides a comprehensive set of tools and utilities for building applications that leverage various AI models and file system operations. Built with TypeScript and React, it offers a modern and type-safe development experience.

Features

  • Multiple AI Model Support

    • Google Gemini 2.5 Pro
    • Claude 3.7 Sonnet
    • OpenAI GPT-4.1 (and variants)
    • Grok 3 Beta
    • And more...
  • File System Operations

    • Directory reading and management
    • File operations with configurable options
    • Customizable encoding and permissions
  • Integration Management

    • List and manage integrations
    • Tool call handling
    • Custom actor stubs
  • Agent Management

    • Create and manage AI agents
    • List available agents
    • Configure agent capabilities

Installation

npm install @deco/sdk

Usage

Basic Setup

import { SDKProvider } from "@deco/sdk";

function App() {
  return (
    <SDKProvider>
      {/* Your application components */}
    </SDKProvider>
  );
}

Using AI Models

import { useAgents } from "@deco/sdk";

function MyComponent() {
  const { data: agents } = useAgents();

  return (
    <div>
      {agents.map((agent) => (
        <div key={agent.id}>
          <h3>{agent.name}</h3>
          {/* Render agent details */}
        </div>
      ))}
    </div>
  );
}

File System Operations

import { useDirectory } from "@deco/sdk";

function FileExplorer() {
  const { data: directory } = useDirectory("/path/to/directory");

  return (
    <div>
      {directory.map((file) => (
        <div key={file.name}>
          {file.name}
        </div>
      ))}
    </div>
  );
}

Capabilities

The SDK supports various capabilities across different models:

  • Reasoning: Basic AI model capabilities
  • Image Upload: Support for image processing
  • File Upload: File handling capabilities
  • Web Search: Internet search functionality

Development

The SDK is built with:

  • TypeScript
  • React 19
  • TanStack Query
  • Zod for validation

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the terms of the Apache license.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@deco/sdk

Import symbol

import * as sdk from "@deco/sdk";
or

Import directly with a jsr specifier

import * as sdk from "jsr:@deco/sdk";

Add Package

pnpm i jsr:@deco/sdk
or (using pnpm 10.8 or older)
pnpm dlx jsr add @deco/sdk

Import symbol

import * as sdk from "@deco/sdk";

Add Package

yarn add jsr:@deco/sdk
or (using Yarn 4.8 or older)
yarn dlx jsr add @deco/sdk

Import symbol

import * as sdk from "@deco/sdk";

Add Package

vlt install jsr:@deco/sdk

Import symbol

import * as sdk from "@deco/sdk";

Add Package

npx jsr add @deco/sdk

Import symbol

import * as sdk from "@deco/sdk";

Add Package

bunx jsr add @deco/sdk

Import symbol

import * as sdk from "@deco/sdk";