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

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**SkillManager**](../classes/SkillManager) class in the [**manager**](../modules/manager) 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

<ResponseField name="Returns" type="str">
  XML string with \<available\_skills> block
</ResponseField>

## 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 title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/skills/manager.py#L570">
  `praisonaiagents/skills/manager.py` at line 570
</Card>
