Hands-On Lab: OpenShell, Deep Agents, and Portable Skills¶
Code-executing agents are dramatically more capable when they can plan, write analysis scripts, and load domain playbooks on demand. Without strong isolation, however, giving an agent a shell or a library of third-party skills turns every prompt into a privilege-escalation risk.
In ctxEco, three open standards work together to give you both full agentic capability and fail-closed enterprise governance:
- NVIDIA OpenShell (
Apache-2.0) — kernel-isolated sandbox execution (Landlock, seccomp, network namespaces) withegress: "none"by default and no-see-key credential injection. - LangChain Deep Agents (
MIT) — planning, filesystem/subagent delegation, and progressive disclosure of portableSKILL.md(skill-package.v1) packages. - ctxEco Context Plane (
context-plane.v1) — the four governed retrieval and provenance tools (context_local_search,context_global_community,context_drift_traversal,context_provenance_audit) plus OPA-filteredcontext_tool_search.
1. Progressive Disclosure: Why SKILL.md Beats Monolithic Prompts¶
Loading fifty tool schemas and full domain manuals into every system prompt wastes context window, degrades reasoning, and leaks tool metadata the caller is not even authorized to invoke.
Instead, ctxEco separates discovery from execution in two stages:
| Stage | Endpoint / Tool | What the Agent Receives | Governance Gate |
|---|---|---|---|
| 1. Startup Index | GET /api/v1/skills?harness=deep-agent |
name, version, triggerSummary, sandboxProfile, modelAliasHints |
JWT + OPA read + tenant scope |
| 2. Tool Discovery | context_tool_search |
Only OPA-authorized and clearance-matched tool schemas | OPA pre-filter before ranking |
| 3. Full Skill Load | GET /api/v1/skills/:name/:version |
Full SKILL.md instructions |
Gate B sanitized at registration |
2. Authoring a skill-package.v1 Manifest¶
Every skill stored in the Skills Registry must conform to skill-package.v1 and pass Gate B sanitization before it is accepted:
{
"apiVersion": "skill-package.v1",
"metadata": {
"name": "graphrag-citation-auditor",
"version": "1.0.0",
"description": "Audits GraphRAG answer citations against Class A and Class B provenance.",
"author": "ctxEco Platform",
"license": "Apache-2.0",
"tags": ["graphrag", "provenance", "audit"]
},
"progressiveDisclosure": {
"triggerSummary": "Use when verifying provenance trails and Class A/B/C boundaries.",
"instructionsPath": "SKILL.md"
},
"harnessCompatibility": ["deep-agent", "native-rag"],
"sandboxRequirements": {
"required": true,
"profile": "openshell-restricted",
"egress": "none",
"noSeeKeyRefs": ["ctxeco-context-plane-token"]
},
"modelAliasHints": ["standard", "decision"],
"toolDependencies": {
"contextPlaneTools": ["context_provenance_audit", "context_local_search"],
"optionalMcpTools": []
},
"sanitization": {
"containsTenantData": false,
"containsSecrets": false,
"truthWriteClass": "C"
}
}
What Gate B Rejects Automatically¶
- Hardcoded provider model names — Skills may only reference approved LiteLLM aliases (
fast,standard,frontier,utility,image,image-fast,rerank,coding,decision). - Outbound network egress —
sandboxRequirements.egressmust be"none". Any external endpoint access is mediated by the OpenShell supervisor and OPA, never by the skill itself. - Class A truth assertions —
sanitization.truthWriteClassmust be"C". Agents may propose evidence with provenance, but only an authorized human asserts Class A truth in ctxEco Workspace Fabric. - Leaked secrets or tenant data — Token patterns, private keys, and tenant payloads are rejected with
400before storage. - Path traversal —
instructionsPathmust be a relative.mdpath without...
3. Running Inside OpenShell Without Seeing Secrets¶
When a Deep Agent executes Python or shell analysis inside an OpenShell sandbox:
- Zero-egress namespace: The sandbox cannot open arbitrary outbound sockets.
- No-see-key injection:
noSeeKeyRefs(such asctxeco-context-plane-token) are held by the OpenShell supervisor outside the container. The agent calls the Context Plane through a local governed proxy without ever reading the raw credential. - Ephemeral state: Scratch files stay inside the sandbox; durable state lives in Temporal workflows and Valkey caches, while visual webhooks from fair-code automation tools like
n8nenter strictly throughPOST /api/v1/webhooks/ingest.
4. Inspecting the Sealed Result in ctxEco Workspace Fabric¶
Every completed run emits a sealed AnswerRecord (answer-record.v1) carrying:
trace_id(W3C Trace Context propagated from the request through the Deep Agent, MCP gateway, and Context Plane)decision_ids(the exact OPA authorization decisions evaluated)truth_classes(A,B,C) and grounded node/edge citationshashes.record_sha256(cross-language canonical SHA-256 digest)
In ctxEco Workspace Fabric, reviewers can open the provenance drawer for any answer card, verify the record_sha256 seal, and promote verified Class C agent proposals to Class A human-asserted truth through the Curation Panel.