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

# Scripted Model • AI Agent SDK

> ScriptedModel: A model double that returns scripted replies in order and records requests.

# ScriptedModel

> Defined in the [**scripted**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/scripted.md) module.

AI Agent

A model double that returns scripted replies in order and records requests.

Pass one to an agent in place of a model name::

model = ScriptedModel(\["done"])
agent = Agent(instructions="...", llm=model)

## Constructor

**script** `Iterable[ScriptEntry]` (default: ())

No description available.

## Methods

> **[tool\_call()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ScriptedModel-tool_call.md)**
>
> Script a turn in which the model calls one tool.

> **[tool\_calls()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ScriptedModel-tool_calls.md)**
>
> Script a turn in which the model calls several tools at once.

> **[text()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ScriptedModel-text.md)**
>
> Script a plain assistant answer (the same as a bare `str` entry).

> **[extend()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ScriptedModel-extend.md)**
>
> Append more replies to the script. Returns `self` for chaining.

> **[reset()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ScriptedModel-reset.md)**
>
> Rewind to the start of the script and forget recorded requests.

> **[requests()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ScriptedModel-requests.md)**
>
> Every request the agent has sent to this double, in order.

> **[request\_count()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ScriptedModel-request_count.md)**
>
> How many requests the agent has sent.

> **[remaining()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ScriptedModel-remaining.md)**
>
> How many scripted replies are still unused.

> **[exhausted()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ScriptedModel-exhausted.md)**
>
> Whether every scripted reply has been consumed.

## Source

> **[View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/model_harness/scripted.py#L272)**
>
> `praisonaiagents/model_harness/scripted.py` at line 272


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