Report Abuse

Basic Information

Trace is an AutoDiff-like research library and platform for end-to-end generative optimization of AI systems using rich, general feedback. It captures and propagates an execution trace of Python code so developers can mark parts of programs as trainable and optimize them with feedback signals that can be numerical rewards, natural language text, or other diagnostics. The project implements a PyTorch-like API with primitives such as node and bundle and supports writing executable Python functions as the computational workflow. It is intended to reproduce the experiments from the accompanying Trace paper and to enable researchers and developers to build self-improving agents and optimization pipelines. The package is installable via pip, requires Python 3.9 or later, and is provided as a beta research tool with documentation, tutorials, and compatibility with LLM backends for feedback and optimization.

Links

Categorization

App Details

Features
Trace exposes simple primitives to define and trace computation: node to represent values and trainable variables, bundle or model decorators to wrap functions or agent classes, and built-in graph visualization and backward APIs for applying feedback. The platform ships multiple optimizer implementations out of the box, including OPRO, TextGrad, and the project’s OptoPrime optimizer, and lets users switch optimizers on the same traced program. It integrates with LLM backends for feedback and caching, supporting LiteLLM by default and optional AutoGen support. The repo includes tutorials and Colab-ready examples spanning prompt optimization, multi-agent collaboration, NLP tasks, robotics control, and reproducible benchmark experiments. It also provides utilities for working directly with the TraceGraph so users can implement custom optimizers and evaluation workflows.
Use Cases
Trace helps researchers and developers train and refine AI agents and program components when conventional gradients are unavailable or when feedback is non-differentiable. By recording execution traces and allowing selective marking of trainable nodes, users gain fine-grained control to optimize logic, prompts, or code with numerical or textual feedback. The library supports experimentation with different LLM-based optimizers and backends, facilitates reproducible research from the accompanying paper, and includes tutorials for real tasks like prompt tuning, BigBench-Hard problems, multi-agent scenarios, and robotic arm control. It lowers barriers to prototyping self-improving agents, comparing optimizer trade-offs, and extending the framework with custom optimizers, while noting it is a beta, research-focused toolkit requiring human oversight.

Please fill the required fields*