LightAgent v0.9.4
Highlights
LightAgent v0.9.4 strengthens tool contracts, policy enforcement, runtime lifecycle coverage, and LightSwarm handoff consistency.
- Add explicit tool schema diagnostics through
ToolRegistry.validate_tool_info(...),ToolRegistry.validate_tools(), andLightAgent.validate_tools(). - Detect malformed tool metadata, duplicate parameter definitions, and duplicate tool names registered by different callables.
- Add
PolicyHookwith phase restrictions, fail-closed behavior, and configurable sync/async timeouts. - Add the
on_handofflifecycle hook with blocking, failure tracing, parent trace propagation, and consistent source-run closure. - Preserve
user_id,metadata, tracing options, result format, retry limits, and tool-iteration limits across LightSwarm entry runs and delegated handoffs (#79, #80). - Expand GitHub CI to execute the complete tracked test suite on Python 3.10, 3.11, and 3.12.
- Update tool, runtime hook, README, and roadmap documentation for the new contracts and lifecycle behavior.
Compatibility
- Existing
agent.run("hello")and streaming calls remain compatible. - Tool diagnostics are explicit and read-only; registration behavior is unchanged unless an application chooses to validate and act on diagnostics.
- Existing plain runtime hooks remain failure-isolated. Fail-closed behavior is enabled explicitly through
PolicyHook. - Existing LightSwarm calls remain compatible while runtime context is now preserved during delegation.
Validation
- GitHub CI passed on Python 3.10, 3.11, and 3.12.
- Each CI environment completed all 102 tracked tests.
- Local validation on the release commit:
102 passed. - Package compilation and repository diff checks passed for the v0.9.4 implementation PR.
Full changes: v0.9.3...v0.9.4