About Cave Agent
CaveAgent is an open source Python framework from an academic research team that changes how a language model agent uses tools. Instead of treating the model's text context as the workspace, it pairs a semantic stream for lightweight reasoning with a runtime stream backed by a persistent Python environment. The model writes code that runs in that environment, so variables, DataFrames and database connections survive from one turn to the next rather than being serialised back into the prompt.
The framework is aimed at researchers and engineers building long running or data heavy agents. Its central idea, which the authors call Stateful Runtime Management, lets developers inject Python objects into the runtime, let the agent manipulate them, and retrieve the results directly. It also includes a runtime integrated skill system that extends the Agent Skills open standard with progressive disclosure. Because the runtime state is accessible to code, it gives programmatically verifiable feedback that can drive automated evaluation and reward signals for reinforcement learning with verifiable rewards.
CaveAgent is free. The code is published on GitHub under the MIT license and installs from PyPI, with the accompanying paper on arXiv. There is no hosted service or paid tier; you supply your own model provider.
The project site is a research paper page rather than a product site. The authors report, across six models on retail and function calling benchmarks, a 10.5 percent average improvement in task success and a 28.4 percent reduction in total token use, rising to 59 percent on data intensive tasks.