Skip to content

Python: [Bug]: Not able to access Agent, getting Attribute Error #4240

@amanG251314

Description

@amanG251314

Description

  • Not able to import Agent from agent_framework.
    from agent_framework import Agent

Error: AttributeError: type object 'SpanAttributes' has no attribute 'LLM_SYSTEM'

Code Sample

full error

>>> from agent_framework import Agent
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/v-amanpatkar/anaconda3/envs/migration_v2/lib/python3.11/site-packages/agent_framework/__init__.py", line 20, in <module>
    from ._agents import Agent, BaseAgent, RawAgent, SupportsAgentRun
  File "/home/v-amanpatkar/anaconda3/envs/migration_v2/lib/python3.11/site-packages/agent_framework/_agents.py", line 32, in <module>
    from ._clients import BaseChatClient, SupportsChatGetResponse
  File "/home/v-amanpatkar/anaconda3/envs/migration_v2/lib/python3.11/site-packages/agent_framework/_clients.py", line 31, in <module>
    from ._tools import (
  File "/home/v-amanpatkar/anaconda3/envs/migration_v2/lib/python3.11/site-packages/agent_framework/_tools.py", line 40, in <module>
    from .observability import (
  File "/home/v-amanpatkar/anaconda3/envs/migration_v2/lib/python3.11/site-packages/agent_framework/observability.py", line 1542, in <module>
    "system_name": (SpanAttributes.LLM_SYSTEM, None, False, None),
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'SpanAttributes' has no attribute 'LLM_SYSTEM'

Error Messages / Stack Traces

Package Versions

1.0.0rc1

Python Version

Python 3.11

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions