Busabase
Busabase is an open-source (MIT) database and workspace for AI agents — data, docs, skills, and apps in one place. Run it locally, self-host it inside your network, or use Busabase Cloud, and turn age
翻譯準備中
The low-code Knowledge Graph application platform. Apache license.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗LinkedDataHub (LDH) is open source software you can use to manage data, create visualizations and build apps on RDF Knowledge Graphs.
Version 6 redraws the interface on a design system that ships with the platform: the app shell, content blocks, action bar, property lists, tables, modals and forms all render one class vocabulary, and ldh.css is the single app layer a dataspace stylesheet overrides. Bootstrap 2 is gone with the bs2: template modes — the CHANGELOG has what that means for an application stylesheet written against it.
We started the project with the intention to use it for Linked Data publishing, but gradually realized that we've built a multi-purpose data-driven platform.
We are building LinkedDataHub primarily for:
What makes LinkedDataHub unique is its completely data-driven architecture: applications and documents are defined as data, managed using a single generic HTTP API and presented using declarative technologies. The default application structure and user interface are provided, but they can be completely overridden and customized. Unless a custom server-side processing is required, no imperative code such as Java or JavaScript needs to be involved at all.
XHTML documents can be edited in-place using a built-in RDFa-aware rich text editor — annotations link selected text directly to Knowledge Graph terms, embedding machine-readable RDF statements in the markup without leaving the page.
Follow the Get started guide to LinkedDataHub. The setup and basic configuration sections are provided below and should get you running.
LinkedDataHub is also available as a free AWS Marketplace product!
It takes a few clicks and filling out a form to install the product into your own AWS account. No manual setup or configuration necessary!
bash shell 4.x. It should be included by default on Linux. On Windows you can install the Windows Subsystem for Linux.The ldh command line interface is attached to every release and needs only a Java 21 runtime; building it from source additionally requires Maven. The certificate and WebID scripts that remain in the bin/ directory require openssl and keytool (part of the JDK).
Fork this repository and clone the fork into a folder
In the folder, create an .env file and fill out the missing values (you can use .env_sample as a template). For example:
COMPOSE_CONVERT_WINDOWS_PATHS=1
COMPOSE_PROJECT_NAME=linkeddatahub
PROTOCOL=https
HTTP_PORT=81
HTTPS_PORT=4443
HOST=localhost
[email protected]
OWNER_GIVEN_NAME=John
OWNER_FAMILY_NAME=Doe
OWNER_ORG_UNIT=My unit
OWNER_ORGANIZATION=My org
OWNER_LOCALITY=Copenhagen
OWNER_STATE_OR_PROVINCE=Denmark
OWNER_COUNTRY_NAME=DK
.env also needs PROXY_SECRET, a random value nginx sends to the platform with every request: make secrets appends one, or add PROXY_SECRET= followed by the output of openssl rand -hex 32. Docker Compose refuses to start without it.
Setup server's SSL certificates by running this from command line:
./bin/server-cert-gen.sh .env nginx ssl
The script will create an ssl sub-folder where the SSL certificates and/or public keys will be placed.
Create the following secrets with certificate/truststore passwords:
secrets/client_truststore_password.txtsecrets/owner_cert_password.txtsecrets/secretary_cert_password.txtsecrets/openai_api_key.txt — optional, only if you enable the assistant: an OpenAI API key, declared in docker-compose.override.yml like the OAuth secrets; without it the assistant runs plans but cannot write them
The one you will need to remember in order to authenticate with LinkedDataHub using WebID client certificate is owner_cert_password.Launch the application services by running this from command line:
make up -- --build
make up passes its arguments on to docker-compose up. The -- is required before any argument starting with -, otherwise make treats it as one of its own options.
It will build LinkedDataHub's Docker image, start its container and mount the following sub-folders:
ssl
owner stores root owner's WebID certificate, keystore, and public keysecretary stores root application's WebID certificate, keystore, and public keyserver stores the server's certificate (also used by nginx)data where the triplestore(s) will persist RDF datadatasets where LDH persists agent metadata filesuploads where LDH stores content-hashed file uploads
It should take up to half a minute as datasets are being loaded into triplestores. After a successful startup you should see periodic healtcheck requests being made to the https://localhost:4443/ns URL.Install ssl/owner/keystore.p12 into a web browser of your choice (password is the owner_cert_password secret value)
Settings > Advanced > Manage Certificates > Import...Options > Privacy > Security > View Certificates... > Import...local section).For authenticated API access use the ssl/owner/cert.pem HTTPS client certificate with curl, or the ssl/owner/keystore.p12 keystore beside it with the ldh CLI.
If you are running Linux with user other than root, you might need to fix the certificate permissions because Docker bind mounts are owned by root by default. For example:
sudo setfacl -m u:$(whoami):r ./ssl/owner/*
Open https://localhost:4443/ in the web browser or use the API, for example:
curl -k -E ./ssl/owner/cert.pem:<your cert password> -H "Accept: text/turtle" 'https://localhost:4443/'
ldh get -c ./ssl/owner/keystore.p12 -p <your cert password> --accept text/turtle 'https://localhost:4443/'
There might go up to a minute before the web server is available because the nginx server depends on healthy LinkedDataHub and the healthcheck is done every 20s
You will likely get a browser warning such as Your connection is not private in Chrome or Warning: Potential Security Risk Ahead in Firefox due to the self-signed server certificate. Ignore it: click Advanced and Proceed or Accept the risk to proceed.
chrome://flags/#allow-insecure-localhost, switch Allow invalid certificates for resources loaded from localhost to Enabled and restart ChromeMacOS: Chrome subdomain support: Chrome on macOS requires the server certificate to be installed to the System keychain to properly load resources from dataspace subdomains (e.g., admin.localhost:4443). Firefox is more lenient and will work without this step.
ssl/server/server.crtAlternatively, use the command line:
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ssl/server/server.crt
.env_sample and .env files might be invisible in MacOS Finder which hides filenames starting with a dot. You should be able to create it using Terminal however.
On Linux your user may need to be a member of the docker group. Add it using
sudo usermod -aG docker ${USER}
and re-login with your user. An alternative, but not recommended, is to run
sudo make up
A common case is changing the base URI from the default https://localhost:4443/ to your own.
Lets use https://ec2-54-235-229-141.compute-1.amazonaws.com/ as an example. We need to split the URI into components and set them in the .env file using the following parameters:
PROTOCOL=https
HTTP_PORT=80
HTTPS_PORT=443
HOST=ec2-54-235-229-141.compute-1.amazonaws.com
A dataspace serves its documents from the root of its origin, so the base URI is always the origin followed by / — there is no sub-path component to configure. Deploying several dataspaces on one instance is a matter of giving each its own subdomain, as described in Dataspaces below.
Since version 5.1.0, a single LinkedDataHub instance supports multiple dataspaces, each identified by a distinct subdomain (origin). Each dataspace consists of a pair of applications: an end-user app (e.g. https://northwind-traders.demo.localhost:4443) and an admin app on the admin. subdomain (e.g. https://admin.northwind-traders.demo.localhost:4443).
Dataspace configuration is split across two files:
config/dataspaces.trig — public metadata: origins (lds:origin), ontologies, stylesheetsconfig/system.trig — internal wiring: SPARQL service bindings and dataspace types (lds:AdminDataspace/lds:EndUserDataspace)To add a new dataspace, add corresponding entries to both files. Relative URIs will be resolved against the base URI configured in the .env file.
:warning: Do not use blank nodes to identify applications or services. We recommend using the urn: URI scheme, since LinkedDataHub application resources are not accessible under their own dataspace.
Since version 5.9.0, LinkedDataHub can mirror every document of a dataspace into a GitHub repository. Each document (named graph) becomes an N-Triples file, and every write (POST/PUT/PATCH/DELETE) becomes a commit authored with the agent's WebID — giving you a full history, audit trail, and undo capability using plain git tooling. Commits happen asynchronously in the background and are best-effort: if GitHub is unavailable or the token is invalid, writes succeed as usual and the failures are only logged.
Historical versions can be retrieved with the version query parameter using a commit SHA:
curl -k -E ./ssl/owner/cert.pem:<your cert password> -H "Accept: text/turtle" 'https://localhost:4443/my-doc/?version=<commit-sha>'
Version responses are immutable and carry a Memento-Datetime header with the commit's datetime. They are subject to the same access control as the live document.
Versioning is disabled by default. To enable it for a dataspace:
github_pat_). A classic token with the repo scope works as well, but grants far broader access.config/system.trig and link the application to it (an example is included in the file):
<urn:linkeddatahub:apps/end-user>
{
<urn:linkeddatahub:apps/end-user> lds:versioningRepository <urn:linkeddatahub:versioning/end-user> .
}
<urn:linkeddatahub:versioning/end-user>
{
<urn:linkeddatahub:versioning/end-user> a doap:GitRepository ;
doap:location <https://github.com/OWNER/REPO> ;
github:branch "main" ;
github:pathPrefix "graphs" .
}
secrets/credentials.trig (create the file if it does not exist) as an a:authToken of the repository resource:
@prefix a: <https://w3id.org/atomgraph/core#> .
<urn:linkeddatahub:versioning/end-user>
{
<urn:linkeddatahub:versioning/end-user> a:authToken "github_pat_..." .
}
credentials secret in docker-compose.yml by uncommenting it in the top-level secrets: block and in the linkeddatahub service's secrets: list.make up. The startup log will confirm: Graph versioning enabled for application <...>.Multiple dataspaces can be versioned into different repositories with different tokens. The token never appears in the environment or the process table — it is merged into the internal context dataset from the Docker secret, the same mechanism used for SPARQL service credentials.
Secrets used in docker-compose.yml:
LinkedDataHub supports a range of configuration options that can be passed as environment parameters in docker-compose.yml. The most common ones are:
The options are described in more detail in the configuration documentation.
If you need to start fresh and wipe the existing setup (e.g. after configuring a new base URI), you can do that using
make drop
It asks for confirmation, then stops the services and removes their volumes before deleting the datasets, fuseki, ssl, and uploads folders. Stopping first matters: deleting those folders while the containers are running leaves Fuseki writing into directories that no longer exist.
:warning: This will remove the persisted data and files as well as Docker volumes.
ldh wraps the HTTP API into a single executable with convenient parameters. It can be used for testing, automation, scheduled execution and such. It is usually much quicker to perform actions using the CLI rather than the user interface, as well as easier to reproduce.
Every release attaches an ldh-<version>.tar.gz archive, which needs only a Java 21 runtime — no build tools and no source checkout:
tar -xzf ldh-<version>.tar.gz
export PATH="$PWD/ldh-<version>:$PATH"
ldh --help
To build it from source instead — the CLI lives in the cli subfolder and needs Java 21 and Maven:
make cli
which prints the export PATH=... line to run afterwards. If you will be using LinkedDataHub's CLI regularly, add that export to your shell profile.
Commands authenticate with a WebID client certificate, read from a PKCS12 keystore or a PEM file holding the certificate and its private key — ssl/owner/keystore.p12 and ssl/owner/cert.pem are the owner's, either works. Options that repeat across commands can be set once as environment variables:
export LDH_CERT_FILE=./ssl/owner/keystore.p12
export LDH_CERT_PASSWORD=$(cat secrets/owner_cert_password.txt)
export LDH_BASE=https://localhost:4443/
ldh create container --parent "$LDH_BASE" --title "Concepts" --slug concepts
ldh create item --container "${LDH_BASE}concepts/" --title "Example" --slug example
Commands that create or append to a document print its URL as the only line on stdout, so they compose in shell pipelines: item=$(ldh create item ...). Commands group by verb — ldh create container, ldh add xhtml-block, ldh import csv, ldh admin create group — with import holding the workflows that compose the atomic commands. See cli/README.md for the full command table and the differences from the scripts.
:warning: The bin/ HTTP API scripts that ldh replaces have been removed; the migration table maps each to its command. The certificate and WebID tooling (webid-keygen.sh, webid-keygen-pem.sh, webid-uri.sh, webid-modulus.sh, server-cert-gen.sh) talks to no API and stays in bin/.
These demo applications can be installed into a LinkedDataHub instance using make install. You will need to provide the path to your WebID certificate as well as its password.
AI agents work with LinkedDataHub through the same HTTP API and access control as people do: an agent acts as a WebID, and can read and write only what that WebID may.
Users signed in with a WebID certificate who have append access to a document can open the assistant from its creation bar. A question becomes a Web-Algebra plan, and the plan is shown before anything runs. A plan that only reads can run straight away, and one that writes waits for the user to press Execute. The plan runs as the user who asked. Each conversation is stored in the document as a block, so it is still there when the user comes back.
:warning: The assistant is opt-in. It is served by the web-algebra service, whose image (ghcr.io/atomgraph/webalgebra-server-ldh) is proprietary: AtomGraph publishes the image but not its source, and LinkedDataHub's license does not cover it.
To enable it, add to .env:
COMPOSE_PROFILES=assistant
The profile starts the service, and the platform reads the same variable to show the Assistant button. Set it in .env rather than with docker compose --profile, which the platform does not see. Writing plans needs an OpenAI API key (secrets/openai_api_key.txt, see Setup). Without one, the assistant can still run plans but cannot write them. See the assistant reference for details.
The ldh plugin gives Claude Code skills for building on LinkedDataHub with the ldh CLI: provisioning a dataspace, modelling and importing a dataset, building an app, and writing a reusable package. Install it in Claude Code with:
/plugin marketplace add AtomGraph/LinkedDataHub
/plugin install ldh@linkeddatahub
Claude loads a skill by itself when a request matches it, for example:
Here are products.csv and categories.csv. Model them with schema.org, import them into the inventory dataspace, and make each category's page list its products.
The skills need a LinkedDataHub instance, the owner's WebID certificate and the ldh CLI. See plugins/ldh/README.md for the skills and more example requests.
Web-Algebra expresses LinkedDataHub operations, SPARQL queries and Linked Data reads as plans that run as one unit. The assistant writes its plans in it, and its Model Context Protocol server exposes LinkedDataHub operations as tools to any MCP client, such as Claude Code or Cursor. Connected with a WebID certificate, an agent can create containers and items, add views, queries and charts, and run SPARQL. It can build a working application in a dataspace this way. The application is documents like any other, and you can keep editing them by hand. See Connect an agent for the setup, and AGENTS.md for the conventions an agent should follow when it writes to LinkedDataHub.
LinkedDataHub includes an HTTP test suite, run with make tests. It builds its fixtures with ldh, which make tests builds and puts on the $PATH for the run. The server implementation is also covered by the Processor test suite.
The parts of LinkedDataHub whose failure is a security incident are specified in Lean 4, with machine-checked proofs of what the server guarantees:
If-Match loses no update, and the Memento TimeGate selects the version closest to the requested datetime403 and reveals nothing else, not even whether the document exists. A write to an end-user document changes no authorization over any other document, and an authorization scoped to end-user documents opens no admin documentThe models are transcribed from the code, not extracted from it. The Formal workflow builds them on every push, fails on an unproven theorem, and fails a pull request that changes a transcribed source without changing the model. The HTTP test suite replays the models' answers against a running server, comparing the status and the document's graph after each request. See formal/README.md for the roadmap.
ghcr.io/atomgraph/webalgebra-server-ldh — optional, proprietary (see Assistant)Please report issues if you've encountered a bug or have a feature request.
Commercial consulting, development, and support are available from AtomGraph.