Research & Papers

OCM lets LLM agents build executable object-centric models from experience

New approach uses Python classes for environment knowledge, cutting invalid actions significantly.

Deep Dive

LLM agents often struggle to maintain and reuse free-form textual memories as interactions grow. A new paper from Yiyang Li and colleagues introduces Object-Centric Environment Modeling (OCM), a symbolic approach that organizes accumulated experience into an executable, object-centric environment model. OCM maintains two connected code bases: object knowledge, which defines environment entities and their mechanisms as Python classes, and procedure knowledge, which records reusable interaction patterns that must import and use the object model. This structure ensures procedures are grounded in a consistent, verifiable world representation.

OCM operates in an online setting—after each episode, the agent reflects on the trajectory, updates both knowledge bases, and verifies that all procedures execute correctly against the updated object model. During future interactions, the agent uses progressive knowledge disclosure: it first inspects compact code signatures and reads full source code only when necessary. This reduces cognitive load and speeds up decision-making. In experiments across multiple benchmarks, OCM achieved the best average rank and notably reduced the number of invalid actions compared to baseline methods, including free-form memory and other symbolic approaches.

The implications are significant for building more robust and adaptable AI agents. By representing environment knowledge as executable code, OCM makes agent skills easier to validate, update, and reuse across tasks. This could accelerate progress in areas like robotics, game AI, and autonomous systems where agents must learn from ongoing interaction with complex environments.

Key Points
  • OCM structures agent experience into two Python-based code bases: object knowledge (entities/mechanisms) and procedure knowledge (reusable patterns).
  • After each episode, OCM updates and verifies both code bases to ensure all procedures execute correctly against the object model.
  • Progressive knowledge disclosure lets agents inspect compact code signatures first, reducing search overhead while maintaining accuracy.

Why It Matters

Enables LLM agents to build structured, verifiable world models, improving reliability and reusability in complex tasks.

📬 Get the top 10 AI stories daily