Last updated

SDK Migration Guide

This guide helps migrate older Papr integrations to current API patterns.

Key Migrations

Graph Configuration

  • Old: graph_generation
  • New: memory_policy

Use memory_policy for graph mode, constraints, and governance controls.

User Identity

  • Old: user_id
  • New: external_user_id

Use your application user ID as external_user_id.

Search Ranking Flag

  • Old: rank_results
  • New: use retrieval tuning + agentic graph defaults

Prefer:

  • enable_agentic_graph=true
  • tuned memory/node limits

Legacy Document Schema Flags

  • Old: simple_schema_mode and property_overrides style flows
  • New: use memory_policy + schema defaults + constraints

Migration Checklist

  1. Replace deprecated request fields.
  2. Add tenant scope fields where applicable.
  3. Add policy defaults in one shared helper.
  4. Re-run integration tests for retrieval and access control.

Example Update (Python)

# Before
client.memory.add(
    content="...",
    user_id="u_1",
    graph_generation={"mode": "auto"}
)

# After
client.memory.add(
    content="...",
    external_user_id="u_1",
    memory_policy={"mode": "auto"}
)