Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
277 commits
Select commit Hold shift + click to select a range
cb405d9
Fix expected-atoms check to support DerivedPredicates
yichao-liang Apr 17, 2026
6c92572
Skip kinematic reset in PyBullet when only non-kinematic state changed
yichao-liang Apr 17, 2026
c9723f2
Support offline dataset learning in AgentSimLearningApproach
yichao-liang Apr 17, 2026
cccb7e2
Log periodic progress during MCMC parameter fitting
yichao-liang Apr 17, 2026
ec3b9f3
Fix mypy and pylint errors for CI compliance
yichao-liang Apr 17, 2026
e8e3675
Apply yapf, isort, and docformatter across the codebase
yichao-liang Apr 17, 2026
328b4d7
Inline approach configs into parent files in predicatorv3
Apr 28, 2026
6735ac8
Preserve robot joint config across PyBullet state save/restore
Apr 28, 2026
ebb3304
Add 'emcee' to the list of install_requires in setup.py
yichao-liang Apr 28, 2026
0bc5234
Force PyBullet FK refresh and skip redundant finger snap
yichao-liang Apr 29, 2026
e84d788
Apply yapf/docformatter to satisfy CI autoformat check
yichao-liang Apr 29, 2026
8333b0f
Configure predicatorv3 demos for offline-only sim-learning runs
yichao-liang Apr 29, 2026
0b6a4b0
Add jug orientation handling in PyBulletBoilEnv
yichao-liang Apr 29, 2026
1b6c510
Revert getLinkState to PyBullet default (no computeForwardKinematics …
yichao-liang Apr 30, 2026
f0b4692
Add lo/hi bounds to ParamSpec and skip-MCMC support in fit_params
yichao-liang Apr 30, 2026
9c61f3e
Build boil param specs dynamically from CFG with lo/hi bounds
yichao-liang Apr 30, 2026
e08df54
Apply lo/hi clamping and configurable noise scale to oracle perturbation
yichao-liang Apr 30, 2026
e44a850
Update installation instructions and add macOS setup script for PyBullet
yichao-liang Apr 30, 2026
b8df145
Update PyBullet version to 3.2.7 and simplify macOS setup script
yichao-liang May 1, 2026
c033f9c
Refactor liquid color update logic and rename related methods for cla…
yichao-liang May 1, 2026
20a310e
Add more debug logging for CogMan and option execution flow
yichao-liang May 1, 2026
9d6b9e3
Handle PyBullet physics server crashes with env recreation and retry
yichao-liang May 1, 2026
99b38b1
Fix jug orientation handling in PyBulletBoilEnv by restoring rotation…
yichao-liang May 1, 2026
8521882
Update installation instructions and dependencies; remove macOS setup…
yichao-liang May 1, 2026
f998254
Remove mara_robosim dependency from setup.py
yichao-liang May 1, 2026
ea690a2
Merge remote-tracking branch 'origin/master' into sim-learning
yichao-liang May 1, 2026
4e12a17
Fix get_gt_simulator to use env_name instead of normalized name
yichao-liang May 2, 2026
a8105cf
Add before/after MSE, likelihood, and param-delta logging for paramet…
yichao-liang May 2, 2026
2f97798
Use SSE loss and wider walker init so MCMC parameter fitting actually…
yichao-liang May 3, 2026
9f09ff9
Move GT simulator components onto module-globals contract
yichao-liang May 4, 2026
c5d45c2
Soften boil parameter-dependent gates with sigmoid weights
yichao-liang May 4, 2026
95e384f
Add LM warm-start and Hessian identifiability diagnostic
yichao-liang May 4, 2026
195e889
Infer process-feature scope from base-sim residuals
yichao-liang May 4, 2026
124dd94
Skip MCMC and use LM warm-start in boil agent config
yichao-liang May 4, 2026
cc11084
Apply yapf and docformatter formatting
yichao-liang May 4, 2026
465177a
Silence mypy on PyBullet client-id attribute access
yichao-liang May 4, 2026
6e76660
Mark unused action arg in sim_fn to satisfy pylint
yichao-liang May 4, 2026
9415d12
Use per-component diff in _set_state to eliminate robot jitter
yichao-liang May 4, 2026
418fd30
Reposition recreated cups and plugs in coffee _set_domain_specific_state
yichao-liang May 4, 2026
e82df9d
Look up predicates lazily in option-model _abstract_function
yichao-liang May 4, 2026
8b6d709
Rename 'kinematics-only' to 'base-sim-only' in docs and test names
yichao-liang May 4, 2026
abc448f
Tighten _robot_matches_state atol so set_state hint forces reset
yichao-liang May 4, 2026
58f44f6
Fix flaky test_glib_explorer and test_demo_dataset_loading under pyte…
yichao-liang May 4, 2026
7bc4443
Add unit tests for _robot_matches_state atol and pybullet_helpers.obj…
yichao-liang May 4, 2026
275d049
Merge branch 'master' into sim-learning
yichao-liang May 5, 2026
3069f9c
Extract env-agnostic process-rule primitives to code_sim_learning/utils
yichao-liang May 5, 2026
d1b83c5
Make sim synthesis file-driven with versioned snapshots
yichao-liang May 5, 2026
b84fe61
Rename agent_sim_learning config to agent_rule_learning
yichao-liang May 5, 2026
b426ad0
Pin claude-agent-sdk>=0.1.73 and bump httpx to 0.28.1
yichao-liang May 6, 2026
4aa7a3a
Return CallToolResult-shape dict from synthesis MCP tools
yichao-liang May 6, 2026
82410d2
Resolve local-sandbox paths eagerly and use cwd-relative agent paths
yichao-liang May 6, 2026
9871846
Improve agent log readability
yichao-liang May 6, 2026
da3c539
Fix iter_feature_residuals type annotation and run autoformat
yichao-liang May 6, 2026
9fb8896
Disable oracle sim program in boil agent_rule_learning config
yichao-liang May 6, 2026
3e72402
Fix pylint import-outside-toplevel pragma stripped by yapf
yichao-liang May 6, 2026
5cf050b
Auto-scale plan-refinement timeout and surface termination details
yichao-liang May 6, 2026
0015618
Wire evaluate_plan_refinement to auto-scale and clarify its docs
yichao-liang May 6, 2026
01b9b6c
Clarify synthesis prompts and scrub domain-specific examples
yichao-liang May 6, 2026
f76b5bc
Require plan in evaluate_plan_refinement and drop diagnostic hint
yichao-liang May 6, 2026
1d939b0
Inject predicate signatures into synthesis kickoff message
yichao-liang May 6, 2026
edff828
Increase max retries for agent bilevel approach from 1 to 3 on refine…
yichao-liang May 6, 2026
2fd8942
Add roll to PyBullet robot type for lossless reset round-trip
yichao-liang May 6, 2026
62ff922
Populate roll feature in PyBullet task-init dicts
yichao-liang May 6, 2026
2806320
Surface mismatched features in state-reset reconstruction warning
yichao-liang May 6, 2026
c689b9c
Use asymmetric CHANGE_FINGERS terminal so OpenFingers actually opens
yichao-liang May 7, 2026
83a64cb
Loosen reset_state joint-vs-EE atol so fresh _get_state hints survive
yichao-liang May 7, 2026
222680d
Compare angle features modulo 2π in reconstruction diff
yichao-liang May 7, 2026
7a0dde2
Linearly interpolate finger state↔joint conversion
yichao-liang May 7, 2026
2776233
Swap agents.yaml back to agent_param_learning for boil debugging
yichao-liang May 7, 2026
bb2262e
Apply autoformatter reflows to neighboring code
yichao-liang May 7, 2026
4214979
Add subclass hooks for extending AgentSimLearningApproach synthesis
yichao-liang May 7, 2026
c860229
Add AgentSimPredicateInventionApproach with predicate-quality tool
yichao-liang May 7, 2026
e332b2d
Swap agents.yaml to agent_predicate_invention for boil
yichao-liang May 7, 2026
d8f2888
Add goal_nl on boil tasks and propagate through strip_task
yichao-liang May 8, 2026
5050853
Render goal_nl and trajectory provenance in agent-facing tool output
yichao-liang May 8, 2026
904f7c0
Drop env-goal mimicry; agent invents predicates freely with NL goal hint
yichao-liang May 8, 2026
45db760
Pass full trajectory history and goal-check helpers into synthesis
yichao-liang May 8, 2026
bb2b108
Fix async_generator pickle leak by decoupling _ParamsView from approach
yichao-liang May 8, 2026
f8c80cc
Enable online learning cycles by default; misc config tweaks
yichao-liang May 8, 2026
871acba
Tag agent log files by query kind instead of session manager
yichao-liang May 8, 2026
f402e91
Tag agent query call sites with phase kind
yichao-liang May 8, 2026
6dabc68
Show tqdm progress bar during backtracking refinement
yichao-liang May 8, 2026
2ffddfb
Enable online_learning_early_stopping in predicatorv3 agents config
yichao-liang May 8, 2026
662d686
Spill oversize run_python output to sandbox instead of ~/.claude
yichao-liang May 11, 2026
2b57865
Filter solve-prompt goal atoms by current predicate set
yichao-liang May 12, 2026
5c0dceb
Version sandbox artifacts by cycle and surface provenance to the agent
yichao-liang May 12, 2026
7a64ded
Add unit tests for sandbox versioning, provenance, and recent fixes
yichao-liang May 12, 2026
c5bc9f4
Apply autoformat and silence lint on touched files
yichao-liang May 12, 2026
063fcbd
Make reset_state fast-path sign-aware and tighten position tolerance
yichao-liang May 12, 2026
e5daecc
Use explorer's own rng in agent bilevel explorer
yichao-liang May 12, 2026
516703f
Add require_all_attempts mode for online-learning early stop
yichao-liang May 12, 2026
d30f86c
Pin env reference at construction in AgentPlannerApproach
yichao-liang May 12, 2026
1bfe39e
Extract _ArtifactSnapshotter from synthesis-tool factories
yichao-liang May 12, 2026
020697d
Split agent session tool surface into solve/synthesis phases
yichao-liang May 12, 2026
e546a15
Add logging for tool surface details in AgentSessionMixin
yichao-liang May 12, 2026
8e7c202
Fix CI failures: pylint, mypy, autoformat, and flaky MCMC test
yichao-liang May 12, 2026
84d596b
Drop strict happiness_speed assertion in MCMC fitting test
yichao-liang May 12, 2026
82a1551
Skip task in _demo_dataset_loading when solve fails and we discard fa…
yichao-liang May 12, 2026
fb3d0db
Add debug logging for final interaction state and abstract state in _…
yichao-liang May 13, 2026
8d57ec3
Tighten _object_pose_matches_state atol to 1e-3 to match _reconstruct…
yichao-liang May 13, 2026
24773a7
Make jug liquid visual-only and track jug pose each step
yichao-liang May 13, 2026
7d5eba8
Add regression test for SwitchBurnerOn/Waypoint_1 cup-collision
yichao-liang May 13, 2026
d096c73
Add end-to-end test that oracle_process_planning solves a boil task
yichao-liang May 13, 2026
ffd8855
Add refinement-vs-real-execution alignment test using synth simulator…
yichao-liang May 13, 2026
ea40dbf
Fix CI: autoformat, mypy, and pylint cleanups
yichao-liang May 13, 2026
bc9a037
Update samplers in processes.py to use random uniform values and remo…
yichao-liang May 13, 2026
3608211
Make sandbox system prompt and CLAUDE.md phase-aware
yichao-liang May 13, 2026
a2b7e54
Use counter-first log filenames for chronological sort
yichao-liang May 13, 2026
239cea9
Make model-learning prompts domain-general and add geometric-gates note
yichao-liang May 13, 2026
22d3f51
Log session tool surface one tool per line
yichao-liang May 13, 2026
29808d2
Force synthesis agent to pre-load all MCP tool schemas on turn 1
yichao-liang May 13, 2026
7a8ea11
Retry transient PyBullet shared-memory errors
yichao-liang May 13, 2026
41e3dc3
Revert "Force synthesis agent to pre-load all MCP tool schemas on tur…
yichao-liang May 13, 2026
1478d59
Refactor comments in online learning loop for clarity and conciseness
yichao-liang May 14, 2026
14cbf95
Make geometric-gate guidance binding in synthesis prompts
yichao-liang May 14, 2026
4310ad9
Log final state details in forward validation; sync fitted params to …
yichao-liang May 16, 2026
8d9b72e
Apply autoformat fixes across pybullet helpers and agent SDK files
yichao-liang May 17, 2026
3909370
Trust authoritative joint positions in robot reset_state
yichao-liang May 17, 2026
38c783d
Add --parallel mode and self-bootstrap sys.path in local launch scripts
yichao-liang May 17, 2026
1138d49
Drop unused INSPECTION_TOOL_NAMES import
yichao-liang May 17, 2026
ff5217d
Surface forward-validation failures in synthesis plan refinement
yichao-liang May 19, 2026
352aff2
Bump interaction-request step cap and run 5 seeds from 0
yichao-liang May 19, 2026
3fd741f
Apply autoformat and split long line in forward validator
yichao-liang May 19, 2026
8c30703
Add 'paper/' directory to .gitignore
yichao-liang May 20, 2026
3803aa4
Add agent_bilevel_max_refine_retries setting
yichao-liang May 20, 2026
d7e2ce5
Reseed bilevel refinement before re-querying the LLM in _solve
yichao-liang May 20, 2026
7a00278
Silence mypy unreachable warning for macOS-only launch scripts
yichao-liang May 20, 2026
364c9ce
Merge branch 'master' into sim-learning
yichao-liang May 20, 2026
b3dc952
Comment out unused code in the main simulation function for clarity
yichao-liang May 20, 2026
7e44a42
Remove unused simulate_step helper from code_sim_learning utils
yichao-liang May 22, 2026
5185576
Add latent and privileged hidden-state blocks to State
yichao-liang May 30, 2026
dc8c8f5
Add recurrent latent-threaded simulator fitting
yichao-liang May 30, 2026
435ba34
Thread latent through predicate-quality eval and refinement
yichao-liang May 30, 2026
a8770d3
Make pybullet_boil partially observable
yichao-liang May 30, 2026
f5a3b18
Add agent_sim_recurrent_predicate_invention approach
yichao-liang May 30, 2026
ecb54b4
Add partially-observable ground-truth simulator for boil
yichao-liang May 30, 2026
6321975
Move latent (partial-observability) support into the sim-learning app…
yichao-liang May 30, 2026
fdcfdc6
Add config block to test the PO ground-truth simulator
yichao-liang May 30, 2026
d7ef018
Register PO ground-truth simulator factory for boil
yichao-liang May 31, 2026
7152bcb
Refactor _set_state reconstruction guard to an explicit opt-in flag
yichao-liang May 31, 2026
aa69c75
Fix CI lint/format nits (isort, pylint)
yichao-liang May 31, 2026
529d3a8
Replace strict-reconstruction flag with magnitude thresholds
yichao-liang May 31, 2026
f99069c
Merge branch 'master' into sim-learning
yichao-liang May 31, 2026
a649de5
Deep-copy latent state in combined_simulate to prevent mutation of ca…
yichao-liang May 31, 2026
d412245
Remove duplicate iter_feature_residuals from master-merge resolution
yichao-liang May 31, 2026
159a778
Refactor agent configuration by removing unused parameters and updati…
yichao-liang May 31, 2026
4db56d6
Merge remote-tracking branch 'origin/master' into sim-learning
yichao-liang May 31, 2026
f13e634
Rename agent_sim_recurrent_predicate_invention to agent_po_sim_predic…
yichao-liang May 31, 2026
aed6af8
Fix recurrent-rule tool dispatch; make PO synthesis prompt 5-arg only
yichao-liang May 31, 2026
8f5690b
Compare robot EE orientation geodesically in _reconstruction_diff
yichao-liang May 31, 2026
5ec10eb
Keep oversize tool output in-sandbox; screen Bash/run_python for escapes
yichao-liang Jun 1, 2026
fdb9f80
Add partially_observable flag to agent_sim_learning configuration
yichao-liang Jun 1, 2026
abb8b06
Genericize synthesis-prompt pitfall examples to avoid boil leakage
yichao-liang Jun 1, 2026
501ad40
Restore reconstruction-lossy process features in combined simulators
yichao-liang Jun 2, 2026
f44ab20
Add latent-persistence contract to PO synthesis prompt
yichao-liang Jun 2, 2026
6ce55f2
Gate online-learning early stop on explorer's mental-model goal verdict
yichao-liang Jun 2, 2026
08fe1a1
Genericize State docstrings to drop env-specific feature names
yichao-liang Jun 2, 2026
4dd066d
Cap switch joint travel at the on-position across pybullet switch envs
yichao-liang Jun 2, 2026
2fd3f86
Add shared studio-room visuals to PyBullet envs
yichao-liang Jun 3, 2026
79db98d
Add agent_planner flags to deny/limit its planning simulator
yichao-liang Jun 3, 2026
6166a81
Fix CI: docformatter docstring wraps and mypy diamond-inheritance ignore
yichao-liang Jun 4, 2026
2885a0d
Fix recurrent-rule dispatch in plan-refinement synthesis validation
yichao-liang Jun 5, 2026
0c71c18
Compute boil faucet outlet via general rotation-matrix form
yichao-liang Jun 6, 2026
90ee78c
Add recurrent LM fit and bound-aware param fitting
yichao-liang Jun 7, 2026
1934b8b
Prompt agent for multi-object rules and per-object latent
yichao-liang Jun 7, 2026
5b9a3fc
Return full FitResult with Laplace bundle from param fitting
yichao-liang Jun 10, 2026
ecfecef
Add active-experiment ensembles and atom-disagreement scoring
yichao-liang Jun 10, 2026
9a1a372
Pool feasible candidates in refinement for info-seeking proposal
yichao-liang Jun 10, 2026
368de46
Wire info-seeking exploration through explorer and learning approach
yichao-liang Jun 10, 2026
a5e08ad
Replan from diverged subgoals during test execution
yichao-liang Jun 11, 2026
5c66bac
Prompt for per-step subgoal coverage in sketches and invention
yichao-liang Jun 10, 2026
f4282a4
Merge remote-tracking branch 'origin/master' into sim-learning
yichao-liang Jun 12, 2026
e4f792e
Apply autoformatting to info-seeking tests
yichao-liang Jun 12, 2026
0b54475
Add docstrings and pylint disables to new info-seeking/active-experim…
yichao-liang Jun 12, 2026
8e860e3
Merge remote-tracking branch 'origin/master' into sim-learning
yichao-liang Jun 12, 2026
a320c71
Drop New suffix and dedup domino composed env subclasses
yichao-liang Jun 15, 2026
251408a
Rename pybullet_domino composed_env module to env
yichao-liang Jun 15, 2026
f80b048
Consolidate domino grid into GridComponent; replace domino_use_grid flag
yichao-liang Jun 16, 2026
1295ab2
Update configuration files: adjust NUM_SEEDS in common.yaml and enabl…
yichao-liang Jun 16, 2026
a6532ee
Boil legacy-options fix + mobile-fetch Phase 1
yichao-liang Jun 16, 2026
f8f94e0
Add position-based InFront predicate to DominoComponent
yichao-liang Jun 17, 2026
2019145
Tweak agent SDK turn limit and active predicatorv3 approach config
yichao-liang Jun 17, 2026
e62f338
Add ground-truth per-skill sampler factory and domino samplers
yichao-liang Jun 17, 2026
e225c67
Consume per-skill samplers in bilevel sketch refinement
yichao-liang Jun 17, 2026
04d7b8d
Add agent-driven sampler synthesis to the sim-learning approach
yichao-liang Jun 17, 2026
96443a4
Enable sampler synthesis and predicate exclusion in predicatorv3 configs
yichao-liang Jun 17, 2026
cbf3e71
Phrase domino goal_nl in domino colors
yichao-liang Jun 17, 2026
0afbd1e
Remove 'Toppled' from excluded predicates in domino environment confi…
yichao-liang Jun 17, 2026
c79b23f
Describe InFront in the agent's Available Predicates listings
yichao-liang Jun 18, 2026
6027f6c
Loosen InFront cardinal-facing tolerance for re-placed dominoes
yichao-liang Jun 18, 2026
2d8ac45
Tune domino agent config: rename approach, finer BiRRT for placement
yichao-liang Jun 18, 2026
5433f39
Fix and harden domino sequence generation
yichao-liang Jun 18, 2026
cf35de5
domino: add lateral side-offset to turns; generalize InFront + sampler
yichao-liang Jun 18, 2026
ce6aad6
agent_bilevel: load plan sketch from scripts/plan_sketches dir
yichao-liang Jun 18, 2026
1cce7f0
pybullet_domino: print initial abstract atoms in __main__
yichao-liang Jun 18, 2026
b334720
Update agent configuration comments for clarity and organization
yichao-liang Jun 18, 2026
31f5799
domino: widen lower placement margin to 1.5x width for reachability
yichao-liang Jun 18, 2026
3acc8ee
predicatorv3: adjust domino test env config
yichao-liang Jun 18, 2026
86ada40
Improve comment formatting in agents.yaml for clarity
yichao-liang Jun 18, 2026
8304463
Fix agent name in YAML configuration and remove unused flag
yichao-liang Jun 18, 2026
0ea9754
Remove unused agent approaches; dedup planner save/load and policy wr…
yichao-liang Jun 18, 2026
b981487
domino: add empty (no-op) GT process-dynamics simulator
yichao-liang Jun 19, 2026
5b2162a
domino skills: retry Place with validated IK before declaring infeasible
yichao-liang Jun 19, 2026
3a5fa4c
domino place sampler: generator-faithful candidates + deterministic-s…
yichao-liang Jun 19, 2026
04991a6
predicatorv3 config: enable bilevel_plan_without_sim demonstrator and…
yichao-liang Jun 19, 2026
657d26a
agent_bilevel: exclude LLM sketch-query time from refinement budget
yichao-liang Jun 19, 2026
0f0c935
agent_sdk: log per-interaction and per-step timing
yichao-liang Jun 19, 2026
538833b
agent_bilevel: feed refinement failures back to agent; optional fresh…
yichao-liang Jun 19, 2026
45757ae
add domino4 plan sketch for robot actions
yichao-liang Jun 19, 2026
a79f79c
pybullet_env: reconstruct full roll/pitch/yaw orientation on object r…
yichao-liang Jun 20, 2026
516bf12
agent_sdk: tag test-phase session logs with the test task index
yichao-liang Jun 20, 2026
3aad299
agent_sdk: rename test_option_plan→evaluate_option_plan; split create…
yichao-liang Jun 20, 2026
1ae8c9d
configs/predicatorv3: domino sim-learning oracle-samplers variant, 5 …
yichao-liang Jun 20, 2026
33f0e0f
agent_sdk: tolerate numbered-prefix lines when parsing plan sketches
yichao-liang Jun 20, 2026
012e4f2
agent_sdk: log per-solve and cumulative cost; fix double-counted total
yichao-liang Jun 20, 2026
1112d5c
scripts: add render_domino_initial_states for debugging task layouts
yichao-liang Jun 20, 2026
f7e7b90
agent_sdk: add refine_plan_sketch planner tool; share refinement core
yichao-liang Jun 20, 2026
6066b6e
agent_planner: render initial state image and reference it in the sol…
yichao-liang Jun 20, 2026
d153f9f
motion planning: tolerate shallow held-object contacts during lift
yichao-liang Jun 20, 2026
d6d13a9
domino task generator: collision-aware unfinished state placement
yichao-liang Jun 20, 2026
cc7d545
config: update domino test defaults and rename agent config entry
yichao-liang Jun 20, 2026
0d500e7
agent_bilevel_approach: enhance logging for refinement failures with …
yichao-liang Jun 20, 2026
50d56e9
domino task generator: ensure staged dominoes are pickable
yichao-liang Jun 21, 2026
1af424d
scripts: domino failure reproduction and init-state rendering tools
yichao-liang Jun 21, 2026
5cc24d4
config: move domino excluded_predicates override to agents.yaml only
yichao-liang Jun 21, 2026
a4f1a9a
skill_factories: validate grasp goal IK to fix mid-plan Pick failures
yichao-liang Jun 21, 2026
a8bf0d3
scripts: organize domino debug tools into scripts/domino_debug/
yichao-liang Jun 21, 2026
befc8df
scripts/domino_debug: add physics-failure diagnostic probes
yichao-liang Jun 21, 2026
fd917bf
agent_bilevel: show the rendered initial-state image in the solve prompt
yichao-liang Jun 21, 2026
7243201
config: set max_initial_demos per-env and rename domino samplers appr…
yichao-liang Jun 21, 2026
3db0bec
config: scope domino_restricted_push True to oracle only
yichao-liang Jun 21, 2026
8135e90
scripts/domino_debug: add count_turns and measure_turn_diversity scri…
yichao-liang Jun 21, 2026
f0aab4a
config: remove unused agent planner scratchpad and simulator flags
yichao-liang Jun 22, 2026
13339cf
agent approaches: expose refine_plan_sketch only on AgentBilevelApproach
yichao-liang Jun 22, 2026
b23f815
update config
yichao-liang Jun 22, 2026
9feb34e
agent_sdk: cap per-response extended-thinking budget
yichao-liang Jun 24, 2026
0f51fbd
agent bilevel: LLM-proposed initial continuous params
yichao-liang Jun 24, 2026
677f8ff
config: enable LLM-proposed params for domino PO approach
yichao-liang Jun 24, 2026
f9c413e
agent_sdk: remove unused save_low_level_action_images option
yichao-liang Jun 24, 2026
eb953d4
format: apply yapf, docformatter, and isort across the branch
yichao-liang Jun 24, 2026
e1bfa26
fix CI: type annotations, lint, and a plan-sketch path bug
yichao-liang Jun 24, 2026
8b499cf
test data: re-tune domino2.txt place params for reworked chain
yichao-liang Jun 24, 2026
3f8ee46
lint: shorten a long domino import in test_pybullet_domino_composed
yichao-liang Jun 24, 2026
90df896
agent_bilevel explorer: point interactive tools at the explore task
yichao-liang Jun 25, 2026
2b98d02
feat: add method to include built-in tools in solve prompt tool names
yichao-liang Jun 25, 2026
ee83d0c
fix: update horizon value for domino environment in all.yaml
yichao-liang Jun 25, 2026
f06a504
agent_sdk: add configurable reasoning effort for the Claude agent
yichao-liang Jun 25, 2026
a6e9180
agent_sdk: make plan capture mirror the real horizon-capped executor
yichao-liang Jun 25, 2026
ba8ed44
agent_bilevel explorer: recover tool-validated capture, seed info-gai…
yichao-liang Jun 25, 2026
800ae78
format: docformatter docstring re-wrapping
yichao-liang Jun 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion predicators/agent_sdk/agent_session_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Extracts common code for ToolContext initialization, lazy
AgentSessionManager creation, async-to-sync bridging, and agent explorer
creation from AgentPlannerApproach and AgentAbstractionLearningApproach.
creation shared by AgentPlannerApproach and its subclasses.
"""
import asyncio
import logging
Expand Down
925 changes: 752 additions & 173 deletions predicators/agent_sdk/bilevel_sketch.py

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions predicators/agent_sdk/docker_agent_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,27 @@ async def _run_query(query_input: Dict[str, Any]) -> Dict[str, Any]:
mcp_tool_list = get_allowed_tool_list(tool_names)
allowed_tools = BUILTIN_TOOLS + mcp_tool_list

# Cap per-response extended thinking so deliberation can't blow the
# harness output-token limit (the 32000-token overflow). Fed via
# query_input (this runner has no CFG); default mirrors settings.
thinking_budget = query_input.get("thinking_budget_tokens", 16000)
thinking = ({
"type": "enabled",
"budget_tokens": thinking_budget
} if thinking_budget and thinking_budget > 0 else None)
# Reasoning effort: one of the SDK levels, or unset for ""/"default".
effort = str(query_input.get("reasoning_effort", "")).strip().lower()
reasoning_effort = (effort if effort in {"low", "medium", "high", "max"}
else None)
options = ClaudeAgentOptions(
allowed_tools=allowed_tools,
mcp_servers={"predicator_tools": mcp_server},
permission_mode="bypassPermissions",
system_prompt=query_input["system_prompt"],
model=query_input["model_name"],
max_turns=query_input.get("max_turns", 20),
thinking=thinking, # type: ignore[arg-type]
effort=reasoning_effort, # type: ignore[arg-type]
)

client = ClaudeSDKClient(options=options)
Expand Down Expand Up @@ -129,9 +143,9 @@ def _flush_log() -> None:
file=sys.stderr,
flush=True)
elif btype == "ThinkingBlock":
thinking = block.get("thinking", "")
if thinking:
print(f"Thinking: {thinking[:200]}...",
thinking_text = str(block.get("thinking", ""))
if thinking_text:
print(f"Thinking: {thinking_text[:200]}...",
file=sys.stderr,
flush=True)
elif entry["type"] == "result":
Expand Down
12 changes: 9 additions & 3 deletions predicators/agent_sdk/docker_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

from predicators.agent_sdk.sandbox_prompts import build_claude_md, \
build_sandbox_system_prompt, find_repo_root, setup_sandbox_directory
from predicators.agent_sdk.tools import ToolContext
from predicators.agent_sdk.tools import ToolContext, session_log_filename
from predicators.settings import CFG

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -234,7 +234,9 @@ async def query(self,
# Counter-first layout: alphabetical sort matches chronological
# order across mixed ``learn``/``test``/``explore`` phases.
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
log_filename = f"{self._query_count:03d}_{kind}_{timestamp}.md"
log_filename = session_log_filename(
self._query_count, kind, timestamp,
getattr(self._tool_context, "test_task_idx", None))
if self._log_dir:
os.makedirs(self._log_dir, exist_ok=True)
incremental_log_path = os.path.join(self._log_dir, log_filename)
Expand All @@ -253,6 +255,8 @@ async def query(self,
"system_prompt": self._system_prompt,
"model_name": self._model_name,
"max_turns": CFG.agent_sdk_max_agent_turns_per_iteration,
"thinking_budget_tokens": CFG.agent_sdk_thinking_budget_tokens,
"reasoning_effort": CFG.agent_sdk_reasoning_effort,
"tool_names": self._tool_names,
"cfg_snapshot": dict(CFG.__dict__),
"log_path": container_log_path,
Expand Down Expand Up @@ -540,7 +544,9 @@ def _save_query_response_log(self, query: str,

timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
kind = getattr(self, "_last_kind", "query")
filename = f"{self._query_count:03d}_{kind}_{timestamp}.md"
filename = session_log_filename(
self._query_count, kind, timestamp,
getattr(self._tool_context, "test_task_idx", None))
filepath = os.path.join(self._log_dir, filename)

lines = [
Expand Down
62 changes: 53 additions & 9 deletions predicators/agent_sdk/local_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
from predicators.agent_sdk.sandbox_prompts import build_claude_md, \
build_sandbox_system_prompt, find_repo_root, setup_sandbox_directory, \
truncate
from predicators.agent_sdk.tools import BUILTIN_TOOLS, ToolContext
from predicators.agent_sdk.tools import BUILTIN_TOOLS, ToolContext, \
session_log_filename
from predicators.settings import CFG

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -75,6 +76,10 @@ def __init__(
self._phase = phase

self._total_cost_usd: float = 0.0
# The SDK reports total_cost_usd as the cumulative cost of the
# reused session, so we track the last value seen to derive the
# per-solve (marginal) cost of each query.
self._last_cost_usd: float = 0.0
self._total_turns: int = 0
self._query_count: int = 0
self._session_id: Optional[str] = None
Expand Down Expand Up @@ -178,13 +183,31 @@ async def start_session(self) -> None:
allowed_tools = BUILTIN_TOOLS + mcp_tool_list

extra_hooks = dict(self._tool_context.extra_session_hooks or {})
# Cap per-response extended thinking so deliberation can't blow the
# harness output-token limit (the 32000-token overflow). Keeps the
# model's effort otherwise at its default (high).
thinking = ({
"type": "enabled",
"budget_tokens": CFG.agent_sdk_thinking_budget_tokens
} if CFG.agent_sdk_thinking_budget_tokens > 0 else None)
# Reasoning effort: pass through to the agent when set to one of the
# SDK's accepted levels; "" / "default" leaves it unset.
effort = CFG.agent_sdk_reasoning_effort.strip().lower()
valid_efforts = {"low", "medium", "high", "max"}
if effort and effort not in valid_efforts and effort != "default":
raise ValueError(f"agent_sdk_reasoning_effort must be one of "
f"{sorted(valid_efforts)} or ''/'default'; got "
f"{CFG.agent_sdk_reasoning_effort!r}")
reasoning_effort = effort if effort in valid_efforts else None
options = ClaudeAgentOptions(
allowed_tools=allowed_tools,
mcp_servers={"predicator_tools": mcp_server},
permission_mode="bypassPermissions",
system_prompt=self._system_prompt,
model=self._model_name,
max_turns=CFG.agent_sdk_max_agent_turns_per_iteration,
thinking=thinking, # type: ignore[arg-type]
effort=reasoning_effort, # type: ignore[arg-type]
cwd=self._sandbox_dir,
setting_sources=["project", "local"],
hooks=(extra_hooks
Expand Down Expand Up @@ -246,13 +269,29 @@ async def query(self,
elif entry["type"] == "result":
cost = entry.get("total_cost_usd")
turns = entry.get("num_turns")
solve_cost: Optional[float] = None
if cost is not None:
self._total_cost_usd += cost
# cost is the session's cumulative total; the
# per-solve cost is the delta since the last result.
# A drop below the last value means the session was
# reset (e.g. recovery), so the new cumulative is
# itself the delta.
solve_cost = float(cost -
self._last_cost_usd if cost >= self.
_last_cost_usd else cost)
self._last_cost_usd = cost
self._total_cost_usd += solve_cost
self._current_log_meta["solve_cost_usd"] = solve_cost
self._current_log_meta["total_cost_usd"] = \
self._total_cost_usd
if turns is not None:
self._total_turns += turns
logging.info(
"Local sandbox iteration complete. "
"Turns: %s, Cost: $%s", turns or '?', cost or '?')
"Local sandbox iteration complete. Turns: %s, "
"Cost this solve: $%s, Total cost so far: $%s", turns
or '?',
f"{solve_cost:.4f}" if solve_cost is not None else '?',
f"{self._total_cost_usd:.4f}")

# Flush log after each message
if log_path:
Expand Down Expand Up @@ -333,11 +372,13 @@ def save_session_info(self) -> None:

# -- Logging helpers --

# Matches both the new ``NNN_kind_ts.md`` layout and the legacy
# Matches the new ``NNN_kind[_taskN]_ts.md`` layout and the legacy
# ``kind_NNN_ts.md`` layout so resuming across the migration is
# lossless. The counter is always captured in group 1 or 2.
# lossless. The counter is always captured in group 1 or 2; the
# optional ``_task<idx>`` segment tags test queries with their task.
_LOG_FILENAME_RE = re.compile(
r"^(?:(\d{3})_[a-z][a-z_]*|[a-z][a-z_]*_(\d{3}))_\d{8}_\d{6}\.md$")
r"^(?:(\d{3})_[a-z][a-z_]*(?:_task\d+)?|[a-z][a-z_]*_(\d{3}))"
r"_\d{8}_\d{6}\.md$")

def _seed_query_count_from_log_dir(self) -> None:
"""Make the per-session counter continuous across the run.
Expand Down Expand Up @@ -375,8 +416,11 @@ def _init_incremental_log(self,

timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
# Counter-first layout: alphabetical sort matches chronological
# order across mixed ``learn``/``test``/``explore`` phases.
filename = f"{self._query_count:03d}_{kind}_{timestamp}.md"
# order across mixed ``learn``/``test``/``explore`` phases. Test
# queries also carry a ``_task<idx>`` segment for attribution.
filename = session_log_filename(
self._query_count, kind, timestamp,
getattr(self._tool_context, "test_task_idx", None))
# Primary: main log dir (host-visible)
filepath = os.path.join(self._log_dir, filename)
os.makedirs(self._log_dir, exist_ok=True)
Expand Down
13 changes: 11 additions & 2 deletions predicators/agent_sdk/log_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,17 @@ def format_conversation_markdown(

elif etype == "result":
turns = entry.get("num_turns", "?")
cost = entry.get("total_cost_usd")
cost_str = f"${cost:.2f}" if cost is not None else "?"
# Prefer the per-solve/total split the sandbox derives (the
# raw total_cost_usd is the cumulative session cost); fall
# back to the raw cumulative value when it isn't supplied.
solve_cost = meta.get("solve_cost_usd") if meta else None
total_cost = meta.get("total_cost_usd") if meta else None
if solve_cost is not None and total_cost is not None:
cost_str = (f"${solve_cost:.2f} this solve, "
f"${total_cost:.2f} total")
else:
cost = entry.get("total_cost_usd")
cost_str = f"${cost:.2f}" if cost is not None else "?"
lines.append(f"---\n\n**Result:** {turns} turns, {cost_str}\n")

elif etype == "error":
Expand Down
2 changes: 1 addition & 1 deletion predicators/agent_sdk/proposal_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ProposalBundle:
# Retractions: names of previously-proposed abstractions to remove
retract_type_names: Set[str] = field(default_factory=set)
retract_predicate_names: Set[str] = field(default_factory=set)
retract_object_augmentor: bool = False
retract_task_augmentor: bool = False
retract_process_names: Set[str] = field(default_factory=set)
retract_option_names: Set[str] = field(default_factory=set)

Expand Down
6 changes: 3 additions & 3 deletions predicators/agent_sdk/sandbox_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def deny(reason):
Read ./session_logs/001_learn_*.md

## Scene Images
`test_option_plan` automatically saves scene images to ./test_images/
`evaluate_option_plan` automatically saves scene images to ./test_images/
after each step. You can Read them to inspect the spatial state of
the environment.

Expand Down Expand Up @@ -207,7 +207,7 @@ def deny(reason):
- **Use visualize_state liberally** — it's free (no physics, no failure
modes). When stuck on a step, STOP testing and visualize the object at
several candidate positions and orientations to find the right region
before spending more test_option_plan calls.
before spending more evaluate_option_plan calls.
- **Vary all parameters** — orientation and other non-position params
affect both the outcome and whether the action succeeds.
- **Search coarse-to-fine** — spread initial attempts across the full
Expand Down Expand Up @@ -332,7 +332,7 @@ def build_sandbox_system_prompt(
```

### Scene Images
`test_option_plan` automatically saves scene images to ./test_images/
`evaluate_option_plan` automatically saves scene images to ./test_images/
after each plan step for later review.

### Proposed Code
Expand Down
53 changes: 47 additions & 6 deletions predicators/agent_sdk/session_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import logging
import os
import time
from typing import Any, Dict, List, Optional

from predicators.agent_sdk.response_parser import parse_message
Expand Down Expand Up @@ -33,6 +34,9 @@ def __init__(self,
self._client: Any = None
self._session_id: Optional[str] = None
self._total_cost_usd: float = 0.0
# total_cost_usd from the SDK is the cumulative session cost; track
# the last value to derive each query's per-solve (marginal) cost.
self._last_cost_usd: float = 0.0
self._total_turns: int = 0
self._started = False
self._query_count: int = 0
Expand Down Expand Up @@ -68,13 +72,20 @@ async def start_session(self) -> None:
if self._tool_context is not None:
extra_hooks = dict(
getattr(self._tool_context, "extra_session_hooks", {}) or {})
# Cap per-response extended thinking so deliberation can't blow the
# harness output-token limit (the 32000-token overflow).
thinking = ({
"type": "enabled",
"budget_tokens": CFG.agent_sdk_thinking_budget_tokens
} if CFG.agent_sdk_thinking_budget_tokens > 0 else None)
options = ClaudeAgentOptions(
allowed_tools=self._allowed_tools or [],
mcp_servers={"predicator_tools": self._mcp_server},
permission_mode="bypassPermissions",
system_prompt=self._system_prompt,
model=self._model_name,
max_turns=CFG.agent_sdk_max_agent_turns_per_iteration,
thinking=thinking, # type: ignore[arg-type]
hooks=(extra_hooks
if extra_hooks else None), # type: ignore[arg-type]
)
Expand Down Expand Up @@ -132,6 +143,11 @@ async def query(self,

collected: List[Dict[str, Any]] = []
log_path = self._init_incremental_log(message, kind=kind)
start = time.perf_counter()
# Wall-clock of the previous response message, so each logged step
# can report how long it took (model thinking before a tool call,
# tool execution before the next message, etc.).
prev_t = start

try:
await self._client.query(message)
Expand All @@ -140,29 +156,50 @@ async def query(self,
if entry is None:
continue
collected.append(entry)
now = time.perf_counter()
dt = now - prev_t
prev_t = now

# Log side-effects
if entry["type"] == "assistant":
for block in entry.get("content", []):
if block.get("type") == "text":
logging.debug("Agent: %s...", block["text"][:200])
logging.debug("[+%.2fs] Agent: %s...", dt,
block["text"][:200])
elif block.get("thinking") is not None:
logging.debug("[+%.2fs] Agent [thinking]: %s...",
dt, block["thinking"][:200])
elif block.get("type") == "tool_use":
params = block.get("input") or {}
param_summary = ", ".join(
f"{k}={truncate(v)}"
for k, v in params.items())
logging.debug("Agent tool call: %s(%s)",
block["name"], param_summary)
logging.debug("[+%.2fs] Agent tool call: %s(%s)",
dt, block["name"], param_summary)
elif entry["type"] == "result":
cost = entry.get("total_cost_usd")
turns = entry.get("num_turns")
solve_cost: Optional[float] = None
if cost is not None:
self._total_cost_usd += cost
# cost is cumulative; the per-solve cost is the
# delta since the last result (a drop means the
# session reset, so the new total is the delta).
solve_cost = float(cost -
self._last_cost_usd if cost >= self.
_last_cost_usd else cost)
self._last_cost_usd = cost
self._total_cost_usd += solve_cost
self._current_log_meta["solve_cost_usd"] = solve_cost
self._current_log_meta["total_cost_usd"] = \
self._total_cost_usd
if turns is not None:
self._total_turns += turns
logging.info(
"Agent iteration complete. Turns: %s, Cost: $%s", turns
or '?', cost or '?')
"Agent iteration complete. Turns: %s, "
"Cost this solve: $%s, Total cost so far: $%s", turns
or '?',
f"{solve_cost:.4f}" if solve_cost is not None else '?',
f"{self._total_cost_usd:.4f}")

# Flush log after each message
if log_path:
Expand All @@ -173,6 +210,10 @@ async def query(self,
collected.append({"type": "error", "error": str(e)})
await self._recover_session(message)

elapsed = time.perf_counter() - start
logging.info("[agent-interaction] kind=%s took %.2fs (%d messages)",
kind, elapsed, len(collected))

# Final flush to ensure everything is saved
if log_path:
self._flush_log(log_path, collected)
Expand Down
Loading
Loading