← All getagentfoundry.si Blog Posts · Post 02 of 04 · 2026-10-18 · Engine Slots & Open Source · 7 min read · Raw Markdown (.md) · Subdomain Permalink

Rule 6 in Practice: Wrapping Open-Source GitHub Projects Behind Typed Engine Slots

How AgentFoundry wraps external GitHub repositories into pinned, sandboxed engine adapters paired with native variations behind a fixed typed edge.


Under Rule 6 of the Loop Engine engineering constitution, we never reinvent the wheel when a strong open-source repository or published algorithm already exists, and we never wire a third-party repository directly into caller code. Every external GitHub project we adopt enters the library as a pinned engine adapter behind a versioned slot in engine_slots.yaml, accompanied by a native engine that passes the exact same conformance kit.

Four-step onboarding pipeline for an external GitHub repository

  • Pin commit digest and license: Record the upstream repository URL, exact 40-character Git commit SHA, and SPDX license identifier (MIT, Apache-2.0, BSD-3-Clause, CC0-1.0) in the adapter manifest.
  • Isolate inside the required trust boundary: Run untrusted or native-binary adapters inside a network-isolated container or WebAssembly sandbox with explicit filesystem path confinement.
  • Wrap behind the slot's fixed typed edge: Translate the slot's canonical request schema into the repository's internal API and map any upstream exceptions into explicit slot refusal codes.
  • Build and verify a native variation: Implement a zero-dependency native engine alongside the wrapped adapter and require both to pass the slot's conformance kit.
# Example Slot Registration in engine_slots.yaml
slot_id: pose_keypoint_extractor_2d
contract_version: v1
input_schema: video_frame_rgb_v1
output_schema: coco_17_joint_keypoints_v1
refusal_codes:
  - subject_occluded_below_confidence_threshold
  - invalid_frame_dimensions
engines:
  - engine_id: rtmpose_pinned_adapter
    source_repo: "https://github.com/open-mmlab/mmpose"
    pinned_commit: "4a8b91c0e2d3f4a5b6c7d8e9f0a1b2c3d4e5f6a7"
    license: "Apache-2.0"
    sandbox: "container_no_network"
  - engine_id: native_kinematic_prior
    source_repo: "native"
    license: "Proprietary"
    sandbox: "in_process_deterministic"

Navigation Post Title Routes
Previous Post Why a Specialized Agent Is Just an 8-File Preconfigured Harness Component Pack
Next Post Testing Every Engine Slot Against Known-Wrong Inputs Before Promotion
Domain Blog Index Return to getagentfoundry.si/blog Index