Command line
Tools, batch jobs and operator utilities. Calls run synchronously, modules load from local files, and nothing web-related comes along.
moduligence-host-cli-serviceloadermoduligence-host-cli-osgi-felixModuligence is an open-source framework for building enterprise applications from modules. Write a capability once and ship it in a command-line tool, a Swing or JavaFX app, or a Spring Boot or OSGi server. Add AI agents that act with the user's permissions and ask before they change anything.
CLI, desktop and server applications share one module model, one set of APIs, one build and one way to package and launch. Teams learn a single stack, modules move between products, and AI is a choice you make per application.
Tools, batch jobs and operator utilities. Calls run synchronously, modules load from local files, and nothing web-related comes along.
moduligence-host-cli-serviceloadermoduligence-host-cli-osgi-felixSwing and JavaFX applications. Module work runs on a bounded background worker and results return on the UI thread, so the interface never freezes.
moduligence-host-desktop-swing-*moduligence-host-desktop-javafx-*Spring Boot 4 services and OSGi servers. Versioned REST APIs with OpenAPI documentation and browser request protection. On OSGi, also a start page and live module updates.
moduligence-host-spring-*moduligence-launcherIn the repository's examples, the CLI, Swing and JavaFX hosts load the very same greeting and text-statistics modules. Each host starts with either, both or neither, and reports a missing service instead of failing.
The user, through permissions they already have.
Agents never get an account of their own. Every tool runs with the signed-in caller's identity and is authorized by your code, exactly like a REST call. Model output and documents cannot widen what that user may do.
Only where your policy sent it.
Every model is declared local, internal or external. External AI is off by default. Once enabled, your policy inspects the whole conversation before each provider call, including answers returned by other agents.
Nothing changes until a person says yes.
Reads run automatically. Writes stop for an explicit Approve or Deny showing the exact Java method and arguments. Uncertain writes are never retried, and operators can see and cancel any running response.
An operations admin asks the built-in assistant to clean up stale contractor accounts. Try both answers on the approval card.
This deployment allows only local and intranet models, so the conversation never leaves your network. Each model turn shows where it ran.
Discovery lists the tools and knowledge this caller is allowed to see. Administrator-only tools stay hidden from everyone else.
Read-only tools execute automatically, inside your authorization code, with the caller's identity.
The card shows the module, the Java method and the exact arguments. Deny means the method is never called.
No separate AI platform and no second copy of your business logic. A module ships its tools, knowledge and APIs inside the same JAR as the code they describe.
Annotate methods on an existing service. Parameters become validated JSON arguments, and each tool declares whether it only reads or makes a change. Your domain code keeps the authorization it has today.
@Component(service = Accounts.class)
@AgentTools
public final class Accounts {
@Tool(description = "Find users by name", effect = READ_ONLY)
public List<User> findUsers(CallContext caller,
@ToolParam("Part of the name") String text) {
return domain.find(caller, text); // your authorization
}
@RequireAdministrator
@Tool(description = "Disable a user account", effect = MUTATION)
public Disabled disableUser(CallContext caller,
@ToolParam("User ID") String id) {
return domain.disable(caller, id);
}
}
Reference material goes in META-INF/moduligence/knowledge/ as plain Markdown, searched and read on demand. Specialist agent profiles sit beside it in META-INF/moduligence/agents/; other agents can hand them a task. Protected content comes from a Java service that checks permissions on every read.
# Reviewer
Reviews user accounts for inconsistent or stale
data and reports what it finds.
Check each account the task names. Report
problems only; never change data.
The default policy permits local and intranet models and denies external ones. To use an external provider, supply a policy. It approves each destination and inspects the full conversation before every call.
public boolean allows(CallContext caller, ModelTarget target) {
return target.location() != EXTERNAL
|| caller.find(ExternalAiConsent.class).isPresent();
}
public void checkDisclosure(CallContext caller,
ModelTarget target, String conversation) {
if (target.location() == EXTERNAL
&& classifier.isRestricted(conversation))
throw new SecurityException("Restricted data stays internal");
}
The same module works in your CLI, desktop or server build. With OSGi, install or replace it while the application runs; stop it and its tools, knowledge and APIs disappear from the next request.
# release/ is a self-contained image: lib/, bundles/<level>/, conf/
java -cp '/opt/acme/release/lib/*' \
net.moduligence.launcher.LauncherMain \
--image /opt/acme/release \
--instance /var/acme/production
Every promise maps to a specific mechanism in the framework. Your architects can verify each one in the source.
Command-line, desktop and server products share modules and know-how. Less to learn, hire for and maintain.
Under the hoodA runtime-neutral host core with ServiceLoader and Apache Felix variants for CLI, desktop, Swing, JavaFX and Spring Boot.
No privileged robot account to audit. An agent can do exactly what the person asking could do.
Under the hoodTools receive the caller's CallContext. Authority keys are reserved, so application code, model text and HTTP input cannot forge them.
Automation with a human checkpoint. Reviewers see the precise operation before it runs.
Under the hoodTools declare READ_ONLY or MUTATION. Approvals use single-use, owner-bound IDs; the plain JSON endpoint refuses mutations.
Start with on-premises models. External AI stays off until you decide which data may use it.
Under the hoodEach model is declared LOCAL, INTERNAL or EXTERNAL. A host policy checks the conversation before every provider call.
Change providers as prices and capabilities move, without rewriting applications.
Under the hoodOne provider interface: LiteRT-LM for local Gemma, OpenAI, Anthropic and Google over HTTP, plus LangChain4j and Spring AI adapters.
Services you have already tested become AI tools, REST APIs and screens from one implementation.
Under the hoodAgent tools and @ModuleApi REST endpoints call the same domain service under the same caller, with per-module OpenAPI.
A busy or failing model cannot take down the application it serves, and costs stay bounded per request.
Under the hoodBounded concurrency with a fast, retryable 503 instead of queueing; limits on time, tokens, tool calls and context; models load on first use.
Operations can see what every agent is doing right now, and stop it.
Under the hoodEvery response has an ID and a call tree of turns, tool calls and delegations. Administrators list live activity and cancel it.
Deploy to air-gapped sites, plants and regulated data centers with no internet access at runtime.
Under the hoodA JDK-only launcher runs portable images offline. Selections are pinned by SHA-256 and executable JARs verify their contents.
Each scenario is assembled from capabilities that ship with Moduligence today.
Same pricing engine in the batch CLI, the sales desktop app and the web API.
Each edition selects its host and modules. Business logic is written and tested once.
“Create a purchase order from this supplier quote.”
Partners ship modules that add tools, knowledge, REST APIs, start-page entries and screens. The assistant can use a new module as soon as it is active.
“Find contractor accounts idle since June and disable them.”
The agent searches and reads on its own, then queues each change for review. A reviewer agent can double-check first.
“What is our retention period for claim documents in Germany?”
Answers come from your own procedures, filtered by each reader's current permissions, on a model inside your network.
“Why isn't the payments module active?”
The optional diagnostics module gives administrators read-only tools for bundles, components, configuration and health checks.
“Draft the inspection report from today's readings.”
Swing and JavaFX applications use a local model on the laptop, with work kept off the UI thread.
Prompts, names and identifiers on this page are illustrative examples.
You own the main method, the UI, authentication and the data. Moduligence supplies the module runtime and the capabilities you select, and nothing else.
Optional integrations are separate Maven artifacts. A CLI distribution never acquires a web server, admin console, REST adapter or AI engine through a transitive dependency.
Modules are ordinary OSGi bundles wired by Declarative Services and Config Admin, or plain ServiceLoader providers. They need no Moduligence-specific interface.
REST endpoints, agent tools and screens call the same Java service under the same caller, so business rules live in one place.
Model output, documents and delegated answers are untrusted data. Modules are trusted in-process code; isolating untrusted extensions is a job for the process, container or OS, and the documentation says so.
Safe defaults you can tune
| Setting | Default |
|---|---|
| External model destinations | denied |
| Concurrent agent responses, then 503 | 2 |
| Delegation depth, including the root | 4 |
| Agent request body | 32 MiB |
| Agent request timeout | 120 s |
| Attachments per message | 16 |
| Cross-origin browser requests | none |
Quality gates on every build
Complexity, coupling and parameter limits are declared in the build and enforced as failures. Integration tests run against a real Apache Felix framework and packaged bundles.
Moduligence is licensed under the Apache License 2.0, a permissive license most enterprise legal teams have already reviewed. There is no copyleft and no field-of-use restriction.
The release tooling helps you meet your own obligations: it collects license texts from every shipped component and fails the build when one is missing.
The architecture and its guarantees are documented in the repository. APIs may change before 1.0, so pin versions and follow the release notes.
Run the examples: the same two modules in a CLI, a Swing app and a JavaFX app, plus Spring Boot plugins. Then expose two methods of a service your users rely on and watch the assistant use them under your rules.
$ mvn clean install [INFO] Moduligence ............................ SUCCESS