TrajectoryDB organizes agent interactions for better data handling
TrajectoryDB: A New Database for Agent Trajectories
Databases
Summary
AI agents produce detailed records of their actions and decisions, called trajectories, which include how they interact with language models and other tools. These trajectories are useful for improving AI and monitoring its behavior but are currently scattered across different storage systems, making them hard to use. The authors suggest treating these trajectories as a special kind of data that needs its own system to store and organize it properly. They propose TrajectoryDB, a system designed to keep track of the complex structure, timelines, and relationships within these trajectories to make analyzing them easier.
AI agentstrajectorydata managementexecution structurelineagesemantic reasoningstorage systemquery processingruntime optimizationmemory extraction
Authors
Yunjia Zheng, Juncheng Yang
Abstract
AI agents generate rich execution trajectories that capture their interactions with large language models, tools, and external environments. These trajectories are increasingly valuable for downstream tasks such as memory extraction, model fine-tuning, runtime optimization, and security and cost monitoring. Yet trajectory data today is fragmented across files, databases, and observability systems, with no persistent data management system designed around its unique structure and access patterns. We argue that trajectories should be treated as a distinct data type. A trajectory combines hierarchical execution structure, large volumes of text whose analysis often requires semantic reasoning, and rich dependencies and lineage among events, intermediate states, and derived artifacts. These properties introduce new requirements throughout the data lifecycle. Ingestion must reconstruct and preserve execution structure and lineage; storage must efficiently organize large but highly redundant contexts while maintaining relationships among records; and query processing must jointly reason over structure, temporal order, semantics, and lineage. We therefore envision TrajectoryDB, a trajectory-native data management system that co-designs ingestion, storage, and query processing to efficiently manage and analyze agent execution trajectories.