Skip to content

coasys/ad4m

Repository files navigation

Project Docs License: CAL 1.0

Logo

AD4M

The Agent-Centric Distributed Application Meta-ontology or just: *Agent-Centric DApp Meta-ontology*

  • A new meta-ontology for interoperable, decentralized application design
  • A spanning-layer to enable seamless integration between Holochain DNAs, blockchains, linked-data structures/ontologies and centralized back-ends
  • The basis for turning distinct, monolithic and siloed apps into a global, open and interoperable sense-making network

Core Docs

The main core documentation for AD4M exists here

Repo Structure

This is a mono-repository with all components making up a whole ADAM Layer implementation.

  • core: Holds the core ontology types, the Ad4mClient and the GraphQL schema build automatically from the core types. This package gets published as https://www.npmjs.com/package/@perspect3vism/ad4m and is thus holding most of the app/UI facing coding.
  • bootstrap-languages: Holds all the core Languages used to make the ADAM Layer operate. These languages can be thought of as the mainnet configuration for the ADAM Layer.
  • executor: Holds the core JS code, which manages an Agents ADAM Layer state. Their Perspectives, Languages and Expressions.
  • rust-executor: Rust binary & library which facilitates the running of a GraphQL server, spawning of Deno runtime to execute the executor JS code. Running and communication with in built holochain conductor. Running and communication with Scryer Prolog engine to facilitate Prolog queries over Perspective data.
  • dapp: UI which provides a connection to MetaMask allowing AD4M Layer to create a connection to blockchain systems. UI server by the rust-executor on http://127.0.0.1:<configured_port>
  • rust-client: Rust based Ad4mClient. Wraps GraphQL and provides the same high-level interface to AD4M as the TypeScript based version in core. Published to Crates.io as ad4m-client: https://crates.io/crates/ad4m-client.
  • tests: JS testing suit integration testing a built rust-executor. Contains 50+ integration tests covering most function calls to an Adam Layer GraphQL server.
  • cli: Rust based CLI for either init'ing ad4m init, running ad4m run or communciating with a running AD4M GraphQL server. See it's readme for more details. Published to Crates.io as ad4m: https://crates.io/crates/ad4m
  • ui: Tauri based system-tray icon launcher UI which is the end-user deployment; includes the rust-executor & UI to interact with gien executor.

  • connect: Convenience library to connect to a (local or via proxy) AD4M-executor, potentially requesting or reusing capability tokens and creating an Ad4mClient ready for the app/UI to use.
  • docs-src / docs: Documentation hosted under https://docs.ad4m.dev

History

The project started in August 2020 in https://github.com/lucksus/perspectivism, then got broken down into the ad4m (core), ad4m-executor and perspect3ve repositories for simultaneuous use in Flux and Perspect3ve. Other components got added over the years 2021, 2022.

In October/November 2022, these componentes were collected into a mono-repo again to avoid PR-chains across multiple repositories and to have version numbers be in lock-step.

Building AD4M

Prerequisites

  • Install Rust by visiting here (ADAM Layer currently uses rust version 1.71.1)
  • Install Deno by visiting here
  • Install Go by visiting here (ADAM Layer currently uses go version: go1.18)
  • Install Node by visiting here
  • Install Yarn / Node by visiting here

Build:

yarn install
yarn run build

Testing

yarn install
yarn test

Building ad4m launcher

yarn install
yarn run package-ad4m