New:Socket for Asana Is Now Available.Learn more
Get Started

linforge-adapter-prisma

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linforge-adapter-prisma

Prisma adapter for Linforge — production-ready Store implementations backed by Prisma ORM

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
5
150%
Maintainers
1
Weekly downloads
 
Created
Source

linforge-adapter-prisma

Prisma adapter for Linforge — production-ready Store implementations backed by Prisma ORM.

Install

npm install linforge-adapter-prisma
# peer dependencies
npm install linforge @prisma/client

Setup

1. Add Prisma models

Copy the models from prisma/schema.prisma into your project's Prisma schema, then run:

npx prisma db push   # or prisma migrate dev

2. Use with linforgeMiddleware

import { linforgeMiddleware } from 'linforge/server';
import { createPrismaStores } from 'linforge-adapter-prisma';
import { PrismaClient } from '@prisma/client';

const prisma = new PrismaClient();

app.use(linforgeMiddleware({
  stateSchema: MyState,
  nodes: [planner, tools],
  stores: createPrismaStores(prisma),
}));

3. Selective stores (optional)

// Only use GraphStore + RunStore, skip step recording and prompt management
const stores = createPrismaStores(prisma, {
  stepPersister: false,
  promptStore: false,
});

Exports

ExportDescription
createPrismaStores(prisma, options?)Factory — creates all 4 stores in one call
PrismaGraphStoreGraphStore implementation
PrismaRunStoreRunStore implementation
PrismaStepPersisterStepPersister implementation
PrismaPromptStorePromptStore implementation
PrismaClientLikeMinimal PrismaClient type interface

Database Support

The adapter uses JSON.stringify / JSON.parse for JSON fields, compatible with:

  • PostgreSQL (native JSON/JSONB)
  • MySQL (native JSON)
  • SQLite (stored as TEXT)

License

MIT

Keywords

linforge

FAQs

Package last updated on 27 Feb 2026

Related posts