Plan, Approve, Execute, Trace.

The Praeon Kernel aligns typed agent plans with policy controls and audit expectations.

Plan

Agent proposes a typed PlanLang document describing actors, capabilities, constraints, and budgets.

Pre-Flight

Static analysis, policy evaluation, and dry-run semantics confirm controls before execution.

Approve & Execute

Human or automated approvals authorize least-privilege execution through adapters.

Trace & Replay

Operational traces stay encrypted; audit traces are redacted and replayable for drills or incidents.

JavaScript SDK

import { plan, execute } from "@praeon/sdk";

const p = plan({
  actor: { type: "agent", id: "salesbot" },
  capabilities: [{
    tool: "email",
    name: "send",
    scopes: ["domain:example.com"]
  }],
  constraints: {
    budget: { currency: "USD", max: 200 },
    riskLevel: "low"
  },
  steps: [{
    id: "s1",
    action: {
      tool: "email",
      capability: "send",
      params: {
        to: "user@example.com",
        subject: "Your credit",
        bodyTemplate: "tplA"
      }
    },
    preconditions: [
      "recipient.domain in allowlist",
      "no_pii(bodyTemplate)"
    ]
  }],
  approvals: [{ stepId: "s1", type: "human", role: "manager" }],
  policyRef: ["policy://corp/email-low-risk"]
});

const result = await execute(p); // pre-flight -> approval -> execute -> trace

Python SDK

from praeon import plan, execute

p = plan({
    "actor": {"type": "agent", "id": "salesbot"},
    "capabilities": [{
        "tool": "email",
        "name": "send",
        "scopes": ["domain:example.com"],
    }],
    "constraints": {
        "budget": {"currency": "USD", "max": 200},
        "riskLevel": "low",
    },
    "steps": [{
        "id": "s1",
        "action": {
            "tool": "email",
            "capability": "send",
            "params": {
                "to": "user@example.com",
                "subject": "Your credit",
                "bodyTemplate": "tplA",
            },
        },
        "preconditions": [
            "recipient.domain in allowlist",
            "no_pii(bodyTemplate)",
        ],
    }],
    "approvals": [{"stepId": "s1", "type": "human", "role": "manager"}],
    "policyRef": ["policy://corp/email-low-risk"],
})

result = execute(p)  # pre-flight -> approval -> execute -> trace