Skip to content

Commit f8372d7

Browse files
chore: release 1.2.0 (agent_context)
Bumps version to 1.2.0 and updates CHANGELOG with the agent_context() addition from PR #3. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent da6cfc2 commit f8372d7

5 files changed

Lines changed: 24 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.2.0] - 2026-04-20
9+
10+
### Added
11+
- **`agent_context()`**: new context manager for OTel GenAI semantic-convention
12+
agent identity attributes (`gen_ai.agent.id`, `gen_ai.agent.name`,
13+
`gen_ai.agent.description`, `gen_ai.agent.version`). All spans created inside
14+
the context are auto-tagged by `Last9SpanProcessor`, matching the shape
15+
OpenAI Agents SDK and `autogen-core` emit natively on their own agent spans.
16+
- `agent_context` composes with `conversation_context()` and
17+
`workflow_context()`; covered by tests for triple-nesting, multi-agent
18+
handoff (same conversation), inner-overrides-outer, and mixed-exit order.
19+
20+
### Notes
21+
- `agent_name` is the only required argument (per OTel semconv).
22+
`agent_id` / `agent_description` / `agent_version` are optional.
23+
- Native-instrumented agent spans (e.g. AutoGen's `invoke_agent`,
24+
OpenAI Agents SDK) set `gen_ai.agent.*` directly inside the span body and
25+
will override values from `agent_context`. Sibling and child spans still
26+
receive `agent_context`'s values.
27+
828
## [1.1.0] - 2026-04-20
929

1030
### Added

last9_genai/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
For more information, see: https://github.com/last9/python-ai-sdk
3535
"""
3636

37-
__version__ = "1.1.0"
37+
__version__ = "1.2.0"
3838
__author__ = "Last9 Inc."
3939
__license__ = "MIT"
4040

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "last9-genai"
7-
version = "1.1.0"
7+
version = "1.2.0"
88
description = "Last9 observability attributes for OpenTelemetry GenAI spans - track costs, workflows, and conversations in LLM applications"
99
readme = "README.md"
1010
license = "MIT"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name="last9-genai",
16-
version="1.1.0",
16+
version="1.2.0",
1717
author="Last9 Inc.",
1818
author_email="hello@last9.io",
1919
description="Last9 observability attributes for OpenTelemetry GenAI spans",

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)