AI-powered workflows from your own codebase

Turn real backend functions into reusable, shareable workflows — created with AI, validated by code, and executed from a secure dashboard.

terminal
$ npm install @sashimo/lib
+ @sashimo/lib@6.4.0
$ node
> import { AIFunction, registerFunctionIntoAI } from '@sashimo/lib';
> const getInactiveUsers = new AIFunction("get_inactive_users", "get users inactive for 30+ days")
> .args()
> .returns({ name: "users", type: "array", description: "inactive users" })
> .implement(async () => {
> const thirtyDaysAgo = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000);
> return await db.users.findMany({ where: { lastLogin: { lt: thirtyDaysAgo } } });
> });
> registerFunctionIntoAI("get_inactive_users", getInactiveUsers);
Function registered successfully! Use it in the Sashi chat interface to create workflows.

What is Sashi?

Sashi is a workflow automation system built for growing tech teams. Instead of building custom admin tools and internal dashboards, connect your existing backend functions to AI-powered workflows that your entire team can use.

Perfect for early-stage companies that need powerful internal tools but want to focus engineering resources on core product development. Your backend code becomes instantly accessible to non-technical team members through natural language commands and automated workflows.

Installation

npm install @sashimo/lib

Quick Setup

import express from 'express';
import { createMiddleware } from '@sashimo/lib';

const app = express();

app.use('/sashi', createMiddleware({
  openAIKey: process.env.OPENAI_API_KEY || "",
  sashiServerUrl: "https://your-hub-url.com",
  apiSecretKey: "your-secret-key"
}));

// Your app is now Sashi-enabled!
// Access the admin interface at: http://yourwebsite.com/sashi/bot

Key Features

Everything you need to automate workflows without glue code

Function Registration Interface

Declaratively expose your backend functions with AIFunction and AIObject APIs. Define inputs, outputs, and validation once.

Workflow Execution Runtime

Run complex workflows with simple commands. Chain functions together with automatic data flow and error handling.

UI Metadata Hooks

Auto-generate beautiful interfaces based on your function return types. Tables, forms, and visualizations created automatically.

AI-Powered Chat

Execute admin tasks with natural language commands. AI understands your registered functions and creates workflows automatically.

Secure & Reliable

Built-in support for sensitive function confirmation, API token management, and secure workflow execution.

How It Works

1

Register Your Functions

Developers register backend functions using the AIFunction and AIObject APIs. Define inputs, outputs, and descriptions once - your existing code becomes instantly accessible to the AI workflow system.

2

Functions Become Building Blocks

Your registered functions automatically become available as building blocks in the workflow system. Users can see all available functions and understand what each one does through AI-generated documentation.

3

AI Creates Workflows

Users describe what they want to accomplish in plain English. The AI analyzes your registered functions and automatically creates workflows that chain them together with proper data flow.

4

Execute & Visualize

Workflows execute with automatic error handling, data passing between functions, and real-time progress tracking. Results are displayed with auto-generated UIs - no additional code required.

The Workflow System

Your registered functions become building blocks that users can connect together into powerful automated workflows

Functions as Building Blocks

Once you register your functions with Sashi, they automatically become available for use in workflows. Each function becomes a reusable building block that can be:

  • Chained together in sequences
  • Connected with automatic data flow
  • Saved and reused across teams
  • Executed with a single click
1
Get Inactive Users
2
Send Email Campaign
3
Log Campaign Results

What You Need To Do:

Register functions using AIFunction
Define proper input/output types
Write clear function descriptions

Sashi Handles:

Workflow storage & execution
Data flow between functions
UI generation & visualization
Error handling & monitoring

Zero Additional Code

The workflow system handles all the complex parts automatically. You focus on your business logic, while Sashi manages workflow orchestration, data flow, UI generation, and team collaboration.

Automatically handled by Sashi

How It Looks

Sashi integrates seamlessly with your application, providing a powerful admin interface

sashi-chat

Chat Interface

Hello! I'm Sashi. How can I help you today?

Can you show me all inactive users?

U

I'll get that for you. Running get_inactive_users...

Inactive Users (23)

• john.doe@example.com (Last login: 45 days ago)

• sarah.smith@example.com (Last login: 32 days ago)

• mike.jones@example.com (Last login: 60 days ago)

+ 20 more users

Send them all a reminder email

U
sashi-dashboard

Workflow Dashboard

My Workflows

Inactive User Reminder

Created 2 days ago • Run 5 times

get_inactive_userssend_reminder_email
Weekly Usage Report

Created 1 week ago • Run 3 times

generate_usage_statscreate_report
User Onboarding

Created 3 days ago • Run 12 times

create_userassign_rolesend_welcome

See it in action

Explore how Sashi can transform your workflow

import { AIFunction, AIObject, AIFieldEnum, registerFunctionIntoAI } from "@sashimo/lib";

// Define a User object with multiple fields
const UserObject = new AIObject("User", "a user in the system")
  .field({
    name: "id",
    description: "unique user identifier",
    type: "number",
    required: true
  })
  .field({
    name: "email",
    description: "the email of the user",
    type: "string",
    required: true
  })
  .field({
    name: "status",
    description: "current user status",
    type: "string",
    required: false
  });

// Function to get user by ID
const GetUserByIdFunction = new AIFunction("get_user_by_id", "get a user by id")
  .args({
    name: "userId",
    description: "a user's id",
    type: "number",
    required: true
  })
  .returns(UserObject)
  .implement(async (userId: number) => {
    const user = await getUserById(userId);
    return user;
  });

// Function with enum parameter
const ChangeUserRoleFunction = new AIFunction("change_user_role", "change a user's role")
  .args(
    {
      name: "userId",
      description: "user's id",
      type: "number",
      required: true
    },
    new AIFieldEnum(
      "role",
      "the role to assign",
      ["ADMIN", "USER", "MODERATOR"],
      true
    )
  )
  .returns({
    name: "success",
    description: "operation result",
    type: "boolean"
  })
  .implement(async (userId: number, role: string) => {
    await updateUserRole(userId, role);
    return true;
  });

// Register functions
registerFunctionIntoAI("get_user_by_id", GetUserByIdFunction);
registerFunctionIntoAI("change_user_role", ChangeUserRoleFunction);

Use Cases

Sashi works for everyone on your team

For Support Teams

"Refund a user" — support triggers backend logic via dashboard

"Reset user password" — execute securely without developer involvement

"Check user subscription status" — get real-time data without SQL

For Product Managers

"Send weekly usage report to Slack" — PM builds it with AI

"Generate monthly metrics dashboard" — automated reporting

"Find users who abandoned signup" — create targeted campaigns

For DevOps

"Spin up a preview env" — DevOps saves it as a repeatable workflow

"Rotate API keys" — automate security tasks safely

"Check system health" — run diagnostics across services

For Developers

"Run incident response checklist" — on-call engineer triggers it from chat

"Debug user issue" — quickly access logs and state without context switching

"Migrate test data" — automate repetitive development tasks

Why It's Different

Real Code Integration

Designed for real code, not just third-party tools. Works with your existing codebase.

Your Stack, Your Infra

Works with your stack and infrastructure, no black-box magic or vendor lock-in.

No Admin Panels

No need to build or maintain internal admin panels. Sashi generates UIs automatically.

Secure By Design

Secure by design with scoped API tokens and server-side execution. No security compromises.

Ready to automate workflows without glue code?

Join the early access beta and connect your code to your team.