diff --git a/demo-app-react/public/index.html b/demo-app-react/public/index.html index bfbdc66..446ae52 100644 --- a/demo-app-react/public/index.html +++ b/demo-app-react/public/index.html @@ -1204,7 +1204,7 @@ 04 Audit & Evidence 05 Custom Gates 06 Risk Scoring - 07 Labs (11) + 07 Labs (10) 08 Install 09 Workflow v0.9.0 ↗ ↗ Open Demo → @@ -1271,7 +1271,7 @@
// 07 interactive labs
- Eleven interactive labs walk you through every AIGC capability. No model API key required for the core labs. - Open the demo app → + Ten interactive labs walk you through every AIGC capability. No model API key required for the core labs.
Hands-on GovernanceSession: open a session, step through a multi-invocation workflow, trigger intentional failures, run workflow doctor, and inspect the workflow artifact.
extends.extends.import AIGC +from aigc import AIGC -# AIGC.open_session() (always instance-scoped) -with AIGC.open_session( - manifest="workflows/review.yaml", - context={"user_id": user_id}, +governance = AIGC() + +# open_session() is always instance-scoped +with governance.open_session( + policy_file="policies/review.yaml", ) as session: - # Step 1: pre-call authorization - pre = session.enforce_pre_call({ - "policy_file": "policies/review.yaml", - "input": {"document": doc}, - "role": "reviewer", + # Phase A: pre-call authorization + pre = session.enforce_step_pre_call({ + "policy_file": "policies/review.yaml", + "input": {"prompt": prompt}, + "output": {}, + "context": {"caller_id": "demo"}, "model_provider": "anthropic", - "model_identifier": "claude-3-5-sonnet", + "model_identifier": "claude-sonnet-4-6", + "role": "ai-assistant", }) # You call the model - response = your_model_client.call(doc) + response = your_model_client.call(prompt) - # Step 2: post-call validation + audit - result = pre.complete({ - "output": {"response": response}, - "context": {"latency_ms": 312}, - }) + # Phase B: post-call validation + audit + session.enforce_step_post_call(pre, {"result": response}) + + session.complete() -# Workflow artifact produced on __exit__ -# Source: github.com/nealsolves/aegis/tree/develop+# Workflow artifact on session.workflow_artifact after __exit__ +# Source: github.com/nealsolves/aigc/tree/develop