← Back to Learn
deploymenttutorialguardrails

Migrating from No Guardrails to Authensor

Authensor

Most AI agents start without guardrails. The prototype works, the demo impresses, and suddenly the agent is in production with no policy enforcement, no content scanning, and no audit trail. Migrating from this state to a properly secured deployment requires a methodical approach that avoids breaking existing functionality.

Phase 1: Observe (Week 1 to 2)

Install Authensor in audit-only mode. The agent continues to operate exactly as before, but every action is logged to the audit trail.

npm install @authensor/sdk

Configure the SDK to wrap your agent's tool calls with logging but no enforcement:

version: "1.0"
name: "observe-only"
defaults:
  action: allow
  log: true

During this phase, collect data on what tools the agent calls, how frequently, with what parameters, and in what sequences. This data forms the foundation for your policy.

Phase 2: Analyze (Week 3)

Review the collected audit data. Identify:

  • Which tools are used most frequently
  • Which tool calls involve sensitive data or irreversible actions
  • What parameter patterns are normal
  • Whether any actions are already problematic

Use these observations to draft your first policy. Start with a permissive policy that denies only clearly dangerous actions.

Phase 3: Shadow Mode (Week 4 to 5)

Switch to shadow mode evaluation. The policy engine evaluates every action and records whether it would allow or deny it, but does not actually block anything.

Compare the shadow evaluation results against actual outcomes. Are the deny decisions correct? Would any legitimate actions have been blocked?

Phase 4: Enforce (Week 6)

Enable policy enforcement. Start with the rules you are most confident about. Use a staged approach:

  1. Enable deny rules for clearly dangerous actions (data deletion, external communications)
  2. Enable approval workflows for high-risk but necessary actions
  3. Enable content scanning with conservative thresholds
  4. Tighten parameter constraints based on observed patterns

Phase 5: Monitor (Ongoing)

Enable Sentinel behavioral monitoring. Calibrate baselines from the data collected in Phase 1. Set up alerts for anomalous behavior.

The entire migration can be completed in six weeks without any service interruption. Each phase builds on the previous one, and the agent continues operating throughout.

Keep learning

Explore more guides on AI agent safety, prompt injection, and building secure systems.

View All Guides