# AgentiScript AI Agent Systems Field Guide V2

Reader: Founders, operators and product teams with basic AI knowledge.
Commercial purpose: A practical premium reference and training product for understanding and implementing AI-agent systems.
Accessibility status: ACCESSIBILITY BLOCKED until dedicated PDF/UA validation is available.


Editorial status: PRIVATE WORKING DRAFT. Definitions, controls, diagrams and examples are AgentiScript-authored explanations and design recommendations; references provide background, not proof of consensus definitions or an implemented product. Examples are illustrative. These references do not establish live XRPL payments or the website's MCP protocol compatibility. Supporting references are mapped to specific topics below. Working definitions, examples and recommended controls remain authored guidance, not quotations or consensus standards. Editorial and assistive-technology acceptance remain open.

# Contents

- Chapter 1: Agent Foundations (01-10)
- Chapter 2: Prompting and Context (11-21)
- Chapter 3: Model Lifecycle (22-27)
- Chapter 4: Tool and API Execution (28-31)
- Chapter 5: Safety and Evaluation (32-36)
- Chapter 6: Operations and Control (37-46)
- Chapter 7: Distribution and Deployment (47-50)
- Five system diagrams
- Three complete agent-system examples
- Glossary and bibliography

# Reading this edition

This is a private editorial companion, not a replacement for the approved online Field Guide or a public product release. Technical topics vary by implementation. A sequence is an illustrative design, not a universal requirement. Symbol figures have short text alternatives and adjacent purpose descriptions; each diagram includes its complete flow in text. No PDF/UA or screen-reader certification is claimed.

# Introduction

This guide turns 50 owner-approved AgentiScript premium icons into a practical control map. It is for teams that need to understand agent systems well enough to design, review, package, and operate them without hiding authority, provenance, safety, or delivery risk.

## 01. Agent Core

- **Chapter:** 1. Agent Foundations
- **Working explanation:** Describes a central runtime that accepts goals and coordinates model and tool activity. Auditable results are a recommended design objective.
- **Practical example:** A team defines which requests the agent may accept, which tools it may call, and which results count as complete.
- **Illustrative failure:** The agent becomes a catch-all process with unclear authority and no auditable boundary.
- **Recommended control:** Define one clear responsibility and expose every external effect through an auditable boundary.
- **Related concepts:** Agent Planning; Agent Tool Use; Observability
- **Source-supported point:** Agent systems may coordinate model calls, tools and specialized agents; multiagent orchestration adds cost and coordination complexity. [Microsoft Azure Architecture Center, AI agent orchestration patterns: Start with the right level of complexity](https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/ai-agent-design-patterns#start-with-the-right-level-of-complexity)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 02. Agent Identity

- **Chapter:** 1. Agent Foundations
- **Working explanation:** Describes how an agent is named, owned, scoped, and recognized across logs, permissions, and outputs.
- **Practical example:** Each assistant run carries an agent ID, owner, version, and declared capability set in logs and delivery manifests.
- **Illustrative failure:** Logs show actions but not which agent version, owner, or capability set caused them.
- **Recommended control:** Bind each agent to a stable identity, explicit owner, declared capabilities, and verifiable credentials.
- **Related concepts:** Access Control; Execution Trace; Secret Key
- **Source-supported point:** Identity, credentials and access permissions are managed; permissions incorporate least privilege. [NIST CSF 2.0, PR.AA-01–05, printed pp. 19–20](https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.29.pdf#page=24)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 03. Agent Memory

- **Chapter:** 1. Agent Foundations
- **Working explanation:** Describes information retained or retrieved across an agent’s work; this guide recommends distinguishing temporary context from durable memory.
- **Practical example:** A research agent stores approved client preferences separately from temporary working notes and cites the source of each retained fact.
- **Illustrative failure:** Temporary notes are treated as durable facts and contaminate later decisions.
- **Recommended control:** Separate short-lived working context from durable memory, and attach provenance to retained facts.
- **Related concepts:** Context Window; Knowledge Base; Data Privacy
- **Source-supported point:** AI privacy risks are examined and documented. [NIST AI RMF 1.0, MEASURE 2.10, printed p. 30](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=35)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 04. Agent Planning

- **Chapter:** 1. Agent Foundations
- **Working explanation:** Describes organizing actions toward a goal, potentially revising the plan as conditions change. Completion checks and stop conditions are recommended controls.
- **Practical example:** Before a build starts, the agent lists dependent steps, success checks, and the stop condition for each phase.
- **Illustrative failure:** The agent keeps working after success or failure because the stop condition was never defined.
- **Recommended control:** Break goals into finite steps with dependencies, success checks, and explicit stop conditions.
- **Related concepts:** Autonomous Workflow; Checkpoint; Approval Gate
- **Source-supported point:** Agent systems may coordinate model calls, tools and specialized agents; multiagent orchestration adds cost and coordination complexity. [Microsoft Azure Architecture Center, AI agent orchestration patterns: Start with the right level of complexity](https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/ai-agent-design-patterns#start-with-the-right-level-of-complexity)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 05. Agent Reasoning

- **Chapter:** 1. Agent Foundations
- **Working explanation:** Describes how assumptions, evidence, uncertainty, and conclusions are separated before decisions affect work.
- **Practical example:** A pricing assistant records the assumptions behind a recommendation and flags unsupported inferences for review.
- **Illustrative failure:** Confident explanations mix evidence, assumptions, and speculation without labels.
- **Recommended control:** Record assumptions, distinguish evidence from inference, and verify consequential conclusions before action.
- **Related concepts:** Model Evaluation; Benchmark; Logging
- **Source-supported point:** Agent systems may coordinate model calls, tools and specialized agents; multiagent orchestration adds cost and coordination complexity. [Microsoft Azure Architecture Center, AI agent orchestration patterns: Start with the right level of complexity](https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/ai-agent-design-patterns#start-with-the-right-level-of-complexity)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 06. Agent Tool Use

- **Chapter:** 1. Agent Foundations
- **Working explanation:** Describes how an agent requests external capabilities while keeping arguments, permissions, and side effects controlled.
- **Practical example:** The agent may call a file converter only with an approved schema and only inside the authorized workspace.
- **Illustrative failure:** A valid-looking instruction reaches a tool that was never approved for that task.
- **Recommended control:** Allowlist tools by purpose, validate every argument, and expose side effects before execution.
- **Related concepts:** Function Calling; API Integration; Guardrails
- **Inputs:** Approved tool list, schema, user request, runtime permissions.
- **Outputs:** Validated tool result plus audit record.
- **Source-supported point:** MCP tools declare input schemas; clients and servers have responsibilities for validation and tool execution safety. [MCP 2025-06-18, Tools: schema, errors and security considerations](https://modelcontextprotocol.io/specification/2025-06-18/server/tools)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 07. Agent Orchestration

- **Chapter:** 1. Agent Foundations
- **Working explanation:** Describes coordination of agents, tools and workflow dependencies; sequencing is one option, not the only orchestration pattern.
- **Practical example:** One controller assigns research, drafting, and verification to separate agents, then reconciles their outputs.
- **Illustrative failure:** Agents duplicate work, overwrite each other, or hand off incomplete evidence.
- **Recommended control:** Make dependencies explicit, bound retries, and preserve a deterministic handoff record.
- **Related concepts:** Multi-Agent System; Retry; Fallback
- **Source-supported point:** Agent systems may coordinate model calls, tools and specialized agents; multiagent orchestration adds cost and coordination complexity. [Microsoft Azure Architecture Center, AI agent orchestration patterns: Start with the right level of complexity](https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/ai-agent-design-patterns#start-with-the-right-level-of-complexity)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 08. Multi-Agent System

- **Chapter:** 1. Agent Foundations
- **Working explanation:** Describes multiple interacting agents; shared authority and independent verification are recommended controls for this guide’s illustrative system.
- **Practical example:** A product team separates writer, verifier, and packager roles so no single agent approves its own work.
- **Illustrative failure:** One agent's mistake is amplified because no independent verification role exists.
- **Recommended control:** Assign non-overlapping roles, define shared truth, and verify integrated results independently.
- **Related concepts:** Agent Orchestration; Execution Trace; Model Evaluation
- **Source-supported point:** Agent systems may coordinate model calls, tools and specialized agents; multiagent orchestration adds cost and coordination complexity. [Microsoft Azure Architecture Center, AI agent orchestration patterns: Start with the right level of complexity](https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/ai-agent-design-patterns#start-with-the-right-level-of-complexity)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 09. Human in the Loop

- **Chapter:** 1. Agent Foundations
- **Working explanation:** Describes where human judgment must approve, revise, or reject agent output before consequences occur.
- **Practical example:** A refund assistant drafts an answer, but a human approves any exception or customer-impacting credit.
- **Illustrative failure:** Review happens too early or too vaguely to control the actual consequential action.
- **Recommended control:** Require explicit human approval where judgment, authority, or irreversible effects cannot be delegated safely.
- **Related concepts:** Approval Gate; Access Control; Red Teaming
- **Source-supported point:** Organizations define and differentiate roles for human oversight in AI-system decisions. [NIST AI RMF 1.0, GOVERN 3.2, printed p. 23](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=28)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 10. Autonomous Workflow

- **Chapter:** 1. Agent Foundations
- **Working explanation:** Describes a self-running process with bounded goals, checkpoints, recovery paths, and stop gates.
- **Practical example:** A nightly private build runs automatically, checkpoints results, and stops when QA or authority checks fail.
- **Illustrative failure:** Automation loops through errors and creates more unverified output.
- **Recommended control:** Bound autonomy with measurable goals, finite recovery paths, durable checkpoints, and enforced stop gates.
- **Related concepts:** Retry; Fallback; Deployment
- **Source-supported point:** Agent systems may coordinate model calls, tools and specialized agents; multiagent orchestration adds cost and coordination complexity. [Microsoft Azure Architecture Center, AI agent orchestration patterns: Start with the right level of complexity](https://learn.microsoft.com/en-us/azure/architecture/ai-ml/guide/ai-agent-design-patterns#start-with-the-right-level-of-complexity)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 11. Prompt Input

- **Chapter:** 2. Prompting and Context
- **Working explanation:** Describes instructions or other content supplied to a model. Normalization, validation and authority checks are recommended controls, not properties of every prompt.
- **Practical example:** The system normalizes a customer request, strips unsupported instructions, and records the accepted task.
- **Illustrative failure:** A prompt injection or stale instruction becomes part of the accepted task.
- **Recommended control:** Validate and normalize incoming instructions before they can influence tools, data, or external systems.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** MCP tools declare input schemas; clients and servers have responsibilities for validation and tool execution safety. [MCP 2025-06-18, Tools: schema, errors and security considerations](https://modelcontextprotocol.io/specification/2025-06-18/server/tools)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 12. System Prompt

- **Chapter:** 2. Prompting and Context
- **Working explanation:** Describes governing instructions used to guide model behavior. A system prompt alone does not enforce permissions or guarantee resistance to untrusted content.
- **Practical example:** A support bot uses a versioned instruction set that states allowed topics, escalation rules, and forbidden actions.
- **Illustrative failure:** Untrusted content silently overrides the governing instruction set.
- **Recommended control:** Keep governing instructions explicit, versioned, protected from untrusted content, and testable as policy.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Organizations define and differentiate roles for human oversight in AI-system decisions. [NIST AI RMF 1.0, GOVERN 3.2, printed p. 23](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=28)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 13. Context Window

- **Chapter:** 2. Prompting and Context
- **Working explanation:** Describes the token capacity available for a model request; the guide recommends selecting relevant, authorized context within that capacity.
- **Practical example:** Only the current contract, recent validated ticket history, and approved policy snippets are loaded for a reply.
- **Illustrative failure:** Old context crowds out current authority and changes the decision path.
- **Recommended control:** Include only relevant, authorized evidence and prevent older or untrusted context from silently controlling decisions.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** A context window is measured in tokens the model can process for a prompt. [Google Machine Learning Glossary, context window](https://developers.google.com/machine-learning/glossary#context-window)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 14. Token Stream

- **Chapter:** 2. Prompting and Context
- **Working explanation:** Describes the ordered output flow from a model and when partial output is safe to buffer or reject.
- **Practical example:** A streamed answer is buffered until the required JSON object is complete and valid.
- **Illustrative failure:** Partial streamed output is acted on before required fields arrive.
- **Recommended control:** Enforce output limits, validate streamed structure, and withhold side effects until required content is complete.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** The paper proposes a Transformer architecture based on attention and evaluates machine translation. [Vaswani et al., Attention Is All You Need, abstract](https://arxiv.org/abs/1706.03762v7)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 15. Embedding Vector

- **Chapter:** 2. Prompting and Context
- **Working explanation:** Describes a numeric representation of content used for similarity search and retrieval comparison.
- **Practical example:** A document search system records the embedding model and chunking rule used for each stored vector.
- **Illustrative failure:** Search quality changes after a model or chunking update with no reproducible record.
- **Recommended control:** Version the embedding model and preprocessing so similarity results remain reproducible and comparable.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Embedding vectors represent inputs numerically. [Google Machine Learning Glossary, embedding vector](https://developers.google.com/machine-learning/glossary#embedding-vector)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 16. Vector Database

- **Chapter:** 2. Prompting and Context
- **Working explanation:** Describes a store designed to index and retrieve vectors. Source records, permissions and freshness metadata are recommended accompanying controls.
- **Practical example:** A retrieval store keeps source URLs, permissions, timestamps, and document hashes alongside each vector.
- **Illustrative failure:** Retrieved snippets lose permission, source, and freshness context.
- **Recommended control:** Keep source citations and access controls with each record; retrieval is evidence, not authority.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** The paper combines parametric generation with a dense-vector index of Wikipedia accessed through a neural retriever. [Lewis et al., Retrieval-Augmented Generation, abstract](https://arxiv.org/abs/2005.11401v4)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 17. Knowledge Base

- **Chapter:** 2. Prompting and Context
- **Working explanation:** Describes the curated source collection an agent may use for grounded answers and retained knowledge.
- **Practical example:** A sales assistant draws from approved product pages and archived release notes, not ad hoc memory.
- **Illustrative failure:** The agent answers from stale or unapproved material because curation was skipped.
- **Recommended control:** Curate ownership, freshness, provenance, and permissions for every retained source and derived claim.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** The paper combines parametric generation with a dense-vector index of Wikipedia accessed through a neural retriever. [Lewis et al., Retrieval-Augmented Generation, abstract](https://arxiv.org/abs/2005.11401v4)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 18. Retrieval

- **Chapter:** 2. Prompting and Context
- **Working explanation:** Describes locating relevant information. In this guide’s example, authorized source material is retrieved before generating an answer.
- **Practical example:** The agent returns the ranked source records that support an answer before drafting the response.
- **Illustrative failure:** The top match is treated as truth even when ranking confidence is weak.
- **Recommended control:** Retrieve only authorized evidence, preserve ranking context, and show the source behind every material result.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Inputs:** User query, authorized corpus, ranking policy.
- **Outputs:** Ranked evidence with source identifiers.
- **Source-supported point:** The paper combines parametric generation with a dense-vector index of Wikipedia accessed through a neural retriever. [Lewis et al., Retrieval-Augmented Generation, abstract](https://arxiv.org/abs/2005.11401v4)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 19. RAG Pipeline

- **Chapter:** 2. Prompting and Context
- **Working explanation:** Describes combining retrieval with generation; citations and response review are recommended controls, not guarantees inherent in RAG.
- **Practical example:** A field-guide assistant retrieves source sections, drafts the answer, and rejects claims with no citation.
- **Illustrative failure:** Generated language sounds sourced, but the cited evidence does not support the claim.
- **Recommended control:** Require grounded citations, separate retrieved facts from generated language, and fail closed when evidence is insufficient.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Inputs:** Source records, retrieval query, prompt, citation rules.
- **Outputs:** Grounded response with cited source material.
- **Source-supported point:** The paper combines parametric generation with a dense-vector index of Wikipedia accessed through a neural retriever. [Lewis et al., Retrieval-Augmented Generation, abstract](https://arxiv.org/abs/2005.11401v4)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 20. Document Ingestion

- **Chapter:** 2. Prompting and Context
- **Working explanation:** Describes bringing documents into a system for processing. Type checks, parsing, provenance hashes and quarantine are recommended controls.
- **Practical example:** Uploaded PDFs are type-checked, extracted, hashed, and quarantined if parsing fails.
- **Illustrative failure:** Malformed files enter the corpus and create bad chunks or hidden content.
- **Recommended control:** Validate file type, parse deterministically, retain provenance, and quarantine malformed or untrusted inputs.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** AI privacy risks are examined and documented. [NIST AI RMF 1.0, MEASURE 2.10, printed p. 30](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=35)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 21. Semantic Search

- **Chapter:** 2. Prompting and Context
- **Working explanation:** Describes similarity-based lookup and its limits when finding related concepts or evidence.
- **Practical example:** A user searches for 'approval controls' and the system returns related gate, access, and trace concepts.
- **Illustrative failure:** Similarity is mistaken for factual equivalence.
- **Recommended control:** Test relevance against real queries and expose similarity limits rather than presenting matches as certainty.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** The paper combines parametric generation with a dense-vector index of Wikipedia accessed through a neural retriever. [Lewis et al., Retrieval-Augmented Generation, abstract](https://arxiv.org/abs/2005.11401v4)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 22. Language Model

- **Chapter:** 3. Model Lifecycle
- **Working explanation:** Describes the model component that transforms context and instructions into language or structured output.
- **Practical example:** A selected model writes only the assigned draft and cannot publish, sign, or modify accounts.
- **Illustrative failure:** The model is treated as authority rather than a component requiring controls.
- **Recommended control:** Constrain the model to its assigned role and verify outputs before they become records or actions.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** The paper proposes a Transformer architecture based on attention and evaluates machine translation. [Vaswani et al., Attention Is All You Need, abstract](https://arxiv.org/abs/1706.03762v7)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 23. Neural Network

- **Chapter:** 3. Model Lifecycle
- **Working explanation:** Describes the learned computational structure whose behavior depends on architecture, data, and evaluation context.
- **Practical example:** A model card records training family, known limits, evaluation scope, and release owner.
- **Illustrative failure:** A behavior change cannot be traced to model, data, or evaluation conditions.
- **Recommended control:** Track architecture, data lineage, and evaluation conditions so behavior changes can be traced and reproduced.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** The paper proposes a Transformer architecture based on attention and evaluates machine translation. [Vaswani et al., Attention Is All You Need, abstract](https://arxiv.org/abs/1706.03762v7)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 24. Neural Machine Translation

- **Chapter:** 3. Model Lifecycle
- **Working explanation:** Describes translation performed using neural networks. Preserving meaning, terminology and formatting is a quality objective, not a guaranteed result.
- **Practical example:** A multilingual assistant preserves legal terms and sends low-confidence translations to review.
- **Illustrative failure:** The translation is fluent but changes legal, technical, or operational meaning.
- **Recommended control:** Preserve meaning, terminology, and formatting while testing quality across languages and edge cases.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** The paper proposes a Transformer architecture based on attention and evaluates machine translation. [Vaswani et al., Attention Is All You Need, abstract](https://arxiv.org/abs/1706.03762v7)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 25. Model Training

- **Chapter:** 3. Model Lifecycle
- **Working explanation:** Describes the process of fitting model parameters to training data; this guide recommends authorization and evaluation controls around that process.
- **Practical example:** Training data is approved, deduplicated, and tested against a frozen evaluation set before promotion.
- **Illustrative failure:** Leaked or low-quality data inflates results and hides failure modes.
- **Recommended control:** Use documented, authorized data and frozen evaluation sets to detect overfitting, leakage, and regressions.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** AI evaluation documents methods and examines performance and limitations under relevant conditions. [NIST AI RMF 1.0, MEASURE 2.1–2.5, printed p. 29](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=34)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 26. Fine-Tuning

- **Chapter:** 3. Model Lifecycle
- **Working explanation:** Describes adapting a pretrained model through additional training; the guide recommends regression and safety checks around that change.
- **Practical example:** A tuned support model is compared with its base model on accuracy, refusal, and regression checks.
- **Illustrative failure:** A narrow improvement causes regressions outside the tuning examples.
- **Recommended control:** Isolate each tuning change, retain the base-model reference, and verify capability and safety regressions.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Fine-tuning adapts a pretrained model through further training. [Google Machine Learning Glossary, fine tuning](https://developers.google.com/machine-learning/glossary#fine-tuning)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 27. Inference

- **Chapter:** 3. Model Lifecycle
- **Working explanation:** Describes running a trained model on inputs; pinned settings, validation and review are recommended operating controls.
- **Practical example:** The deployed model runs with pinned settings and logs the prompt, schema, and version used.
- **Illustrative failure:** Production outputs shift because model settings or versions drift silently.
- **Recommended control:** Validate inputs, pin the deployed model and settings, and measure output quality under production conditions.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Inference applies a trained model to inputs to obtain predictions or responses. [Google Machine Learning Glossary, inference](https://developers.google.com/machine-learning/glossary#inference)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 28. Function Calling

- **Chapter:** 4. Tool and API Execution
- **Working explanation:** Describes a model proposing a function call for an application to handle. The runtime must enforce authorization and validate arguments before execution.
- **Practical example:** A model proposes a function call, but the runtime validates arguments before any tool executes.
- **Illustrative failure:** The runtime accepts malformed arguments because the model produced plausible JSON.
- **Recommended control:** Use strict schemas, allowlisted functions, bounded timeouts, and result validation before accepting tool output.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Inputs:** Model request, function schema, tool arguments.
- **Outputs:** Tool call result accepted only after validation.
- **Source-supported point:** MCP tools declare input schemas; clients and servers have responsibilities for validation and tool execution safety. [MCP 2025-06-18, Tools: schema, errors and security considerations](https://modelcontextprotocol.io/specification/2025-06-18/server/tools)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 29. API Integration

- **Chapter:** 4. Tool and API Execution
- **Working explanation:** Describes the contract between the agent system and an external software interface.
- **Practical example:** The product connects to a billing API through versioned contracts, authentication, and rate-limit handling.
- **Illustrative failure:** A dependency outage or contract change produces unsafe partial behavior.
- **Recommended control:** Authenticate both sides, version contracts, handle rate limits, and fail safely when dependencies are unavailable.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** The type keyword constrains instance types; required names properties that must be present. [JSON Schema 2020-12 Validation, §§6.1.1 and 6.5.3](https://json-schema.org/draft/2020-12/json-schema-validation#section-6.5.3)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 30. Webhook

- **Chapter:** 4. Tool and API Execution
- **Working explanation:** Describes event-driven delivery to a configured endpoint. Signature verification, replay protection and idempotency are recommended controls when supported.
- **Practical example:** A payment event is accepted only if its signature, timestamp, and idempotency key are valid.
- **Illustrative failure:** Replay or spoofed events trigger duplicate or unauthorized processing.
- **Recommended control:** Verify signatures, reject replayed events, process idempotently, and preserve delivery and retry evidence.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Inputs:** Signed event payload, timestamp, event type.
- **Outputs:** Idempotent event processing result.
- **Source-supported point:** GitHub documents checking an HMAC signature to validate a webhook delivery. [GitHub Docs, Validating webhook deliveries: signature validation](https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 31. Structured Output

- **Chapter:** 4. Tool and API Execution
- **Working explanation:** Describes output organized in a specified format or schema. Validate the received result before storing it or using it to trigger an action.
- **Practical example:** A listing generator must return title, description, price, license, and warnings in a declared schema.
- **Illustrative failure:** Downstream code trusts fields that were never schema-validated.
- **Recommended control:** Validate every response against a versioned schema before storage, display, or downstream execution.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Inputs:** Schema, response, validation rules.
- **Outputs:** Machine-valid response object.
- **Source-supported point:** The type keyword constrains instance types; required names properties that must be present. [JSON Schema 2020-12 Validation, §§6.1.1 and 6.5.3](https://json-schema.org/draft/2020-12/json-schema-validation#section-6.5.3)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 32. Guardrails

- **Chapter:** 5. Safety and Evaluation
- **Working explanation:** Describes controls intended to constrain unsafe or unauthorized behavior. Their coverage and failure modes require testing; they do not guarantee safety.
- **Practical example:** The system blocks unsafe, unauthorized, or out-of-scope actions before any tool or publication step.
- **Illustrative failure:** Controls are advisory only and do not actually block execution.
- **Recommended control:** Fail closed at trust boundaries and log why an action was allowed, rejected, or escalated.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Identity, credentials and access permissions are managed; permissions incorporate least privilege. [NIST CSF 2.0, PR.AA-01–05, printed pp. 19–20](https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.29.pdf#page=24)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 33. Content Filter

- **Chapter:** 5. Safety and Evaluation
- **Working explanation:** Describes screening rules for inputs and outputs before they influence users, tools, or records.
- **Practical example:** Incoming text and outgoing drafts are screened for prohibited data, policy issues, and unsupported claims.
- **Illustrative failure:** The filter misses sensitive data or blocks valid work with no escalation path.
- **Recommended control:** Layer deterministic rules with reviewed classifiers and provide a defined path for uncertain cases.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** AI evaluation documents methods and examines performance and limitations under relevant conditions. [NIST AI RMF 1.0, MEASURE 2.1–2.5, printed p. 29](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=34)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 34. Red Teaming

- **Chapter:** 5. Safety and Evaluation
- **Working explanation:** Describes adversarial testing used to expose abuse paths and verify that fixes hold.
- **Practical example:** A reviewer tries prompt injection, false authority, and tool-abuse cases before private release.
- **Illustrative failure:** Known abuse paths are tested once and never retested after fixes.
- **Recommended control:** Test realistic abuse paths, preserve reproducible cases, and verify fixes against the original exploit conditions.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** AI evaluation documents methods and examines performance and limitations under relevant conditions. [NIST AI RMF 1.0, MEASURE 2.1–2.5, printed p. 29](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=34)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 35. Model Evaluation

- **Chapter:** 5. Safety and Evaluation
- **Working explanation:** Describes measured review of model behavior against representative tasks and acceptance criteria.
- **Practical example:** A fixed test set checks quality, refusal behavior, citation accuracy, and regression before promotion.
- **Illustrative failure:** A model is promoted from anecdotal review instead of measured checks.
- **Recommended control:** Use representative frozen datasets, explicit metrics, and independent checks before promoting a model.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** AI evaluation documents methods and examines performance and limitations under relevant conditions. [NIST AI RMF 1.0, MEASURE 2.1–2.5, printed p. 29](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=34)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 36. Benchmark

- **Chapter:** 5. Safety and Evaluation
- **Working explanation:** Describes a defined task or measurement used for comparison. Record the inputs, settings and conditions so the comparison is meaningful.
- **Practical example:** The team compares a new agent build with the prior locked build under identical inputs.
- **Illustrative failure:** Teams compare different inputs, costs, or settings and call the result a win.
- **Recommended control:** Compare against a stable baseline under identical conditions and report limits with the measured result.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** AI evaluation documents methods and examines performance and limitations under relevant conditions. [NIST AI RMF 1.0, MEASURE 2.1–2.5, printed p. 29](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=34)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 37. Observability

- **Chapter:** 6. Operations and Control
- **Working explanation:** Describes the signals needed to understand system state, performance, failures, and external effects.
- **Practical example:** Dashboards show run status, queue state, failures, costs, and blocked approval gates.
- **Illustrative failure:** Operators see that something failed but not why or where.
- **Recommended control:** Capture the signals needed to explain state, performance, failures, and external effects without exposing secrets.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Telemetry signals, including traces, metrics and logs, help explain system behavior. [OpenTelemetry Observability primer, What is Observability / Logs](https://opentelemetry.io/docs/concepts/observability-primer/)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 38. Execution Trace

- **Chapter:** 6. Operations and Control
- **Working explanation:** Describes correlated evidence about an execution path. A trace only covers what is instrumented and retained; it does not inherently expose every internal model decision.
- **Practical example:** One correlation ID follows the request through prompt, retrieval, tool call, output, and QA.
- **Illustrative failure:** A final output exists but the request path cannot be reconstructed.
- **Recommended control:** Carry one correlation identity across every step so inputs, decisions, tools, and outputs can be reconstructed.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Traces correlate operations through context propagation and spans. [OpenTelemetry, Traces: Context Propagation and Spans](https://opentelemetry.io/docs/concepts/signals/traces/#spans)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 39. Logging

- **Chapter:** 6. Operations and Control
- **Working explanation:** Describes structured event records with severity, timestamps, redaction, retention, and incident value.
- **Practical example:** Structured logs record event type, timestamp, severity, actor, redaction state, and evidence path.
- **Illustrative failure:** Logs expose secrets or omit the fields needed for incident review.
- **Recommended control:** Write structured, timestamped events with clear severity, retention, redaction, and tamper-evidence rules.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Telemetry signals, including traces, metrics and logs, help explain system behavior. [OpenTelemetry Observability primer, What is Observability / Logs](https://opentelemetry.io/docs/concepts/observability-primer/)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 40. Checkpoint

- **Chapter:** 6. Operations and Control
- **Working explanation:** Describes saved state from which work may resume. Integrity verification and duplicate prevention are separate controls required by this guide’s design.
- **Practical example:** The build saves validated state before moving from manuscript to package to marketplace packet.
- **Illustrative failure:** Resume logic starts from stale or unverifiable state.
- **Recommended control:** Persist only verified state with source hashes so work can resume without duplication or silent drift.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Recovery includes checking restoration assets and restored systems for integrity. [NIST CSF 2.0, RC.RP-03–05, printed p. 23](https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.29.pdf#page=28)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 41. Retry

- **Chapter:** 6. Operations and Control
- **Working explanation:** Describes bounded repeat attempts for transient failures with backoff, idempotency, and terminal states.
- **Practical example:** A failed render retries with bounded attempts and stops with a named terminal state.
- **Illustrative failure:** A non-transient failure is retried until it creates duplicates or burns time.
- **Recommended control:** Retry only transient failures with bounded attempts, backoff, idempotency, and an explicit terminal state.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Automatic retries of non-idempotent operations require knowledge that repeating the operation is safe or that the original was not applied. [RFC 9110, §9.2.2, Idempotent Methods](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.2)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 42. Fallback

- **Chapter:** 6. Operations and Control
- **Working explanation:** Describes a safe alternate path when the preferred process cannot complete under current constraints.
- **Practical example:** If a tagged-PDF validator is unavailable, the build marks accessibility blocked and continues private evidence work.
- **Illustrative failure:** The degraded path hides reduced quality or weaker controls.
- **Recommended control:** Choose a safe alternate path that preserves requirements and makes degraded behavior visible.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Recovery includes checking restoration assets and restored systems for integrity. [NIST CSF 2.0, RC.RP-03–05, printed p. 23](https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.29.pdf#page=28)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 43. Approval Gate

- **Chapter:** 6. Operations and Control
- **Working explanation:** Describes the exact decision point that must pass before a consequential action proceeds.
- **Practical example:** Publication remains blocked until the owner approves exact files, price, listing, and delivery route.
- **Illustrative failure:** Approval is generic and not bound to exact files or actions.
- **Recommended control:** Place approval immediately before the consequential action and bind it to exact inputs and scope.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Organizations define and differentiate roles for human oversight in AI-system decisions. [NIST AI RMF 1.0, GOVERN 3.2, printed p. 23](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=28)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 44. Access Control

- **Chapter:** 6. Operations and Control
- **Working explanation:** Describes least-privilege boundaries for accounts, files, tools, services, and protected operations.
- **Practical example:** Only authorized keys, paths, roles, and accounts can reach protected tools or private assets.
- **Illustrative failure:** A broad token or path lets one component reach unrelated systems.
- **Recommended control:** Apply least privilege, deny by default, and verify authorization at every protected boundary.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** APIs must check whether the caller may access each requested object. [OWASP API1:2023, How To Prevent](https://api-security.owasp.org/editions/2023/en/0xa1-broken-object-level-authorization/)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 45. Secret Key

- **Chapter:** 6. Operations and Control
- **Working explanation:** Describes protected credentials and the storage, rotation, and non-disclosure rules around them.
- **Practical example:** API keys remain in a vault or keychain and never appear in manifests, logs, PDFs, or prompts.
- **Illustrative failure:** A key leaks through logs, prompts, artifacts, or committed files.
- **Recommended control:** Store secrets in controlled vaults, limit their scope, rotate them, and prevent exposure in logs or outputs.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Identity, credentials and access permissions are managed; permissions incorporate least privilege. [NIST CSF 2.0, PR.AA-01–05, printed pp. 19–20](https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.29.pdf#page=24)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 46. Data Privacy

- **Chapter:** 6. Operations and Control
- **Working explanation:** Describes how sensitive or personal data is minimized, protected, retained, and removed.
- **Practical example:** Customer data is minimized, redacted from logs, and retained only for an approved purpose.
- **Illustrative failure:** The system collects more personal data than the product needs.
- **Recommended control:** Minimize collection, encrypt sensitive data, enforce retention limits, and honor access and deletion rights.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** AI privacy risks are examined and documented. [NIST AI RMF 1.0, MEASURE 2.10, printed p. 30](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=35)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 47. Machine Readability

- **Chapter:** 7. Distribution and Deployment
- **Working explanation:** Describes structured product or system data that software can parse and validate reliably.
- **Practical example:** The package includes a JSON manifest so scripts can verify files, hashes, editions, and status.
- **Illustrative failure:** Humans understand the product, but scripts cannot verify the package.
- **Recommended control:** Publish stable schemas, explicit types, and versioned semantics that parsers can validate reliably.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** The type keyword constrains instance types; required names properties that must be present. [JSON Schema 2020-12 Validation, §§6.1.1 and 6.5.3](https://json-schema.org/draft/2020-12/json-schema-validation#section-6.5.3)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 48. Microservice

- **Chapter:** 7. Distribution and Deployment
- **Working explanation:** Describes an independently operated service with a clear owner, contract, health check, and failure boundary.
- **Practical example:** A converter service has one owner, one health check, one contract, and isolated failure handling.
- **Illustrative failure:** A service fails independently but takes down unrelated product work.
- **Recommended control:** Keep service ownership and contracts clear, isolate failures, and make deployments independently observable.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Telemetry signals, including traces, metrics and logs, help explain system behavior. [OpenTelemetry Observability primer, What is Observability / Logs](https://opentelemetry.io/docs/concepts/observability-primer/)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 49. x402 Payment

- **Chapter:** 7. Distribution and Deployment
- **Working explanation:** Describes an HTTP-based payment protocol for accessing priced resources. Keeping the free Catalog separate from paid resources is AgentiScript’s product decision.
- **Practical example:** Machine-payment delivery remains separate from Gumroad or other human marketplace products.
- **Illustrative failure:** Machine commerce is mixed with human storefront state and confuses fulfillment.
- **Recommended control:** Keep machine commerce separate from human storefront products and verify settlement before delivery.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Inputs:** Priced resource, payment request, settlement proof.
- **Outputs:** Delivery authorization after verified payment.
- **Source-supported point:** The documented paid-resource flow separates payment verification and settlement from resource delivery. [x402, Client / Server: verification and settlement responsibilities](https://docs.x402.org/core-concepts/client-server)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## 50. Deployment

- **Chapter:** 7. Distribution and Deployment
- **Working explanation:** Describes making a software version available in a target environment. Immutable artifacts, health checks, approval and rollback are recommended release controls.
- **Practical example:** A release advances only from immutable artifacts through health checks, approval, and rollback evidence.
- **Illustrative failure:** A release ships without health checks or a tested rollback path.
- **Recommended control:** Release in controlled stages with immutable artifacts, health checks, rollback criteria, and recorded evidence.
- **Related concepts:** Guardrails; Observability; Checkpoint
- **Source-supported point:** Recovery includes checking restoration assets and restored systems for integrity. [NIST CSF 2.0, RC.RP-03–05, printed p. 23](https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.29.pdf#page=28)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## Diagram 1. Controlled Agent Loop

- **Flow:** Prompt Input -> Agent Core -> Tool Use -> Structured Output -> Checkpoint
- **Explanation:** Shows how a request becomes a bounded action only after the agent core, tool boundary, structured response, and saved state all line up.
- **Source-supported point:** The type keyword constrains instance types; required names properties that must be present. [JSON Schema 2020-12 Validation, §§6.1.1 and 6.5.3](https://json-schema.org/draft/2020-12/json-schema-validation#section-6.5.3)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## Diagram 2. RAG Evidence Path

- **Flow:** Document Ingestion -> Knowledge Base -> Retrieval -> RAG Pipeline -> Response Review
- **Explanation:** Separates source preparation from retrieval and generation so unsupported claims can be rejected before a response is trusted.
- **Source-supported point:** The paper combines parametric generation with a dense-vector index of Wikipedia accessed through a neural retriever. [Lewis et al., Retrieval-Augmented Generation, abstract](https://arxiv.org/abs/2005.11401v4)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## Diagram 3. Tool Execution Boundary

- **Flow:** Access Control -> Function Calling -> API Integration -> Optional Webhook Event -> Execution Trace
- **Explanation:** Checks authorization before external actions, validates requested tool arguments, and records execution. A webhook is an optional event channel, not a required step in every tool call.
- **Source-supported point:** MCP tools declare input schemas; clients and servers have responsibilities for validation and tool execution safety. [MCP 2025-06-18, Tools: schema, errors and security considerations](https://modelcontextprotocol.io/specification/2025-06-18/server/tools)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## Diagram 4. Safety and Evaluation Loop

- **Flow:** Guardrails -> Content Filter -> Red Teaming -> Model Evaluation -> Benchmark
- **Explanation:** Connects preventive controls with adversarial testing and comparable evaluation so safety work becomes release evidence.
- **Source-supported point:** AI evaluation documents methods and examines performance and limitations under relevant conditions. [NIST AI RMF 1.0, MEASURE 2.1–2.5, printed p. 29](https://nvlpubs.nist.gov/nistpubs/ai/NIST.AI.100-1.pdf#page=34)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## Diagram 5. Release and Operations Path

- **Flow:** Observability -> Logging -> Approval Gate -> Deployment -> Rollback
- **Explanation:** Keeps deployment tied to operating signals, recorded approval, and a recoverable prior state.
- **Source-supported point:** Recovery includes checking restoration assets and restored systems for integrity. [NIST CSF 2.0, RC.RP-03–05, printed p. 23](https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.29.pdf#page=28)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## Example 1. Customer support agent with approval gates

- **Situation:** A SaaS company wants an agent to draft account-specific support replies without changing customer records automatically.
- **Goal:** Reduce response time while keeping customer-impacting actions behind review.
- **System:** Prompt rules, knowledge base retrieval, structured answer schema, tool allowlist, approval gate, execution trace.
- **Flow:** Prompt Input -> Retrieval -> RAG Pipeline -> Structured Output -> Human in the Loop -> Checkpoint.
- **Controls:** Cited sources, no unaudited account mutation, signed tool requests, reviewer decision log.
- **Failure response:** Reject unsupported answers, keep the draft, preserve trace evidence, and route to a human support owner.
- **Evidence:** Source links, retrieved passages, output schema result, approval record, and final customer message hash.
- **Source-supported point:** The type keyword constrains instance types; required names properties that must be present. [JSON Schema 2020-12 Validation, §§6.1.1 and 6.5.3](https://json-schema.org/draft/2020-12/json-schema-validation#section-6.5.3)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## Example 2. Research assistant with grounded retrieval

- **Situation:** An internal analyst uses an agent to summarize policy and technical sources for a product decision.
- **Goal:** Produce a source-backed briefing that separates evidence from inference.
- **System:** Document ingestion, vector database, retrieval, citations, content filter, model evaluation.
- **Flow:** Document Ingestion -> Vector Database -> Retrieval -> Language Model -> Model Evaluation -> Logging.
- **Controls:** Authorized corpus only, freshness checks, citation requirement, unsupported-claim rejection.
- **Failure response:** Mark the claim unresolved, list missing evidence, and avoid generating a recommendation from stale context.
- **Evidence:** Corpus manifest, document hashes, retrieval ranking, extracted text, and evaluation checklist.
- **Source-supported point:** The paper combines parametric generation with a dense-vector index of Wikipedia accessed through a neural retriever. [Lewis et al., Retrieval-Augmented Generation, abstract](https://arxiv.org/abs/2005.11401v4)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

## Example 3. Machine-readable product delivery workflow

- **Situation:** A private digital product must be prepared for future human and machine delivery without activating sales.
- **Goal:** Package the product so delivery rules, metadata, license, and rollback are verifiable before publication.
- **System:** Machine readability, manifest, x402 payment boundary, access control, deployment, archival rollback.
- **Flow:** Machine Readability -> Manifest -> Access Control -> Optional Paid Resource Gate -> Delivery -> Observability.
- **Controls:** Separate human storefronts from x402, verify hashes, gate only the separately priced resource on verified payment or owner approval; leave free public reading ungated.
- **Failure response:** Stop publication, retain failed artifacts, restore prior active state, and document the blocker.
- **Evidence:** Package checksums, license, channel packet, delivery test, and rollback report.
- **Source-supported point:** The documented paid-resource flow separates payment verification and settlement from resource delivery. [x402, Client / Server: verification and settlement responsibilities](https://docs.x402.org/core-concepts/client-server)
- **Source boundary:** This reference supports the named topic, not every sentence or the proposed architecture. The definition, example and control are AgentiScript-authored guidance.

# Glossary

- **Agent:** Software that uses a model, context, tools, and controls to pursue a bounded goal.
- **Approval gate:** A required human or system decision before a consequential action.
- **Benchmark:** A stable comparison used to measure behavior against a known baseline.
- **Checkpoint:** A verified saved state that supports recovery and reproducibility.
- **Context:** The active information available to the model at decision time.
- **Fallback:** A defined alternate path used when the primary path cannot proceed safely.
- **Guardrail:** A control that rejects, redirects, or escalates unsafe or unauthorized behavior.
- **Manifest:** A machine-readable inventory of product files, metadata, hashes, and boundaries.
- **Observability:** Signals that explain system state, performance, failures, and external effects.
- **Provenance:** Evidence showing where an asset, claim, record, or output came from.
- **RAG:** Retrieval-augmented generation, where retrieved evidence supports generated output.
- **Rollback:** A planned return to a prior verified state.
- **Structured output:** Response data that must match a declared schema.
- **Trace:** A correlated record of steps, inputs, decisions, tools, and outputs.
- **Vector database:** A retrieval store for semantically related records.

# Bibliography

- **[NIST-AI-RMF]** NIST AI Risk Management Framework 1.0 - https://www.nist.gov/publications/artificial-intelligence-risk-management-framework-ai-rmf-10
- **[NIST-CSF]** NIST Cybersecurity Framework 2.0 - https://www.nist.gov/publications/nist-cybersecurity-framework-csf-20
- **[OWASP-GENAI]** OWASP Top 10 for LLM Applications 2025 - https://genai.owasp.org/llm-top-10/
- **[MCP-2026]** Model Context Protocol 2026-07-28 - https://blog.modelcontextprotocol.io/posts/2026-07-28/
- **[JSON-SCHEMA]** JSON Schema Draft 2020-12, Validation vocabulary - https://json-schema.org/draft/2020-12/json-schema-validation
- **[OTEL]** OpenTelemetry Specification 1.60.0, pinned release - https://github.com/open-telemetry/opentelemetry-specification/tree/v1.60.0/specification
- **[OAUTH2]** OAuth 2.0 RFC 6749 - https://datatracker.ietf.org/doc/rfc6749/
- **[WCAG22]** Web Content Accessibility Guidelines 2.2 - https://www.w3.org/TR/WCAG22/
- **[OPENAI-SO]** OpenAI Structured Outputs - https://openai.com/index/introducing-structured-outputs-in-the-api/
- **[NIST-PRIVACY]** NIST Privacy Framework 1.0 - https://www.nist.gov/privacy-framework/privacy-framework
- **[OWASP-API]** OWASP API Security Top 10 2023 - https://owasp.org/API-Security/editions/2023/en/0x11-t10/
- **[HTTP-SEMANTICS]** HTTP Semantics RFC 9110 - https://datatracker.ietf.org/doc/rfc9110/
- **[WAI-ALT]** W3C WAI Images Tutorial - https://www.w3.org/WAI/tutorials/images/
- **[X402]** x402 client/server verification and settlement flow - https://docs.x402.org/core-concepts/client-server
