# invoked_name

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/_invocation/invoked_name)

Return the command name this process was launched with.

Cached: `sys.argv[0]` and the launch environment are fixed for the life of
the process. Tests that vary either must call `invoked_name.cache_clear()`.

## Signature

```python
invoked_name() -> str
```

## Returns

`str`

The console-script name the user invoked (for example `dcode`,
`deepagents-code`, or a shim name), or `DEFAULT_INVOKED_NAME` when it
cannot be determined.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/e4c1ffe9ee63d7854147de490ca27495ef157a7b/libs/code/deepagents_code/_invocation.py#L82)