Skip to content

LightAgent v0.7.5

Choose a tag to compare

@wxai-space wxai-space released this 01 Jun 17:10
· 65 commits to main since this release

LightAgent v0.7.5 Release Notes

LightAgent v0.7.5 focuses on safer agent execution and better tool documentation. It adds an opt-in Guardrails layer while keeping default agent.run() behavior backward compatible.

Upgrade

pip install --upgrade lightagent>=0.7.5

Highlights

  • Added opt-in input guardrails that run before memory lookup and model requests.
  • Added opt-in tool-call guardrails that run after tool arguments are parsed and before Python tool execution.
  • Added opt-in non-streaming output guardrails for final response validation or rewriting.
  • Added GuardrailDecision and GuardrailManager as public exports.
  • Added stable [LA-GUARDRAIL] error code for blocked operations.
  • Added guardrail_block trace events when trace=True is enabled.
  • Added focused guardrails documentation and FAQ examples.
  • Added a comprehensive Tools guide covering tool_info, ToolRegistry, ToolLoader, AsyncToolDispatcher, runtime validation, dynamic loading, built-in tools, and MCP tool registration.
  • Linked the Tools guide from README.md, README.zh-CN.md, and docs/FAQ.md.

Compatibility

  • Guardrails are disabled by default.
  • agent.run("hello") still returns a string by default.
  • agent.run(query, stream=True, user_id=user_id) keeps legacy stream behavior unless guardrails are configured.
  • Output guardrails currently apply to non-streaming final responses.

Tests

  • Guardrails PR verification: python -m compileall -q LightAgent tests/test_v065_core.py tests/test_v070_tracing.py tests/test_memory_policy.py tests/test_guardrails.py
  • Guardrails PR verification: PYTHONPATH=. python -m pytest -q tests/test_v065_core.py tests/test_v070_tracing.py tests/test_memory_policy.py tests/test_guardrails.py
  • GitHub Actions CI passed for Python 3.10, 3.11, and 3.12 on PR #49.

Included Pull Requests

New Contributors

Full Changelog: v0.7.0...v0.7.5