> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# invoke • AI Agent SDK

> invoke: Render a skill body into a ready-to-send prompt.

# invoke

Method

> This is a method of the [**SkillManager**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/SkillManager.md) class in the [**manager**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/manager.md) module.

Render a skill body into a ready-to-send prompt.

Substitutes `$ARGUMENTS`, `$N`, `$&#123;PRAISON_SKILL_DIR&#125;` and
optionally runs ``!`cmd` `` inline shell blocks when `shell_exec`
is True.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def invoke(name: str, raw_args: str, session_id: Optional[str], shell_exec: bool) -> Optional[str]
```

## Parameters

**name** `str` *required*

No description available.

**raw\_args** `str` (default: '')

No description available.

**session\_id** `Optional[str]`

No description available.

**shell\_exec** `bool` (default: False)

No description available.

### Returns

**Returns** `Optional[str]`

Rendered body, or None if the skill does not exist or is not
user-invocable.

## Uses

* `get_skill`
* `activate`
* `render_skill_body`
* `render_shell_blocks`

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/skills/manager.py#L530)
>
> `praisonaiagents/skills/manager.py` at line 530


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.