Reflexio Docs
API ReferenceClient Methods

Operations

Methods for rerun/manual generation and playbook aggregation.

Rerun and Manual Generation Operations

Profile and playbook generation can be triggered in different modes:

ModeMethodInteractionsOutput StatusBlockingUse Case
Rerunrerun_*_generationALL interactionsPENDINGOptionalTest prompt changes, full regeneration
Manualmanual_*_generationWindow-sized (from config)CURRENTFire-and-forget onlyForce regeneration, fill gaps

Key Differences:

  • Rerun: Uses ALL interactions, outputs PENDING status (requires upgrade workflow), supports wait_for_response
  • Manual: Uses batch_size from config, outputs CURRENT status directly, always fire-and-forget

rerun_profile_generation

Regenerate user profiles from ALL existing interactions. Creates profiles with PENDING status.

response = client.rerun_profile_generation(
    user_id="user_123",
    wait_for_response=True
)

Prop

Type


manual_profile_generation

Manually trigger profile generation with window-sized interactions (fire-and-forget). Creates profiles with CURRENT status directly (no upgrade needed).

client.manual_profile_generation(user_id="user_123")

Prop

Type

Returns: None (fire-and-forget operation)

Prerequisites:

  • batch_size must be configured in your config
  • Extractors must have allow_manual_trigger=True to be included

Example:

# Force regeneration for a user (CURRENT status, fire-and-forget)
client.manual_profile_generation(user_id="user_123")

# Regenerate for all users with specific source
client.manual_profile_generation(source="chat")

# Run specific extractors only
client.manual_profile_generation(
    user_id="user_123",
    extractor_names=["preferences"]
)

rerun_playbook_generation

Regenerate playbook entries from ALL interactions for a specific agent version. Creates entries with PENDING status.

response = client.rerun_playbook_generation(
    agent_version="v2.1.0",
    wait_for_response=True
)

Prop

Type


manual_playbook_generation

Manually trigger playbook generation with window-sized interactions (fire-and-forget). Creates entries with CURRENT status directly (no upgrade needed).

client.manual_playbook_generation(agent_version="v2.1.0")

Prop

Type

Returns: None (fire-and-forget operation)

Prerequisites:

  • batch_size must be configured in your config
  • Playbook configs must have allow_manual_trigger=True to be included

Example:

# Force regeneration for an agent version (CURRENT status, fire-and-forget)
client.manual_playbook_generation(agent_version="v2.1.0")

# Regenerate with specific source filter
client.manual_playbook_generation(
    agent_version="v2.1.0",
    source="chat"
)

# Run for specific playbook type only
client.manual_playbook_generation(
    agent_version="v2.1.0",
    playbook_name="response_quality"
)

upgrade_profiles

Promote PENDING profiles to CURRENT, archive old CURRENT profiles, and delete old ARCHIVED profiles. Used after rerun_profile_generation to apply the new generation results.

response = client.upgrade_profiles(user_id="user_123")

Prop

Type


upgrade_user_playbooks

Promote PENDING user playbooks to CURRENT, archive old CURRENT, and delete old ARCHIVED. Used after rerun_playbook_generation to apply the new generation results.

response = client.upgrade_user_playbooks(agent_version="v2.1.0")

Prop

Type


run_playbook_aggregation

Aggregate user playbooks into consolidated insights using clustering.

response = client.run_playbook_aggregation(
    agent_version="v2.1.0",
    playbook_name="response_quality"
)

Prop

Type