-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
blockedBlocked by external dependency or issueBlocked by external dependency or issuecomplexity:complexHigh effort, significant design neededHigh effort, significant design neededphase:docsDocumentationDocumentationphase:examplesExample scriptsExample scriptspriority:mediumImportant but not blockingImportant but not blockingsize:LLarge change, over 200 linesLarge change, over 200 linestype:docsDocumentationDocumentation
Description
Milestone: v0.3.0 | Tier: Strategic | Effort: Medium
Problem
No tutorial content exists. README.md has a ~10-line quickstart but doesn't walk through a real scenario. Users evaluating the library must reverse-engineer the examples and docstrings to understand:
- How capabilities, principals, and policies relate
- When to use each response mode
- How PII redaction works end-to-end
- How to connect to real tool backends (MCP)
The existing examples (basic_cli.py, billing_demo.py, http_driver_demo.py) are functional but not pedagogical.
Proposed Change
1. Tutorial document (docs/tutorial.md)
"Secure your first MCP tool in 5 minutes" — step-by-step guide:
- Install:
pip install agent-kernel - Define a capability (billing lookup)
- Create a principal (agent identity)
- Configure policy (what this agent is allowed to do)
- Grant access and get a token
- Invoke the capability
- Observe firewall redaction (PII fields masked)
- Try a denied request (wrong role) and see the error
- Connect to an MCP server (if MCP driver is available)
Each step has copy-pasteable code with expected output shown.
2. Self-contained tutorial script (examples/tutorial_mcp.py)
- Uses
InMemoryDriver(no external dependencies) - Demonstrates the full lifecycle: register → grant → invoke → expand → explain
- Shows policy enforcement (grant denied, reason explained)
- Shows firewall modes (summary vs. table vs. handle_only)
- Shows PII redaction before/after
- Prints clear annotated output explaining each step
- Runnable via
python examples/tutorial_mcp.pywith zero setup
3. Interactive Jupyter notebook (optional)
examples/tutorial.ipynb— same content as the script but interactive- Each cell has markdown explaining the concept, then code
- Useful for workshops, demos, and evaluation
4. README quickstart refresh
Update README.md quickstart to reference the tutorial and provide the minimal "wow" moment in 5 lines.
Acceptance Criteria
-
docs/tutorial.mdwalks a new user from install to working invocation in <5 minutes -
examples/tutorial_mcp.pyruns successfully with zero external dependencies - Tutorial demonstrates: registration, policy enforcement (allow + deny), firewall redaction, expand/explain
- All code snippets in the tutorial are tested (either via doctest or by running the example in CI)
- README quickstart updated with clear pointer to tutorial
- Tutorial runs in CI (
make cior equivalent)
Affected Files
docs/tutorial.md(new)examples/tutorial_mcp.py(new)examples/tutorial.ipynb(new, optional)README.md(quickstart refresh)
Dependencies
- Benefits from MCP Driver (OpenTelemetry integration: spans, metrics, and trace export #38) for MCP-specific tutorial section
- Can be started immediately with
InMemoryDriver
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
blockedBlocked by external dependency or issueBlocked by external dependency or issuecomplexity:complexHigh effort, significant design neededHigh effort, significant design neededphase:docsDocumentationDocumentationphase:examplesExample scriptsExample scriptspriority:mediumImportant but not blockingImportant but not blockingsize:LLarge change, over 200 linesLarge change, over 200 linestype:docsDocumentationDocumentation