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

# Prompts

> Configure model instructions, callable tools, and context

## Prompt definitions

Prompts define system instructions, a model, available tools, and context controls.
Standard Agents Builder discovers them in `agents/prompts/`.

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

export default definePrompt({
  name: 'orchestrator_prompt',
  toolDescription: 'Coordinates specialized work.',
  prompt: 'Use the available tools to answer the request.',
  model: 'base_model',
  includeChat: true,
  tools: ['search_docs'],
});
```

## Callable tools

A prompt's `tools` array accepts:

* A callable name as a string.
* A `SubpromptConfig` with result filters and input mappings.
* A `PromptToolConfig` with scoped environment values and static options.

```typescript theme={null}
tools: [
  'search_docs',
  {
    name: 'summarize',
    includeTextResponse: true,
    includeToolCalls: false,
    includeErrors: true,
    initUserMessageProperty: 'query',
    initAttachmentsProperty: 'attachments',
  },
  {
    name: 'web_search',
    env: { SEARCH_CONTEXT: 'documentation' },
    options: { searchContextSize: 'high' },
  },
],
```

Static `options` reach the tool handler during execution.
The prompt detail API retains these values in `tools[].options`.
An exposed agent referenced in `tools` performs a handoff in the current thread.

## Persistent subagents

Declare persistent child relationships in an owning agent side's `subagents` array.
Subagent relationship configuration in a prompt's `tools` array is a definition-time error.
The runtime injects lifecycle tools for enabled side-owned relationships.
The receiving child's side A prompt schema defines its invocation arguments.

See [Subagents](https://docs.standardagents.ai/core-concepts/subagents.md) for relationship configuration.

## Context and validation

| Field | Purpose |
| - | - |
| `includeChat` | Includes conversation history. |
| `includePastTools` | Includes earlier tool results. |
| `toolChoice` | Controls the model's tool selection. |
| `requiredSchema` | Validates prompt invocation arguments. |
| `reasoning` | Controls reasoning and reasoning history. |
| `hooks` | Selects lifecycle hooks. |

See [definePrompt](https://docs.standardagents.ai/api-reference/prompts) for the full reference.


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