@bastani/atomic-storage-postgres), all requiring Node.js 24.20 or newer. Each package publishes on npm at Atomic’s version with every release and works independently outside Atomic.
Core libraries
The six core libraries are bundled inside@bastani/atomic and provided to extensions automatically:
@bastani/atomic-ai
One API for every LLM provider: models, auth, streaming, tools, images, classification, and thinking.
@bastani/atomic-agent-core
A stateful agent loop with tool execution, event streaming, steering, and follow-up messages.
@bastani/atomic-tui
A terminal UI framework with differential rendering, alternate-screen viewports, overlays, and key handling.
@bastani/atomic-codemode
A QuickJS WebAssembly sandbox that runs model-written JavaScript whose only capability is calling injected tools.
@bastani/atomic-schema
JSON Schema drafts 2020-12 and 7 builders and validation without
eval, with zero runtime dependencies.@bastani/atomic-telemetry
Vendor-neutral telemetry contracts, metrics, trace rendering, and typed schemas that send nothing on their own.
Storage adapter package
Remote SQL storage is not bundled into@bastani/atomic. Install the optional PostgreSQL adapter only when you store sessions or Intercom multi-node routing in PostgreSQL:
@bastani/atomic-storage-postgres
PostgreSQL 16+ storage adapter (
openPostgresDatabase(), cloud IAM, HTTP proxies, and pooler auto-detection) for shared sessions and Intercom.atomic install npm:@bastani/atomic-storage-postgres. For TypeScript SDK applications, install it with npm install alongside @bastani/atomic (see SDK storage backends).
Native bindings:
@bastani/atomic-natives is an internal N-API native module installed automatically as a runtime dependency of @bastani/atomic (with per-platform binaries in its optionalDependencies) and is not intended as a standalone user library.Install
Install any core library on its own with npm:peerDependencies with a "*" range.
To build on Atomic’s sessions, tools, and extensions rather than bare libraries, use the TypeScript SDK and SDK storage backends. For custom extension UI, start with Build TUI components.
Older package names
These libraries began as forks of pi’s packages. Extensions written for pi still work inside Atomic: imports of@earendil-works/pi-coding-agent and @mariozechner/pi-coding-agent map to @bastani/atomic, while @earendil-works/pi-ai, @earendil-works/pi-tui, @earendil-works/pi-agent-core, @earendil-works/pi-codemode, @earendil-works/pi-schema, @earendil-works/pi-telemetry, their @mariozechner/pi-* equivalents, and @bastani/pi-ai (plus subpaths) map to the matching @bastani/atomic-* package.
Use the @bastani/atomic-* names in new code. The older names resolve only inside Atomic; outside Atomic, install the @bastani/atomic-* packages directly.