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

# definePrompt

> Reference for prompt configuration and callable tools

## Signature

```typescript theme={null}
import { definePrompt } from '@standardagents/builder';

export default definePrompt({
  name: 'asset_orchestrator',
  toolDescription: 'Coordinates asset generation.',
  prompt: 'Use the available tools to process the request.',
  model: 'base_model',
  tools: [
    {
      name: 'generate_asset',
      env: { ASSET_STYLE: 'topdown' },
      options: { format: 'png' },
    },
  ],
});
```

Import the canonical types from the package:

```typescript theme={null}
import type {
  PromptDefinition,
  PromptToolConfig,
  SubpromptConfig,
} from '@standardagents/builder';
```

## Prompt tools

| Form | Fields |
| - | - |
| Callable name | A tool, prompt, or exposed agent name. |
| `PromptToolConfig` | `name`, `env`, `options`. |
| `SubpromptConfig` | `name`, result filters, initial message mappings. |

`PromptToolConfig.options` contains static tool options.
`PromptToolConfig.env` scopes environment values to the invocation.
The deprecated `tenvs` alias remains available for environment values.
The admin prompt detail response preserves `options` unchanged.

`SubpromptConfig` supports `includeTextResponse`, `includeToolCalls`, and `includeErrors`.
Each filter defaults to `true`.
`initUserMessageProperty` selects the initial message argument.
`initAttachmentsProperty` selects attachment arguments.

## Persistent subagents

Declare child relationships in an agent side's `subagents` array.
A prompt tool entry cannot configure a subagent relationship.
The runtime injects lifecycle tools for enabled relationships.
The child's side A prompt schema defines its invocation arguments.
Those arguments persist as `ThreadState.arguments`.

## Attachment mappings

Mapped attachments are validated in the parent thread.
The runtime copies them into the child filesystem.
The child receives paths local to its own filesystem.

## Related

* [Complete prompt reference](https://docs.standardagents.ai/api-reference/prompts)
* [defineAgent](https://docs.standardagents.ai/api-reference/define/agent.md)
* [Subagents](https://docs.standardagents.ai/core-concepts/subagents.md)


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