Skip to content

Open-core seam design

In the same repository, the MIT core and enterprise implementations (ee/) may coexist as readable code, but the core must not statically depend on the enterprise tree. Without a valid license, enterprise code does not load. Customers can audit for themselves whether a running path entered a commercial module, without judging by the license agreement alone.

flowchart TD
Req[Request commercial capability] --> Lic{License includes feature?}
Lic -->|no| F403[403 and do not load ee]
Lic -->|yes| Dyn[Dynamic import of enterprise implementation]
Dyn --> Run[Execute]
  • Core must not statically import the enterprise tree; the only load path is dynamic import() with a string path
  • Key: AGENTFORGE_EE_LICENSE_KEY (RS256 JWT with features[])
  • Feature examples: multitenant, hitl, audit
  1. Endpoint shell: tenant/account writes, audit verify/rehash, and similar surfaces require the feature before loading the enterprise implementation
  2. Predicate: for example, deciding another user’s HITL ticket needs hitl; self-confirmation stays in the open-source core

Enterprise runtime may depend on core APIs; the core never reverse-depends statically on the enterprise tree. Baseline and traceability: baseline traceability.


Related reading: