티스토리 뷰
Two-Layer Multi-Agent & Package Foundation Design : Biligent#4
tothebeyond 2026. 9. 25. 22:00Biligent System Architecture: Two-Layer Multi-Agent & Package Foundation Design
A comprehensive deep-dive into the architectural blueprint of the Biligent engine—featuring clean decoupling between autonomous runtime agents and deterministic, reusable package layers.
Table of Contents
- 4-1. Two-Layer Structure and Unit Boundary Rules
- 4-2. System Layer Hierarchy Diagram
- 4-3. Agent Layer Specifications (A0 ~ A8)
- 4-4. Package Layer (33 Modules across 9 Intermediate Groups)
- 4-6. Dependency Rules & Interaction Paradigms
- 4-7. Major, Mid, and Subgroup Taxonomy
- 4-8. Dual Constants Architecture
- 4-9. Independence Principles & Verification Checks
4-1 Two-Layer Structure and Unit Boundary Rules
| Dimension | Package Layer | Agent Layer |
|---|---|---|
| Unit Nature | Code Structure — Import boundary, public interface, unit of testing. | Runtime Role — Collaboration participant possessing judgment, triggers, and owned state that receives requests and emits results. |
| Boundary Criteria | Dependency direction, reusability, change impact radius. | Responsibility, trigger source, state ownership, discretionary judgment authority. |
| Independence Definition | No mutual imports; do not share persistence stores. | Agnostic of each other's internal state; communicates exclusively via Contract Requests, Contract Results, and Events. |
- A single agent is implemented by one or more packages. A package can serve as a shared component across multiple agents.
- The Agent Layer consists of one primary user-facing conversational specialist agent (A0) and multiple support agents (A1, A4, A5, A6, A7, A8).
🎯 The 4 Mandatory Criteria for Defining an Agent
A functional unit is classified as an Agent if and only if it satisfies ALL FOUR conditions below. If even one is missing, it is implemented as a Package (Component):
- Autonomous Trigger: Receives its own triggers (request, asynchronous event, cron schedule, or human interaction).
- Discretionary Choice: Evaluates context and selects one out of multiple possible alternatives.
- Contract Hand-off: Transmits its decision result to other participants strictly formatted as a formal contract.
- Self-contained Failure Disposal: Autonomously emits its own failure resolution (partial result, pending hold, or human confirmation request).
Additional Structural Rules
- Deterministic calculation, validation rules, and persistence are always packages: Concept retrieval ranking (
retrieval), guard verification (guard), evidence construction (evidence_view), counter-evidence inspection (critic), feedback routing (feedback), and calculation execution (calc_runner) are purely components. - Separation of Judgment and Mechanism: If a feature involves both judgment and deterministic mechanics, place the judgment logic in the Agent and the execution mechanics in the Package.
- Universal pipelines are NOT agents: Mandatory pipeline segments (LLM hook chains, tracer, event bus) and pass-through parallel execution wrappers that do not make non-deterministic decisions are packages.
4-2 System Layer Hierarchy Diagram
4-3 Agent Layer Specifications
Each runtime agent operates autonomously within strict boundaries, communicating solely via formal contracts and events.
retrieval for concept searches and guard for explanation verification. Connects evidence display, permission checks, personalization, and past answer reproducibility. Records used knowledge tiers, semantic rule IDs, node filters, outlier criteria, and agent questions. Dispatches execution requests (calc_runner.run_plan) and presents step reasons/data references. Never directly writes to understanding.qa, compute, presentation, access, knowledge_policy, meaning_structure (read-only).CalcPlan). Binds parameters if confirmed definitions exist; otherwise infers steps with unconfirmed badges. Drafts conversational calculation rules into CalcRule.query_slots, algorithms, meaning_structure, knowledge_policy, derived_data, connectivity, llm_gateway.data_updated, Scheduled Runs | Packages: eval_lab, quality_metrics, knowledge_policy, A0 Request Contract.pipeline_runner, critic, knowledge_policy, A6/A7 Request Contracts.data_updated events. Proposes exclusion candidates, confirms user structural edits (structure_changed), handles node distinction modifications (confirmed_reuse), registers correction rules into knowledge_policy, manages rule rollbacks, and resolves user conflicts.structure_edit, Revert Requests | Packages: ingest.loader, Entire understanding, algorithms, parallel, domain_lifecycle.meaning_changed on semantic rule updates, batches status/opinion changes (node_state_changed), resolves semantic conflicts (meaning_conflict), adjusts State Value ↔ Condition Value shifts, updates Concept Ledger, classifies outlier criteria, and processes semantic rollback requests.structure_changed, apply_node_batch, A0 Meaning Requests | Packages: connectivity, value_roles, meaning_structure, knowledge_policy, critic.Present Exploratory Question event to stimulate proactive domain discovery.connectivity, quality_metrics, pipeline_runner, llm_gateway, A0 Request Contract.4-4 Package Layer (33 Modules across 9 Intermediate Groups)
The deterministic mechanics of the system are divided into 33 packages across 9 functional groups. Every domain-scoped database query implicitly receives domain_id.
4-6 Dependency Rules & Interaction Paradigms
| Interaction Model | Applicable Area | Governing Rule |
|---|---|---|
| Direct Function Call | Higher layer → Lower layer public interfaces | Never call private modules/functions prefixed with underscore (_). |
| Hook Registration | guard, llm_policy → llm_gateway |
Registered during Top Platform bootstrap. llm_gateway does NOT import either module. |
| Event Pub/Sub | Publishers → observability bus → Subscribers |
Publishers are unaware of subscribers. Subscriptions are wired during bootstrap. |
| Storage Mediation | All stateful modules with owned storage | Only the owning module writes to its tables. Others read exclusively via public query APIs. |
🛡️ The 6 Cardinal Dependency Rules
- Strict Top-Down Flow: Top Platform → UI Shell → Agent Layer → Feature Modules → Base Modules. Lateral module calls are strictly constrained to permitted dependencies with zero circularity.
- Single-Writer Invariant on Understanding: ONLY A6 and A7 are authorized to invoke write methods on
understanding. A0, A1, and A8 use read-only query interfaces. - Centralized Access Evaluation:
access.authorizeandaccess.node_filterare called ONLY at the A0 entry point and UI Shell layout construction. No other module evaluates permissions. - Decoupled LLM Gateway:
guardandllm_policyattach exclusively via hook registration.llm_gatewaynever imports them. - No Direct Cross-Agent Invocations: Agents NEVER call one another directly. All cross-agent collaborations (e.g. A0 requesting A1 parsing, A5 delegating to A6/A7) occur via contract requests and asynchronous events.
- Delegated Lifecycle Cleanups: Domain reset and carryovers are registered by the Top Platform via modular callbacks (
domain_lifecycle.register_reset).domain_lifecyclenever imports specific domain modules.
4-7 Major, Mid, and Subgroup Taxonomy
The system organizes packages into 5 Major Groups (A ~ E) for administrative scoping. Major groups do not represent physical code layers.
| Major Group | Mid-Group | Included Packages | Count | Depends On |
|---|---|---|---|---|
| A. Base Foundation | Base | store, contracts, observability, parallel, algorithms, llm_gateway, code_sandbox | 7 | None (Lowest Layer) |
| B. Data Understanding | ingest | loader, user_input | 2 | A |
| understanding | profile, connectivity, value_roles, meaning_structure | 4 | A | |
| C. User Operations | user_ops | access, personalization, domain_lifecycle, llm_policy | 4 | A |
| D. Knowledge, Computation & Response | knowledge | knowledge_policy, critic, pipeline_runner | 3 | A, B |
| compute | grouping, calc_runner, derived_data, codegen | 4 | A, B | |
| qa | conversation, query_slots, retrieval, guard | 4 | A (intra-group: knowledge) | |
| presentation | evidence_view, display_optimizer | 2 | A, B, C (intra-group: compute) | |
| E. Quality Assurance | quality | eval_lab, quality_metrics, feedback | 3 | A, D |
| Total Architecture Scope | 9 Intermediate Groups | 33 | E → D → (B, C) → A | |
4-8 Dual Constants Architecture
To eliminate magic numbers, hardcoded URLs, and configuration leaks, all constant values are segregated into two distinct systems:
UI_PORT), deployment install parameters (default admin account seeds, OAuth client keys), and declarative state machine transition tables.4-9 Independence Principles & Verification Checks
| # | Independence Invariant | Automated Verification Strategy |
|---|---|---|
| 1 | Never import internal modules of other units — use public interfaces only. | Construct AST import graphs to detect layer violations and private module references. |
| 2 | Never access another unit's storage tables directly via SQL. | Audit SQL string table names against store table ownership registries. |
| 3 | Units remain fully functional according to contract when dependencies are stubbed. | Run unit contract tests and integration suites with mock test doubles inserted. |
| 4 | Unit tests execute without concrete implementations of other units. | Execute test runs with cross-module imports blocked at the runtime loader level. |
| 5 | Zero circular dependencies allowed anywhere in the codebase. | Run topological sort cycles detection across the complete AST import graph. |
| 6 | Agents communicate solely via contract requests, results, and events. | Verify zero cross-agent module imports and validate strict schema payloads. |
| 7 | System gracefully degrades (partial answer / pending hold) if any support agent stops. | Fault-injection integration tests with individual support agents deactivated. |
Inevitable Shared Substrates & Strict Boundaries
- store: Tables are exclusively written by owner modules; external access is query-only via public APIs.
- contracts: Canonical source of truth for shared requests, results, events, and span models.
- llm_gateway: All LLM invocations pass through uniform hook chains (data egress, budget caps, value matching guards).
- observability: Centralized owner of span models and telemetry storage; other units interact solely via the span interface.
'BilientSevices > BilientService' 카테고리의 다른 글
| Multi-Agent Contracts : Biligent#5 (0) | 2026.09.26 |
|---|---|
| Images for BMS(Bilient Monitoring System) (0) | 2026.09.26 |
| Requirements : Biligent#3 (0) | 2026.09.25 |
| Teminnology : Biligent#2 (0) | 2026.09.24 |
| Purpose and Scope : Biligent#1 (0) | 2026.09.24 |
- Total
- Today
- Yesterday
- BiliChild
- arduino
- BSC
- 오블완
- 배프
- Video
- 빌리칠드
- 전압
- 빌리언트
- Innovation&Hurdles
- 전류
- 치매
- 혁신
- 아두이노
- 허들
- Innovations&Hurdles
- Innovations
- 심심풀이치매방지기
- 티스토리챌린지
- Hurdles
- bilient
- 심심풀이
- 둎
- DYOV
- Decorator
- image
- ServantClock
- 혁신과허들
- 치매방지
- 절연형
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 |

