ReflexioDeveloper Docs
Menu
Developer docs

Reflexio Documentation

Connect Reflexio to your agent, publish interactions, retrieve learned context, and inspect the learning loop.

Find the right area

Get Started
Choose Hosted Enterprise or Local OSS.
Open Quickstart
Build
Publish interactions, retrieve context, and manage profiles and playbooks.
Open examples
Concepts
Understand interactions, requests, profiles, playbooks, and optimization.
Open concepts
Portal
Use the Enterprise web portal to review outcomes and operate the loop.
Open portal docs
Reference
Browse SDK methods, schemas, CLI commands, and service operations.
Open reference
Claude Smart
Use Reflexio as a Claude Code learning plugin with local memory.
Open plugin docs

Minimum integration loop

Retrieve profiles and playbooks before the agent responds, then publish the completed turn so Reflexio can update what it knows.

from reflexio import ReflexioClient, InteractionData, UserActionType

client = ReflexioClient()  # reads REFLEXIO_API_KEY
user_id = "user_123"
user_message = "Recommend a laptop for me."

context = client.search(
    query=user_message,
    user_id=user_id,
    top_k=5,
    entity_types=["profiles", "user_playbooks", "agent_playbooks"],
)

agent_response = call_your_llm(user_message, context)

client.publish_interaction(
    user_id=user_id,
    interactions=[
        InteractionData(role="User", content=user_message, user_action=UserActionType.NONE),
        InteractionData(role="Agent", content=agent_response, user_action=UserActionType.NONE),
    ],
    source="chat",
    session_id="session_001",
)
curl -X POST "${REFLEXIO_URL:-https://www.reflexio.ai}/api/search" \
  -H "Authorization: Bearer $REFLEXIO_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"query":"Recommend a laptop for me.","user_id":"user_123","top_k":5}'

curl -X POST "${REFLEXIO_URL:-https://www.reflexio.ai}/api/publish_interaction" \
  -H "Authorization: Bearer $REFLEXIO_API_KEY" \
  -H "Content-Type: application/json" \
  --data @interaction.json

What Reflexio produces

User profiles
Per-user facts and preferences extracted from interactions and retrieved semantically.
Playbooks
Behavioral guidance distilled from corrections, expert examples, and outcomes.
Evaluation signals
Success and failure judgments for measuring whether the loop improves.
Source evidence
Requests, sessions, interactions, and metadata that keep learning traceable.

Data model at a glance

Interactions are the input. Profiles personalize responses. Playbooks improve behavior. Requests and sessions keep the loop inspectable.

Reflexio learning loopPublish evidence, learn from it, retrieve what was learned, and augment the next prompt — every turn makes the agent better.
1Publish interaction evidenceRequests and sessions preserve source context.
  • RequestAgent version, source, and session
  • SessionConversation thread and user identity
  • InteractionsUser turns, agent turns, feedback, and expert examples
2
Reflexio engineExtract, aggregate, evaluateasync learning pipeline
3Learning artifactsStructured outputs your agent and team can use.
  • User profilesPer-user preferences, goals, constraints, and memory
  • User/Agent playbooksReusable behavior rules distilled from corrections
  • Evaluation signalsOutcomes, shadow comparisons, and impact
4
Retrieve & augment the next promptBefore the agent responds, pull learned context into the prompt — then publish the new turn back to step 1.
Retrieve
  • search(query, user_id)One semantic call across learned context
  • context.profiles / context.agent_playbooksRanked artifacts for this turn
Augment the prompt
Respond & publishThe improved turn flows back through publish_interaction() as new evidence for step 1.