pim-core is the engine of Knoden PIM, published as Spring Boot libraries: an event bus, storage, security and an AI layer, and a loader for apps packaged as pimi. It is built to be extended, and to be secure: agents aren’t let loose, only storage touches the data, PIM is never given root access, and an app loads only if its checksum or signature checks out.
Java 25, Spring Boot 4.1, Spring AI 2.0, local models through Ollama. Its prompts are AISL skills.
AGPL-3.0: if you ship it, your application’s source goes out under the AGPL too. Code: gitlab.com/knoden/pim-core.
What’s in it
Take only the modules you need (com.knoden.pim.core):
- Event bus (
pim-events-core). Modules work by sending each other messages, not by calling each other. The kernel has no AI dependency. - Storage (
pim-storage-core). Data is kept per person. Other modules store data by sending storage a message over the bus; only storage touches the database or the disk. A file goes into the person’s own folder under the app’s name, and a path that could leave that folder is refused. - Security (
pim-security,pim-profile). Credentials (PBKDF2/BCrypt, lockout), crypto, an optional key store, the encrypted backup format (AES-256-GCM), and who each piece of work acts for, carried across the bus. - AI (
pim-ai-core), the only module that carries Spring AI: conversations, retrieval, memory (what the person chooses to save, recalled by meaning), and agents. An agent has a list of tools it may run freely. Any other tool pauses the run until the person says yes or no, and that answer covers only that one call. By default a run stops after 6 tool calls or 3 minutes. Each turn is kept under a tool budget, because small local models stop calling tools once the system prompt and tool definitions pass about 15,000 characters. - The pimi loader (
pim-workspaces), below.
An app is a pimi
A pimi is an app packaged as a plain jar: its own classes in its own package, its own tables as Flyway migrations, and its own AISL skills. Here is Notes, PIM’s simplest app:
pimi.properties
db/pimi/notes/V1__notes.sql
db/pimi-grants/notes/R__notes_grants.sql
com/knoden/pim/pimi/notes/NotesPimiConfiguration.java
com/knoden/pim/pimi/notes/DefaultNotesEventService.java
com/knoden/pim/pimi/notes/NotesPersistenceEventService.java
com/knoden/pim/pimi/notes/NotesRecord.java
com/knoden/pim/pimi/notes/NotesRepository.java
...
# pimi.properties
id=notes
name=Notes
type=Journal
description=Quick, freeform notes for anything you want to remember.
At startup the loader puts the workspace’s pimi on the class path before Spring scans, so a pimi’s beans are ordinary Spring beans. Nothing loads on trust:
- A pimi loads only if its SHA-256 matches the one configured for it
(
pim.workspaces.trusted.notes=<sha256>) or a publisher-signed catalog vouches for that exact build (ECDSA P-256). - The loader accepts only classes in the pimi’s own package (
com.knoden.pim.pimi.notes) and its generated skills. A library the pimi brings is relocated into its package at build time, so two pimi can’t clash over a library’s version. - The app’s code never depends on the AI stack. Its skills are
.aislfiles, and pim-core’s AI module runs them on request over the bus, on whatever model the application is configured with.
The fifteen apps that come with PIM, from Notes and Calendar to Mail and Finance, are built exactly this way, in pim-apps. They are there to show what a pimi can do, and the pim-apps README explains how a pimi brings its own libraries.
Built on pim-core
- PIM Desktop: one person, on their own computer.
- PIM Multiuser: a household or a team on one computer, each person signing in with their own account.
Get started
The artifacts are in public GitLab package registries, so there’s no token to set up. pim-core depends on AISL, so Gradle needs both registries:
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
exclusiveContent {
forRepository { maven { url = uri("https://gitlab.com/api/v4/projects/86961681/packages/maven") } }
filter { includeGroup("com.knoden.pim.core") }
}
exclusiveContent {
forRepository { maven { url = uri("https://gitlab.com/api/v4/projects/86960067/packages/maven") } }
filter { includeGroup("com.knoden.aisl") }
}
mavenCentral()
}
}
// build.gradle.kts: take only the modules you need, all at the same version
dependencies {
implementation("com.knoden.pim.core:pim-ai-core:0.64.0")
}
Rough edges
- Pre-1.0 (0.64): APIs can still change between minor versions.
- Not on Maven Central yet, hence the repository blocks.
- Agents are for PIM’s own apps so far, not yet for pimi.
Questions and bug reports are welcome as GitLab issues, or write to hello@pim.knoden.com.