> ## 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.

# To Prompt • AI Agent SDK

> to_prompt: Generate XML prompt for available skills.

# to\_prompt

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.

Generate XML prompt for available skills.

When one or more `@bundle` selectors carried a bundle-level
`instruction`, those are prepended in a `&lt;bundle_instructions&gt;`
block so the documented bundle guidance actually reaches the prompt.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def to_prompt() -> str
```

### Returns

**Returns** `str`

XML string with \<available\_skills> block

## Uses

* `get_available_skills`
* `generate_skills_xml`
* `get_bundle_instructions`
* `html.escape`

## Used By

* [`Agent.get_skills_prompt`](../functions/Agent-get_skills_prompt)

## Source

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


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