Releases: alibaba/loongsuite-python-agent
Releases · alibaba/loongsuite-python-agent
loongsuite-python-agent 0.3.0
loongsuite-python-agent 0.3.0
Installation
pip install loongsuite-distro==0.3.0
loongsuite-bootstrap -a install --version 0.3.0Package Versions
- loongsuite-* packages: 0.3.0
- opentelemetry-* packages: 0.61b0
PyPI packages
The following distributions are built and uploaded to PyPI for this release:
loongsuite-util-genailoongsuite-distroloongsuite-site-bootstraploongsuite-instrumentation-agentscopeloongsuite-instrumentation-claude-agent-sdkloongsuite-instrumentation-crewailoongsuite-instrumentation-dashscopeloongsuite-instrumentation-google-adkloongsuite-instrumentation-langchainloongsuite-instrumentation-langgraphloongsuite-instrumentation-litellmloongsuite-instrumentation-mem0
loongsuite
Added
- Release tooling: build and publish
instrumentation-loongsuite/*as separate PyPI wheels (withloongsuite_pypi_manifest.pydefining which distributions are uploaded; some remain tar-only until ready), and add a PyPI packages section to aggregated release notes (#155) loongsuite-site-bootstrap: initialize .pth-based OTel auto-instrumentation package (#156)- Top-level docs: add Chinese README (
README-zh.md) translated fromREADME.md. (#159)
Changed
instrumentation-loongsuite/*,loongsuite-distro, andutil/opentelemetry-util-genai:pyproject.tomlmetadata and dependencies for standalone PyPI installs (#155)loongsuite-site-bootstrap,loongsuite-distrodocs: updateREADME.md. (#159)
loongsuite-util-genai
Breaking Change
- Remove package
opentelemetry.util.genai._extended_common.EntryInvocationandReactStepInvocationnow live inextended_types;_apply_entry_finish_attributesand_apply_react_step_finish_attributeslive inextended_span_utils. (#158) - Rename packages
opentelemetry.util.genai._extended_memory→extended_memoryandopentelemetry.util.genai._extended_semconv→extended_semconv(public module paths). (#158)
Fixed
- Add bypass logic around instrumentation-specific initialization so
opentelemetry-util-genaican work correctly as a standalone SDK without depending on instrumentation package bootstrap flow. (#159)
loongsuite-instrumentation-agentscope
Changed
- Adapt imports to
opentelemetry-util-genaimodule layout change (#158)
Fixed
- Avoid duplicate LLM / Agent spans when multiple
ChatModelBaseor
AgentBasesubclasses stack (e.g. proxy layers that each implement__call__
and forward inward), by tracking per-task__call__depth with
contextvarsand only instrumenting the outermost frame (#153) - Avoid duplicate
react stepspans when ReAct hook wrappers nest (e.g.
subclasses or mixins that override_reasoning/_actingand call
super()), by only opening steps and updating tool-act counts on the
outermost wrapper (#153)
Changed
- Update README integration flow to align with the root recommended LoongSuite pattern using Option C (
pip install loongsuite-instrumentation-agentscope) andloongsuite-instrument. (#159)
Added
- Add ReAct step span instrumentation for ReAct agents (#140)
- Each ReAct iteration is wrapped in a
react stepspan withgen_ai.react.roundandgen_ai.react.finish_reasonattributes - Uses AgentScope's instance-level hook system for robust, non-invasive instrumentation
- Each ReAct iteration is wrapped in a
loongsuite-instrumentation-agno
Changed
- Update README integration flow to align with the root recommended LoongSuite pattern using Option A (
loongsuite-bootstrap -a install --latest) for this package not yet on PyPI. (#159)
loongsuite-instrumentation-claude-agent-sdk
Changed
- Adapt imports to
opentelemetry-util-genaimodule layout change (#158)
loongsuite-instrumentation-crewai
Changed
- Adapt imports to
opentelemetry-util-genaimodule layout change (#158) - Update README integration flow to align with the root recommended LoongSuite pattern using Option C (
pip install loongsuite-instrumentation-crewai) andloongsuite-instrument. (#159)
Added
- Initialize the instrumentation for CrewAI (#87)
loongsuite-instrumentation-dashscope
Changed
- Adapt imports to
opentelemetry-util-genaimodule layout change (#158)
loongsuite-instrumentation-dify
Changed
- Update README integration flow to align with the root recommended LoongSuite pattern using Option A (
loongsuite-bootstrap -a install --latest) for this package not yet on PyPI. (#159)
loongsuite-instrumentation-google-adk
Changed
- Update README integration flow to align with the root recommended LoongSuite pattern using Option C (
pip install loongsuite-instrumentation-google-adk) andloongsuite-instrument. (#159)
loongsuite-instrumentation-langchain
Added
- Rerank / document-compressor span support (#149)
Changed
- Adapt imports to
opentelemetry-util-genaimodule layout change (#158) - Set
run_inline = Trueon the tracer so LangChain callbacks run inline for correct OpenTelemetry context propagation (#148) - Improved token usage extraction to support multiple LangChain/LLM provider formats (#148)
- Update README integration flow to align with the root recommended LoongSuite pattern using Option C (
pip install loongsuite-instrumentation-langchain) andloongsuite-instrument. (#159)
loongsuite-instrumentation-langgraph
Changed
- Update README integration flow to align with the root recommended LoongSuite pattern using Option C (
pip install loongsuite-instrumentation-langgraph) andloongsuite-instrument. (#159)
loongsuite-instrumentation-mcp
Changed
- Update README integration flow to align with the root recommended LoongSuite pattern using Option A (
loongsuite-bootstrap -a install --latest) for this package not yet on PyPI. (#159)
loongsuite-instrumentation-mem0
Changed
loongsuite-python-agent 0.2.0
loongsuite-python-agent 0.2.0
Installation
pip install loongsuite-distro==0.2.0
loongsuite-bootstrap -a install --version 0.2.0Package Versions
- loongsuite-* packages: 0.2.0
- opentelemetry-* packages: 0.61b0
loongsuite-util-genai
Added
- Add
RetrievalDocumentdataclass for typed retrieval document representation (id, score, content, metadata). (#145) - Control RetrievalDocument serialization: when content capturing is NO_CONTENT, only serialize id and score; when SPAN_ONLY/SPAN_AND_EVENT, serialize full (id, score, content, metadata) (#145)
- Add Entry span (
gen_ai.span.kind=ENTRY) and ReAct Step span (gen_ai.span.kind=STEP) support inExtendedTelemetryHandlerwith types, utilities, and context-manager APIs (#135) - Propagate
gen_ai.session.idandgen_ai.user.idinto Baggage duringstart_entry, enabling traffic coloring viaBaggageSpanProcessorfor all child spans within the entry block (#135)
Changed
- Retrieval semantic convention: Align retrieval spans with LoongSuite spec (#145)
gen_ai.operation.name:retrieve_documents→retrievalgen_ai.retrieval.query→gen_ai.retrieval.query.textfor query text- Span name:
retrieval {gen_ai.data_source.id}whendata_source_idis set - Add
RetrievalInvocationfields:data_source_id,provider,request_model,top_k
- Add optional
contextparameter to allstart_*methods inTelemetryHandlerandExtendedTelemetryHandlerfor explicit parent-child span linking (#135) - Unify
attach/detachstrategy inExtendedTelemetryHandler: alwaysattachregardless of whethercontextis provided;stop_*/fail_*guards restored tocontext_token is None or span is None(#135)
Fixed
- Fix
gen_ai.retrieval.queryto respect content capturing mode: whenOTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENTisNO_CONTENT, both query and documents are now omitted from retrieve spans (previously only documents were gated) (#139) - Fix
_safe_detachto use_RUNTIME_CONTEXT.detachdirectly, avoiding noisyERRORlog from OTel SDK'scontext_api.detachwrapper (#135) - Fix undefined
otel_contextreference in_multimodal_processing.pyprocess_multimodal_fail, replaced with_safe_detach(#135)
loongsuite-instrumentation-langchain
Added
-
ReAct Step instrumentation for AgentExecutor (#139)
- Monkey-patch
AgentExecutor._iter_next_stepand_aiter_next_stepto instrument each ReAct iteration - Dual patch: patch both
langchain.agents(0.x) andlangchain_classic.agents(1.x) when available, so either import path works - Covers invoke, ainvoke, stream, astream, batch, abatch
- ReAct Step spans:
gen_ai.span.kind=STEP,gen_ai.operation.name=react,gen_ai.react.round,gen_ai.react.finish_reason - Span hierarchy: Agent > ReAct Step > LLM/Tool
- Monkey-patch
-
LangGraph ReAct agent support (requires
loongsuite-instrumentation-langgraph) (#139)- Detect LangGraph agents via
Run.metadata["_loongsuite_react_agent"]
(metadata injected by the LangGraph instrumentation) - Disambiguate the top-level graph (Agent span) from child nodes (chain
spans) usinginside_langgraph_reactpropagation - Agent name resolution: when the ReAct agent is invoked inside an outer
graph node, inherit the node's name (e.g.invoke_agent product_agent)
instead of the generic default (invoke_agent LangGraph) - Track ReAct step boundaries via callback-based detection of the
"agent"node within the graph - Span hierarchy: Agent > ReAct Step > LLM/Tool (same as AgentExecutor)
- Detect LangGraph agents via
Breaking Changes
- Rewrite the instrumentation for LangChain with
genai-util(#139)- Replaced the legacy
wrapt-based function wrapping withBaseTracercallback mechanism - Migrated to
ExtendedTelemetryHandlerfromopentelemetry-util-genaifor standardized GenAI semantic conventions - Added Agent detection by
run.name, TTFT tracking, content capture gating, andRLockthread safety - Added new test suite with
oldest/latestdependency matrices
- Replaced the legacy
loongsuite-instrumentation-langgraph
Added
- Initial instrumentation framework for LangGraph (#143)
- Patch
create_react_agentto set_loongsuite_react_agent = Trueflag
onCompiledStateGraph - Patch
Pregel.stream/Pregel.astreamto inject
metadata["_loongsuite_react_agent"]intoRunnableConfig, enabling
LangChain instrumentation to detect ReAct agents via callback metadata - All patches use
wrapt.wrap_function_wrapper/
opentelemetry.instrumentation.utils.unwrap(consistent with
loongsuite-instrumentation-langchain)
- Patch
loongsuite-instrumentation-litellm
Added
- Initialize the instrumentation for Litellm (#88)
loongsuite-python-agent 0.1.0
loongsuite-python-agent 0.1.0
Installation
pip install loongsuite-distro==0.1.0
loongsuite-bootstrap -a install --version 0.1.0Package Versions
- loongsuite-* packages: 0.1.0
- opentelemetry-* packages: 0.60b1
loongsuite
Fixed
- Add
from __future__ import annotationsto fix Python 3.9 compatibility for union type syntax (X | Y) (#80)
Added
loongsuite-distro: initialize loongsuite python agent distro (#126)
loongsuite-util-genai
Fixed
- Fix compatibility with Python 3.8 hashlib usage (#102)
Added
- Add support for memory operations (#83)
- Add multimodal separation and upload support for GenAI utils (#94)
- Add
gen_ai.usage.total_tokensattribute for LLM, Agent, and Embedding operations (#108) - Add
gen_ai.response.time_to_first_tokenattribute for LLM operations (#113) - Enhance the capture and upload process of multimodal data (#119)
- Enhance multimodal pre-upload pipeline with Data URI and local path support
- Add AgentInvocation multimodal data handling
- Introduce configurable pre-upload hooks and uploader entry points, add graceful shutdown processor for GenAI components
- Improve multimodal metadata extraction and docs
loongsuite-instrumentation-agentscope
Fixed
- Fix tool call response parsing (#118)
- Fix LLM message content capture in spans (#91)
- Fix spell mistake in pyproject.toml (#8)
Breaking Changes
- Deprecate the support for AgentScope v0 (#82)
Changed
- Refactor the instrumentation for AgentScope with
genai-util(#82)- Refactored to use opentelemetry-util-genai: Migrated to
ExtendedTelemetryHandlerandExtendedInvocationMetricsRecorderfromopentelemetry-util-genaifor unified metrics and tracing management - Architecture Simplification: Removed redundant code and consolidated instrumentation logic
- Tool Tracing Enhancement: Rewritten tool execution tracing to use
ExtendedTelemetryHandlerfor full feature support (see HANDLER_INTEGRATION.md)- Now properly leverages
_apply_execute_tool_finish_attributesfor standardized attribute handling - Automatic metrics recording for tool executions
- Content capturing mode support (respects experimental mode and content capturing settings)
- Unified error handling with proper error attributes
- Now properly leverages
- Removed "V1" prefix from class names (AgentScopeV1ChatModelWrapper → AgentScopeChatModelWrapper, etc.)
- Updated to use Apache License 2.0 headers across all source files
- Refactored to use opentelemetry-util-genai: Migrated to
- Refactor the instrumentation for AgentScope (#14)
Added
loongsuite-instrumentation-agno
Fixed
- Fix aresponse missing await and double wrapped() calls (#107)
- Fix broken trace caused by the improper setting of the parent context (#23)
- Correct span name of tool call (#21)
Added
- Initial implementation of Agno instrumentation (#13)
loongsuite-instrumentation-claude-agent-sdk
Added
- Initial implementation of Claude Agent SDK instrumentation (#104)
- Support for agent query sessions via Hooks mechanism
- Support for tool execution tracing (PreToolUse/PostToolUse hooks)
- Integration with
opentelemetry-util-genaiExtendedTelemetryHandler - Span attributes following OpenTelemetry GenAI Semantic Conventions
- Support for Alibaba Cloud DashScope Anthropic-compatible API
loongsuite-instrumentation-dashscope
Added
Fixed
- Fix MIME type inference logic for speech synthesis instrumentation (#115)
loongsuite-instrumentation-dify
Fixed
- Correct timestamp calculation in dify instrumentation (#74)
Added
- Initialize the instrumentation for dify (#29)
loongsuite-instrumentation-google-adk
Added
- Initialize the instrumentation for Google Agent Development Kit (ADK) (#71)
loongsuite-instrumentation-langchain
Added
- Initialize the instrumentation for langchain (#34)
loongsuite-instrumentation-mcp
Fixed
- Add support for mcp 1.25.0 (#126)
Added
Changed
- Relocate mcp instrumentation to loongsuite directory (#42)
- Refactor the instrumentation for mcp (#39)
loongsuite-instrumentation-mem0
Fixed
- Fix unit tests (#98)