Agents¶
Each agent represents an AI coding agent environment, and is associated with:
a unique agent ID
a human-readable name
an icon (emoji / unicode character)
various metadata in its
info()method
Agent usage¶
Each agent is materialized by a Agent object, from which you can access various metadata:
>>> from extra_platforms import CLAUDE_CODE
>>> CLAUDE_CODE
Agent(id='claude_code', name='Claude Code')
>>> CLAUDE_CODE.id
'claude_code'
>>> CLAUDE_CODE.current
False
>>> CLAUDE_CODE.info()
{'id': 'claude_code', 'name': 'Claude Code', 'icon': '✴️', 'url': 'https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview', 'current': False}
To check if the current environment is running in a specific agent, use the corresponding detection function:
>>> from extra_platforms import is_claude_code
>>> is_claude_code()
False
The current agent can be obtained via the current_agent() function:
>>> from extra_platforms import current_agent
>>> current_agent()
Agent(id='unknown_agent', name='Unknown agent')
Recognized agents¶
Icon |
Symbol |
Name |
Detection function |
|---|---|---|---|
✴️ |
Claude Code |
||
👾 |
Cline |
||
➤ |
Cursor |
Hint
The UNKNOWN_AGENT trait represents an unrecognized
agent. It is not included in the ALL_AGENTS group,
and will be returned by current_agent() if the current
agent is not recognized.
Groups of agents¶
There is only one group defined for agents: ALL_AGENTS, which includes all recognized agents.
Icon |
Symbol |
Description |
||
|---|---|---|---|---|
🧠 |
Agents |
⬥ |
---
config:
sankey:
height: 400
showValues: false
width: 800
---
sankey-beta
ALL_AGENTS,CLAUDE_CODE,1
ALL_AGENTS,CLINE,1
ALL_AGENTS,CURSOR,1
---
config:
mindmap:
padding: 5
---
mindmap
((🧠 ALL_AGENTS))
(✴️ CLAUDE_CODE)
(👾 CLINE)
(➤ CURSOR)
Predefined agents¶
Agent definitions and metadata.
- extra_platforms.CLAUDE_CODE = Agent(id='claude_code', name='Claude Code')¶
ID:
claude_codeAliases: -
Name: Claude Code
Icon: ✴️
Reference: <https://claude.ai/code>_
Detection function:
is_claude_code()Pytest decorators:
@skip_claude_code/@unless_claude_codeGroups (2):
ALL_AGENTS⬥,ALL_TRAITS
- extra_platforms.CLINE = Agent(id='cline', name='Cline')¶
ID:
clineAliases: -
Name: Cline
Icon: 👾
Reference: <https://cline.bot>_
Detection function:
is_cline()Pytest decorators:
@skip_cline/@unless_clineGroups (2):
ALL_AGENTS⬥,ALL_TRAITS
- extra_platforms.CURSOR = Agent(id='cursor', name='Cursor')¶
ID:
cursorAliases: -
Name: Cursor
Icon: ➤
Reference: <https://cursor.com>_
Detection function:
is_cursor()Pytest decorators:
@skip_cursor/@unless_cursorGroups (2):
ALL_AGENTS⬥,ALL_TRAITS
- extra_platforms.UNKNOWN_AGENT = Agent(id='unknown_agent', name='Unknown agent')¶
ID:
unknown_agentAliases: -
Name: Unknown agent
Icon: ❓
Reference: <https://en.wikipedia.org/wiki/AI_agent>_
Detection function:
is_unknown_agent()Pytest decorators:
@skip_unknown_agent/@unless_unknown_agentGroups (2):
ALL_TRAITS,UNKNOWN⬥