Skip to content

Agent Framework RC error SpanAttributes.LLM_SYSTEM, #4276

@iesussan

Description

@iesussan

Description

Hey team has anyone hit this using agent-framework==1.0.0rc1?

pyproject.toml

#pyproject.toml
[project]
name = "bug"
version = "0.0.1"
description = "agent-framework==1.0.0rc1 + semconv_ai==0.4.14"
requires-python = ">=3.13"
dependencies = [
    "agent-framework==1.0.0rc1"]

[tool.uv]
prerelease = "allow"

Agent

"""
agent.py — Intenta crear un agente dummy con agent-framework==1.0.0rc1.
run agent:
uv run python agent.py

Variables de entorno requeridas:
    AZURE_AI_PROJECT_ENDPOINT  — e.g. https://<hub>.services.ai.azure.com/...
    AZURE_AI_MODEL             — nombre del deployment, e.g. gpt-4o
"""

import asyncio
import os

from azure.identity import DefaultAzureCredential

from agent_framework.azure import AzureAIClient

ENDPOINT = os.environ["AZURE_AI_PROJECT_ENDPOINT"]
MODEL    = os.environ.get("AZURE_AI_MODEL", "gpt-4o")

async def main():
    client = AzureAIClient(
        project_endpoint=ENDPOINT,
        model_deployment_name=MODEL,
        credential=DefaultAzureCredential(),
    )
    agent = client.as_agent(
        name="dummy",
        instructions="""
        1) A robot may not injure a human being...
        2) A robot must obey orders given it by human beings...
        3) A robot must protect its own existence...

        Give me the TLDR in exactly 5 words.
        """,
    )

    result = await agent.run("Summarize the Three Laws of Robotics")
    print(result)

asyncio.run(main())

The error happens at import time before any Agent or AzureAIClient is even constructed.
Agent-framework pulls in opentelemetry-semantic-conventions-ai as a transitive dependency, and the version it resolves to (0.4.x) no longer has LLM_SYSTEM and related attributes that the framework references at the top level of observability.

Has anyone else run into this? Is there a pinned version of semconv_ai that works, or a workaround you're using or is just me ?

Code Sample

"""
agent.py — Intenta crear un agente dummy con agent-framework==1.0.0rc1.
run agent:
uv run python agent.py

Variables de entorno requeridas:
    AZURE_AI_PROJECT_ENDPOINT  — e.g. https://<hub>.services.ai.azure.com/...
    AZURE_AI_MODEL             — nombre del deployment, e.g. gpt-4o
"""

import asyncio
import os

from azure.identity import DefaultAzureCredential

from agent_framework.azure import AzureAIClient

ENDPOINT = os.environ["AZURE_AI_PROJECT_ENDPOINT"]
MODEL    = os.environ.get("AZURE_AI_MODEL", "gpt-4o")

async def main():
    client = AzureAIClient(
        project_endpoint=ENDPOINT,
        model_deployment_name=MODEL,
        credential=DefaultAzureCredential(),
    )
    agent = client.as_agent(
        name="dummy",
        instructions="""
        1) A robot may not injure a human being...
        2) A robot must obey orders given it by human beings...
        3) A robot must protect its own existence...

        Give me the TLDR in exactly 5 words.
        """,
    )

    result = await agent.run("Summarize the Three Laws of Robotics")
    print(result)

asyncio.run(main())

Error Messages / Stack Traces

"system_name": (SpanAttributes.LLM_SYSTEM, None, False, None),
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'SpanAttributes' has no attribute 'LLM_SYSTEM'

Package Versions

gent-framework==1.0.0rc1

Python Version

Python 3.13.11

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions