Skip to main content
You want to know what a generated session story actually looks like for a real workflow. This walkthrough follows a release gate agent that reviews a production rollout, calls a risky pipeline tool, and produces a dashboard story with the evidence reviewers need. When you finish, the session replay shows a summary, grouped timeline, action item, and guardrail recommendation tied back to the raw events.

Scenario

A release gate agent checks whether a production deployment can proceed. It reads release metadata, evaluates the rollout, and attempts to execute a production pipeline. In Monitor mode, the action is observed and may be recommended for approval later. In Enforce mode, the same guardrail can block or pause the action before the callback runs.

Step 1 - Capture the session

Use a session for the whole release review and instrument the risky tool with explicit action and resource metadata.
await apie.withSession(
  {
    kind: "pipeline",
    inputSummary: "Review payments-api production rollout",
  },
  async (session) => {
    await apie.withRun(
      {
        sessionId: session.id,
        inputSummary: "Release gate check",
      },
      async (run) => {
        await apie.withTool(
          {
            runId: run.id,
            tool: { name: "release.read_manifest", provider: "github" },
            action: { type: "read", name: "read_manifest" },
            resource: { type: "code_repository", environment: "production" },
          },
          async () => readReleaseManifest(),
        );

        await apie.withTool(
          {
            runId: run.id,
            tool: { name: "cicd.trigger_pipeline", provider: "cicd", riskLevel: "high" },
            action: { type: "execute", name: "trigger_pipeline" },
            resource: { type: "pipeline_run", environment: "production" },
          },
          async () => triggerProductionPipeline(),
        );
      },
    );
  },
);

await apie.flush();
await apie.shutdown();

Step 2 - Open the session replay

Open the session in the Apie dashboard. While generation runs, you may see Story generation queued or Generating session story. The deterministic timeline remains available during this window. When the generated story is ready, the top of the session replay should read like an incident or release review:
Story elementExample outcome
Summary”Release gate attempted production pipeline execution”
Outcomeapproval_required, blocked, succeeded, or another observed outcome from the session
RiskHigh, because the session included production pipeline execution
ConfidenceBased on the event metadata and linked evidence ids

Step 3 - Review the story timeline

The story timeline groups raw events into reviewer-friendly steps.
Raw evidenceUser-facing story card
Run started, release manifest read”Release gate reviewed production rollout metadata”
Guardrail evaluated for execute on pipeline_run”Production pipeline execution was evaluated”
Approval requested or block recorded”Production action required a human decision” or “Production action was blocked”
Run/session completed”Release gate completed with follow-up required”
Each card keeps the evidence ids behind it. If a card mentions a guardrail decision, approval, or receipt, the dashboard can show the related record so you can verify the interpretation against the raw timeline.

Step 4 - Act on the recommendations

For this session, runtime intelligence can produce two useful follow-ups:
Follow-upWhat it means
Action itemRequire approval before cicd.trigger_pipeline executes against production
Guardrail recommendationAdd a guardrail for execute actions on pipeline_run resources in production, with recommended mode require_approval
Use the recommendation as a starting point. If the deployment should always require a human decision, enable the matching template or create a guardrail in Require approval mode. If the action should never run autonomously, use Block instead.

What changed from raw events

Runtime intelligence did not change the session, approve the deploy, or create a guardrail. It made the existing evidence easier to review:
  • The raw event timeline still shows every instrumented action.
  • Guardrail decisions still decide whether runtime execution proceeds.
  • The generated summary and timeline compress the session into the story a reviewer needs.
  • Action items and guardrail recommendations point to concrete next steps, but you decide which policy to enable.

Next steps

Runtime intelligence

Learn what the generated summary, timeline, actions, and recommendations mean.

Enforce guardrails

Turn recommendations into blocking or approval-required runtime policy.