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.
Prerequisites
Section titled “Prerequisites”- Node.js 20 or newer. The packages are distributed as ES modules with type declarations and source maps.
- A package manager —
pnpm,npm, oryarn. Examples in these docs usepnpm. - 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.
The packages
Section titled “The packages”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. |
pnpm add @grundlag/core# add the consumers you needpnpm add @grundlag/serverEverything 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';Running your code
Section titled “Running your code”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:
# run TypeScript directly during developmentpnpm dlx tsx src/start.ts
# …or compile with tsc and run the output with nodenode dist/start.jsNext steps
Section titled “Next steps”- Quickstart — see the platform work end to end in about five minutes.
- Build your first provider — a numbered lesson from an empty file to an action invoked over HTTP.
- Architecture — the layered model behind the packages.