Wire FAI Context
Connect standalone primitives (agents, skills, instructions) to FROOT knowledge modules, WAF pillars, and solution plays via the FAI Protocol wiring layer.
Manifest vs. Contextโ
| Aspect | fai-manifest.json | fai-context.json |
|---|---|---|
| Level | Solution play (top-level) | Individual primitive |
| Location | solution-plays/NN-name/ | Next to any agent, instruction, or skill |
| Purpose | Wire ALL primitives for a play | Declare context for ONE primitive |
| Analogy | Docker Compose (full stack) | Single Dockerfile (one service) |
| Required | Yes, for every play | No, optional for standalone primitives |
:::tip Rule of Thumb
Building a solution play? โ Create fai-manifest.json.
Building a standalone primitive that needs context? โ Create fai-context.json.
:::
Creating fai-context.jsonโ
Place the context file in a subfolder named after the primitive:
agents/
fai-rag-architect.agent.md # The agent itself
fai-rag-architect/
fai-context.json # Context for this agent
agents/fai-rag-architect/fai-context.json
{
"assumes": [
"R2-RAG-Architecture",
"O3-MCP-Tools-Functions",
"T2-Responsible-AI"
],
"waf": [
"security",
"reliability",
"cost-optimization"
],
"compatiblePlays": [
"01-enterprise-rag",
"21-agentic-rag"
],
"evaluation": {
"groundedness": 0.95,
"coherence": 0.90
}
}
The assumes Fieldโ
Declares which FROOT knowledge modules your primitive needs:
| Series | ID | Module Name |
|---|---|---|
| Foundations | F1 | GenAI Foundations |
F2 | LLM Selection | |
F3 | AI Glossary | |
| Reasoning | R1 | Prompt Patterns |
R2 | RAG Architecture | |
R3 | Deterministic AI | |
| Orchestration | O1 | Semantic Kernel |
O2 | Agent Coding | |
O3 | MCP Tools | |
O5 | GPU Infrastructure | |
| Transformation | T1 | Fine-Tuning + MLOps |
T2 | Responsible AI | |
T3 | Production Deploy |
Creating fai-manifest.jsonโ
Top-level wiring for solution plays:
solution-plays/01-enterprise-rag/fai-manifest.json
{
"play": "01-enterprise-rag",
"version": "2.0.0",
"context": {
"knowledge": ["R2-RAG-Architecture", "R1-Prompt-Patterns"],
"waf": ["security", "reliability", "cost-optimization"],
"scope": "Enterprise RAG with Azure AI Search and GPT-4o"
},
"primitives": {
"agents": ["../../agents/fai-rag-architect.agent.md"],
"instructions": ["../../instructions/python-waf.instructions.md"],
"skills": ["../../skills/fai-build-genai-rag/"],
"hooks": ["../../hooks/fai-secrets-scanner/"],
"guardrails": {
"groundedness": 0.95,
"coherence": 0.90,
"safety": 0.99
}
},
"infrastructure": {
"bicep": "./infra/main.bicep"
}
}
Context Resolution Chainโ
1. Read fai-manifest.json
โโโ Load context.knowledge[] โ FROOT modules
โโโ Load context.waf[] โ WAF pillar rules
2. Resolve each primitive reference
โโโ Check for fai-context.json โ merge knowledge + waf
โโโ Verify compatiblePlays includes this play
3. Apply guardrails from manifest
4. Report: all primitives wired, modules loaded, pillars enforced
Conflict resolution: Knowledge modules and WAF pillars are unioned. Guardrails โ manifest wins.
Validationโ
# Validate all primitives
npm run validate:primitives
# Load play in FAI Engine
node engine/index.js solution-plays/01-enterprise-rag/fai-manifest.json --status
Troubleshootingโ
| Problem | Fix |
|---|---|
| "0 modules loaded" | Add FROOT module IDs to context.knowledge |
| "Primitive not found" | Paths are relative to manifest location |
| Context file ignored | Must be in subfolder named after the primitive |
| JSON parse error | Validate: node -e "require('./path/file.json')" |
See Alsoโ
- FAI Protocol โ full protocol specification
- Primitives Overview โ all 6 primitive types
- Create an Agent โ agents with context