tflux2011 commited on
Commit
e6896d0
Β·
verified Β·
1 Parent(s): b2e0e38

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -1
README.md CHANGED
@@ -1,8 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Contextual Engineering Patterns: Architecting Adaptable AI Agents
2
 
3
  [![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)
4
  [![Status: Open Access](https://img.shields.io/badge/Status-Open%20Access-green.svg)]()
5
- [![Book: Published](https://img.shields.io/badge/Book-Read%20Full%20Text-blue)](https://zenodo.org) > **Reference implementations for the architectural patterns defined in the book *"Contextual Engineering: Architecting Adaptable AI Agents for the Real World"* by Tobi Lekan Adeosun.**
 
6
 
7
  ## πŸ“– Overview
8
 
@@ -13,6 +31,25 @@ This repository contains the **Python reference implementations** for the three
13
  2. **Cultural Adapter:** Managing semantic drift and high-context communication.
14
  3. **Safety Adapter:** Enforcing constitutional guardrails and Human-in-the-Loop (HITL) workflows.
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  ## πŸ“‚ Repository Structure
17
 
18
  The code is organized by the "Adapter Layer" it serves, matching the chapters of the manuscript.
@@ -28,3 +65,17 @@ The code is organized by the "Adapter Layer" it serves, matching the chapters of
28
  β”‚ └── culture
29
  β”‚ └── context_injector.py # (Chapter 6) Dynamic Few-Shot Prompting logic
30
  └── README.md
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - agents
5
+ - offline-first
6
+ - edge-computing
7
+ - context-aware
8
+ - global-south
9
+ - low-resource-nlp
10
+ license: mit
11
+ language:
12
+ - en
13
+ pipeline_tag: text-generation
14
+ ---
15
+
16
+
17
+
18
  # Contextual Engineering Patterns: Architecting Adaptable AI Agents
19
 
20
  [![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)
21
  [![Status: Open Access](https://img.shields.io/badge/Status-Open%20Access-green.svg)]()
22
+ [![Paper: AfricArXiv](https://img.shields.io/badge/Paper-Read%20Preprint-red)](https://africarxiv.ubuntunet.net/items/2af79f5d-ce68-4050-8b25-3bc9128c7232)
23
+ [![Book: Published](https://img.shields.io/badge/Book-Read%20Full%20Text-blue)](https://zenodo.org/records/18005435) > **Reference implementations for the architectural patterns defined in the book *"Contextual Engineering: Architecting Adaptable AI Agents for the Real World"* by Tobi Lekan Adeosun.**
24
 
25
  ## πŸ“– Overview
26
 
 
31
  2. **Cultural Adapter:** Managing semantic drift and high-context communication.
32
  3. **Safety Adapter:** Enforcing constitutional guardrails and Human-in-the-Loop (HITL) workflows.
33
 
34
+ ## ⚑ Quick Start (Hybrid Router)
35
+
36
+ How to use the **Infrastructure Adapter** to route traffic based on connectivity:
37
+
38
+ ```python
39
+ from src.infrastructure.inference_router import HybridRouter
40
+
41
+ # Initialize router with cost/latency preferences
42
+ router = HybridRouter(preference="economy", offline_fallback=True)
43
+
44
+ # The router automatically checks network status (N(t))
45
+ model_choice = router.select_model(
46
+ prompt="Summarize this contract",
47
+ complexity_score=0.85
48
+ )
49
+
50
+ print(f"Routing to: {model_choice}")
51
+ # Output: "Llama-3-8B-Local" (if offline) or "GPT-4o" (if online)
52
+
53
  ## πŸ“‚ Repository Structure
54
 
55
  The code is organized by the "Adapter Layer" it serves, matching the chapters of the manuscript.
 
65
  β”‚ └── culture
66
  β”‚ └── context_injector.py # (Chapter 6) Dynamic Few-Shot Prompting logic
67
  └── README.md
68
+
69
+
70
+ ## Citation
71
+
72
+ If you use this framework in your research, please cite the associated whitepaper:
73
+
74
+ ```bibtex
75
+ @article{adeosun2026contextual,
76
+ title={Contextual Engineering: Architectural Patterns for Resilient AI Agents},
77
+ author={Adeosun, Tobi},
78
+ journal={AfricArXiv},
79
+ year={2026},
80
+ url={[https://osf.io/preprints/africarxiv/](https://osf.io/preprints/africarxiv/)[YOUR_HANDLE]}
81
+ }