run returns the original task result after evaluation and any triggered reflection. It does not replace the task answer with the reflection answer. Task exceptions propagate. Validation settles separately so replay can acquire resources released by the task.
Native agent construction attaches the supplied reflect_bash tool and memory instructions. A generic asynchronous callback receives an Invocation and must pass its instructions/tool to the model and enforce phase permissions itself. See the quickstart, native integrations, and custom loop guide.
Use unique execution IDs and related-work session IDs. Importing Reflect alone starts no work; constructing it opens its configured persistent workspace. Close Reflect and then the tracing client. An externally supplied platform client remains caller-owned.
Import Reflect from pandaprobe/reflect; alias it to ReflectRuntime when also using JavaScript’s built-in Reflect. Await agent(...), tool(...), run(...), and close(). Supported native framework identifiers and agent options are listed below.
On this page
Agent, AgentOptions, Framework, NativeAgent, Reflect, ReflectInit, SubmissionOptions.Example
This function accepts your native agent builder. It must include the tracing integration and usereflect.agent(...) to attach Reflect tooling; see the framework guides.
Agent
I = any, R = any.
Source declaration
AgentOptions
Fields and properties
Framework
NativeAgent
I = any, R = any.
Source declaration
Fields and properties
Methods
invokeReflect
invokeReflect
Reflect
Constructor
Fields and properties
Methods
withCurrent
withCurrent
Advanced adapter lifecycle hook. Ordinary applications use run/execution and the settlement methods so attribution, scheduling, and cleanup stay paired. Do not expose this hook to the agent.
assertOpen
assertOpen
Advanced adapter lifecycle hook. Ordinary applications use run/execution and the settlement methods so attribution, scheduling, and cleanup stay paired. Do not expose this hook to the agent.
trackExecution
trackExecution
Advanced adapter lifecycle hook. Ordinary applications use run/execution and the settlement methods so attribution, scheduling, and cleanup stay paired. Do not expose this hook to the agent.
untrackExecution
untrackExecution
Advanced adapter lifecycle hook. Ordinary applications use run/execution and the settlement methods so attribution, scheduling, and cleanup stay paired. Do not expose this hook to the agent.
execution
execution
The callback must encompass actual work, including consuming streams.
bash
bash
tool
tool
Returns the supplied tool in a generic or native framework format. The generic tool accepts a command string and must run inside an active Reflect boundary.
agent
agent
Builds a supported native agent with Reflect tools and memory integration. Pass the framework’s factory/constructor and its native options; do not also add reflect_bash manually.
submitTraces
submitTraces
Schedules evaluation for completed trace references; identities must belong to the same project. Reusing a trace under a different execution ID is rejected.
waitExport
waitExport
settleEvaluation
settleEvaluation
Waits for evaluation evidence for this execution. A caller wait deadline can leave the underlying run pending.
resumeEvaluations
resumeEvaluations
Resumes persisted pending evaluation work after restart; known evaluation IDs are polled instead of recreated.
continueReflection
continueReflection
Uses the supplied host continuation when evaluation has produced a failure notice. Delayed feedback does not automatically restart an agent.
settleReflection
settleReflection
Waits for an already scheduled reflection checkpoint. A caller wait timeout is distinct from the checkpoint’s execution deadline.
run
run
report
report
Returns the execution’s task, evaluation, reflection, and proposal outcomes. Does not infer business success from task completion.
proposals
proposals
Returns persisted proposals, including their lifecycle state and decision evidence.
scheduleValidation
scheduleValidation
Advanced adapter lifecycle hook. Ordinary applications use run/execution and the settlement methods so attribution, scheduling, and cleanup stay paired. Do not expose this hook to the agent.
validate
validate
settleValidation
settleValidation
trialExecution
trialExecution
close
close
Cancels owned work, bounds the shutdown wait, and closes an owned platform client. It does not close a caller-supplied platform client or the tracing client.
ReflectInit
Fields and properties
SubmissionOptions
Supporting contract used by the API below; it is not a separate package export.
Source declaration
Fields and properties
Signatures and fields are generated from the SDK source. See the import index for available entry points.

