Trajectorydb organizes complex ai agent actions for easier analysis
TrajectoryDB: A New Database for Agent Trajectories
Databases
Summary
AI agents perform many steps and make decisions while interacting with language models and tools, creating detailed records called trajectories. These records are currently scattered across different files and systems, making them hard to manage and analyze. The authors propose treating these trajectories as a special type of data with their unique features, such as hierarchical structure and linked events, and creating a system called TrajectoryDB to store and query them efficiently. This system designs how trajectories are taken in, stored, and explored so users can better understand and use AI agent workflows.
What this means in practice
- •For ai platform engineers: Build integrated data storage that captures complex agent actions and their relationships for improved debugging and optimization.
- •For security monitoring teams: Track detailed agent execution paths across different systems to better detect anomalies and security issues.
A position paper. It proposes an approach and reports no results.
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.