Generates and reviews code using the Arelis AI Governance SDK for TypeScript (@arelis-ai/ai-governance-sdk) and Python (ai-governance-sdk). Covers createArelis / create_arelis orchestration, governedInvoke / governed_invoke, agents.run, governance gates, managed PII config, platform events, causal graphs, policy engines, audit sinks, MCP, RAG, memory, quotas, and compliance. Triggers on: imports from @arelis-ai packages, from arelis import, GovernanceContext, createArelis, create_arelis, createArelisClient, create_arelis_platform, withGovernanceGate, with_governance_gate, governedInvoke, governed_invoke, or AI Governance SDK questions.
From arelis-sdknpx claudepluginhub arelis-ai/ai-governance-plugin --plugin arelis-sdkThis skill uses the workspace's default tool permissions.
references/python/agent-tool-patterns.mdreferences/python/api-reference.mdreferences/python/examples/agents-run.mdreferences/python/examples/governance-gate.mdreferences/python/examples/governed-invoke.mdreferences/python/examples/graphs-proofs-pipeline.mdreferences/python/examples/mcp-quotas-errors.mdreferences/python/examples/pii-and-policy.mdreferences/python/examples/platform-events-risk.mdreferences/python/examples/policy-crud.mdreferences/python/examples/setup-and-registration.mdreferences/python/governance-patterns.mdreferences/python/model-patterns.mdreferences/python/platform-pipeline.mdreferences/python/setup-patterns.mdreferences/python/testing.mdreferences/shared/concepts.mdreferences/shared/platform-api.mdreferences/shared/policies.mdreferences/typescript/agent-tool-patterns.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Configures VPN and dedicated connections like Direct Connect, ExpressRoute, Interconnect for secure on-premises to AWS, Azure, GCP, OCI hybrid networking.
Governed AI orchestration framework supporting TypeScript and Python. Every operation needs a GovernanceContext, emits audit events, and integrates with the Arelis Platform for risk, compliance, and causal lineage.
@arelis-ai/ai-governance-sdk, uses createArelis, governedInvoke, withGovernanceGate, ArelisPlatform, .ts/.tsx filespip install ai-governance-sdk, imports from arelis (e.g. from arelis import create_arelis, GovernedInvokeInput), .py files, FastAPI/Django/Flask| Aspect | TypeScript | Python |
|---|---|---|
| Package | @arelis-ai/ai-governance-sdk | ai-governance-sdk (PyPI), import as from arelis import ... |
| Recommended entrypoint | createArelis() | create_arelis() |
| High-level model calls | arelis.governedInvoke() | arelis.governed_invoke() |
| High-level agent loop | arelis.agents.run() | arelis.agents.run() |
| Managed PII config | arelis.governance.getPiiConfig() | arelis.governance.get_pii_config() |
| Governance gate | withGovernanceGate() | with_governance_gate() |
| PII scanning | scanPromptForPii() | scan_prompt_for_pii() |
| Platform client | ArelisPlatform / arelis.platform | create_arelis_platform() / arelis.platform |
| Local governance client | createArelisClient() | Not available |
| Policy engine | Local PolicyEngine with checkpoints | Platform-side evaluate_policy() + managed PII |
| Audit sink | Local sink + platform events | Platform events only |
import { createArelis, type GovernedAgentTool } from '@arelis-ai/ai-governance-sdk';
const arelis = createArelis({
platform: {
apiKey: process.env.ARELIS_API_KEY!,
...(process.env.ARELIS_API_URL ? { baseUrl: process.env.ARELIS_API_URL } : {}),
},
aiSystemId, // optional: auto-propagated to all SDK surfaces
});
const result = await arelis.governedInvoke({
model: 'gemini-2.5-flash',
prompt: 'Summarize AI governance controls.',
denyMode: 'return',
invoke: async (sanitizedPrompt) => callModel(sanitizedPrompt),
});
from arelis import create_arelis, GovernedInvokeInput
arelis = create_arelis({
"platform": {
"apiKey": os.environ["ARELIS_API_KEY"],
**({"baseUrl": os.environ["ARELIS_API_URL"]} if os.environ.get("ARELIS_API_URL") else {}),
},
"aiSystemId": ai_system_id, # optional: auto-propagated
})
result = await arelis.governed_invoke(GovernedInvokeInput(
model="gemini-2.5-flash",
prompt="Summarize AI governance controls.",
invoke=lambda sanitized: call_model(sanitized),
deny_mode="return",
))
| Field | Type | Required | Description |
|---|---|---|---|
org | { id, name } | yes | Organization |
actor | { type, id, email?, roles? } | yes | Who — human | service | agent |
purpose | string | yes | Why — e.g. customer-support, chat |
environment | string | yes | Where — dev | staging | prod |
session_id | string | no | Session grouping |
tags | dict/object | no | Arbitrary key-value tags |
Optional aiSystemId set at config level is auto-forwarded through all platform-managed surfaces: governedInvoke, agents.run, governance gate telemetry, events.create, evaluatePolicy, risk.evaluate, proofs.create, and MCP evaluations.
Precedence: per-call > createArelis({ aiSystemId }) > platform: { aiSystemId } > omitted.
Compatibility: evaluatePolicy retries once without aiSystemId on HTTP 400 for backward compat.
@arelis-ai/ai-governance-sdk; named exports only, type imports for typescreateArelis({ platform, aiSystemId }) — SDK auto-forwards to all surfacesArelisPlatform base URL defaults to https://api.arelis.digitalwithGovernanceGate accepts ArelisPlatform directly; gate decisions include timingsresult.warnings; always await platform callscreateCompositeSink takes an array — NOT spread argsArelisClient has NO client.policy — export PolicyEngine directly for custom checkpointspip install ai-governance-sdk (NOT arelis); import from areliscreate_arelis + governed_invoke — handles PII, policy, events, risk automaticallygoverned_invoke accepts sync or async invoke; deny_mode="return" (default) or "throw"await; use try/except to swallow errorssource=arelis.platform (not arelis) for gate functions"allow", "deny", "warn", "escalate"startCausalGraph() BEFORE graphs.commit()| Task | Reference | Examples |
|---|---|---|
| Installation, create_arelis, web frameworks | setup-patterns.md | examples/setup-and-registration.md |
| governed_invoke, Gemini/Claude/OpenAI | model-patterns.md | examples/governed-invoke.md |
| PII scanning, BeforeToolCall/AfterToolResult | governance-patterns.md | examples/pii-and-policy.md |
| Governance gates (standalone + manual) | governance-patterns.md | examples/governance-gate.md |
| agents.run, governed agent loop | agent-tool-patterns.md | examples/agents-run.md |
| Platform policy CRUD | governance-patterns.md | examples/policy-crud.md |
| Events, evaluatePolicy, risk | platform-pipeline.md | examples/platform-events-risk.md |
| Causal graphs, proofs, post-stream pipeline | platform-pipeline.md | examples/graphs-proofs-pipeline.md |
| MCP, quotas, error handling | api-reference.md | examples/mcp-quotas-errors.md |
| Testing with mocks | testing.md | — |