Skip to content

Installation

This page gets you ready to build with the platform. If you just want to see something run, jump to Quickstart after the prerequisites.

  • Node.js 20 or newer. The packages are distributed as ES modules with type declarations and source maps.
  • A package managerpnpm, npm, or yarn. Examples in these docs use pnpm.
  • TypeScript is recommended. The whole platform is schema- and type-driven, so you get full inference on action inputs, outputs, entity data, and configuration out of the box.

Everything is published under the @grundlag/* scope. Install the ones your project needs — @grundlag/core is the foundation that every other package depends on.

Package Install when you…
@grundlag/core Always. It provides the contracts — defineAction, defineProviderType, the registries, Services, and the database helper.
@grundlag/agent …want an LLM-driven agent that calls actions as tools.
@grundlag/sandbox …want to run TypeScript scripts against a set of actions.
@grundlag/server …want to expose registered providers over a typed HTTP API (you compose your own host from this).
@grundlag/client …want to call a running host with a typed client, or run a sandbox or agent against its actions over HTTP.
Terminal window
pnpm add @grundlag/core
# add the consumers you need
pnpm add @grundlag/server

Everything you import from the platform comes from @grundlag/core, which also re-exports z from Zod plus the Migration and JSONColumnType database types. The database database creator has its own entrypoint:

import { defineProviderType, z, Services, ProviderRegistry } from '@grundlag/core';
import { createPgliteCreator } from '@grundlag/core/pglite';

The packages ship compiled JavaScript with type declarations, so they work with your existing setup — no special build configuration is required. Run your program however you normally run a TypeScript project, for example:

Terminal window
# run TypeScript directly during development
pnpm dlx tsx src/start.ts
# …or compile with tsc and run the output with node
node dist/start.js