Usage
Tracking Agents
Use the @track_agent()
decorator to tag your agents
All Events are automatically associated with the agent that originated them. Agents are given a name which is what you will see in the dashboard.
![](https://mintlify.s3-us-west-1.amazonaws.com/agentops/images/agent-name.png)
This event is labeled with the name of the Agent that originated it
The example below tags the agent MyAgent with name SomeCustomName
.
python
from agentops import track_agent
@track_agent(name='SomeCustomName')
class MyAgent:
...
trackagent.name
is optional.
If omitted, agent name defaults to the name of the class (e.g. MyAgent).
If an event does not originate from a tracked agent, agent name defaults to “Default Agent”.
Was this page helpful?