LightAgent v0.7.0
LightAgent v0.7.0 Release Notes
LightAgent v0.7.0 focuses on production observability, safer memory behavior, and repository health. It keeps the lightweight, OpenAI-compatible core while making agent runs easier to inspect and debug.
Upgrade
pip install --upgrade lightagent>=0.7.0Highlights
- Added opt-in structured trace observability with
agent.run(..., trace=True). - Added
agent.export_trace()for retrieving the latest run trace as JSON-compatible events. - Added trace event primitives for run lifecycle, model request summaries, model responses, tool calls, tool results, errors, and run completion.
- Added prompt-safe model request summaries so traces expose model/tool/message counts without storing full prompts or history.
- Extended
RunResultwith atracefield while keepingagent.run("hello")string-compatible by default. - Added tracing documentation plus README and README.zh-CN quick-start examples.
- Added MemoryPolicy support for namespace-based memory isolation and provenance filtering.
- Added project health files: CI workflow, issue templates, PR template, contributing guide, code of conduct, and security policy.
- Updated package metadata, dependency constraints, and repository links.
- Hardened dynamic tool name/path handling and removed a stream tool-call debug print.
Compatibility
agent.run("hello")still returns a plain string by default.agent.run(query, stream=True, user_id=user_id)keeps the legacy streaming generator behavior.- Trace collection is disabled unless
trace=Trueis passed. - Default memory behavior remains compatible unless a
MemoryPolicyormemory_namespaceis configured.
Tests
python -m compileall -q LightAgent tests/test_v065_core.py tests/test_v070_tracing.py tests/test_memory_policy.pyPYTHONPATH=. python -m pytest -q tests/test_v065_core.py tests/test_v070_tracing.py tests/test_memory_policy.py- GitHub Actions CI covers Python 3.10, 3.11, and 3.12.
Included Pull Requests
Full Changelog: v0.6.5...v0.7.0