Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Elevenlabs Elevenlabs python PromptAgentApiModelInput

From Leeroopedia
Revision as of 12:26, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Elevenlabs_Elevenlabs_python_PromptAgentApiModelInput.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Field Value
source Elevenlabs_Elevenlabs_python
domains Conversational AI, Agent Prompt, LLM Configuration, RAG, Tools
last_updated 2026-02-15

Overview

Description

PromptAgentApiModelInput is a Pydantic model that defines the prompt and LLM configuration for a conversational AI agent in the ElevenLabs platform. It is one of the most feature-rich configuration models in the SDK, encapsulating the system prompt, LLM selection (including custom LLM support), reasoning parameters, tool integrations (built-in tools, custom tools, MCP servers), knowledge base connections, RAG configuration, and backup LLM cascading settings.

This model is auto-generated by Fern from the ElevenLabs API definition and inherits from UncheckedBaseModel. It is used as input when creating or updating agent prompt configurations.

Usage

PromptAgentApiModelInput is used when creating or updating the prompt configuration of a conversational AI agent. It controls how the agent's underlying LLM processes conversations, what tools are available, and how knowledge retrieval is configured.

Code Reference

Source Location

src/elevenlabs/types/prompt_agent_api_model_input.py

Class Signature

class PromptAgentApiModelInput(UncheckedBaseModel):
    ...

Import Statement

from elevenlabs.types import PromptAgentApiModelInput

I/O Contract

Field Type Required Description
prompt Optional[str] No The prompt for the agent.
llm Optional[Llm] No The LLM to query with the prompt and the chat history. If using data residency, the LLM must be supported in the data residency environment.
reasoning_effort Optional[LlmReasoningEffort] No Reasoning effort of the model. Only available for some models.
thinking_budget Optional[int] No Max number of tokens used for thinking. Use 0 to turn off if supported by the model.
temperature Optional[float] No The temperature for the LLM.
max_tokens Optional[int] No If greater than 0, maximum number of tokens the LLM can predict.
tool_ids Optional[List[str]] No A list of IDs of tools used by the agent.
built_in_tools Optional[BuiltInToolsInput] No Built-in system tools to be used by the agent.
mcp_server_ids Optional[List[str]] No A list of MCP server IDs to be used by the agent.
native_mcp_server_ids Optional[List[str]] No A list of Native MCP server IDs to be used by the agent.
knowledge_base Optional[List[KnowledgeBaseLocator]] No A list of knowledge bases to be used by the agent.
custom_llm Optional[CustomLlm] No Definition for a custom LLM if LLM field is set to 'CUSTOM_LLM'.
ignore_default_personality Optional[bool] No Whether to remove the default personality lines from the system prompt.
rag Optional[RagConfig] No Configuration for RAG.
timezone Optional[str] No Timezone for displaying current time in system prompt (e.g., 'America/New_York', 'Europe/London', 'UTC').
backup_llm_config Optional[PromptAgentApiModelInputBackupLlmConfig] No Configuration for backup LLM cascading. Can be disabled, use system defaults, or specify custom order.
cascade_timeout_seconds Optional[float] No Time in seconds before cascading to backup LLM. Must be between 2 and 15 seconds.
tools Optional[List[PromptAgentApiModelInputToolsItem]] No A list of tools that the agent can use over the course of the conversation (deprecated, use tool_ids instead).

Usage Examples

Basic Prompt Configuration

from elevenlabs.types import PromptAgentApiModelInput

prompt_config = PromptAgentApiModelInput(
    prompt="You are a helpful customer support agent for Acme Corp.",
    temperature=0.7,
    max_tokens=1024,
)

Advanced Configuration with RAG and Tools

from elevenlabs.types import PromptAgentApiModelInput, RagConfig, BuiltInToolsInput, CustomLlm

prompt_config = PromptAgentApiModelInput(
    prompt="You are a knowledgeable assistant with access to company documentation.",
    temperature=0.5,
    tool_ids=["tool_abc123", "tool_def456"],
    built_in_tools=BuiltInToolsInput(
        end_call=SystemToolConfigInput(enabled=True),
    ),
    rag=RagConfig(
        enabled=True,
        max_documents_length=5000,
    ),
    timezone="America/New_York",
    cascade_timeout_seconds=5.0,
)

Using a Custom LLM

from elevenlabs.types import PromptAgentApiModelInput, CustomLlm

prompt_config = PromptAgentApiModelInput(
    prompt="You are a helpful assistant.",
    custom_llm=CustomLlm(
        url="https://my-llm-endpoint.example.com/v1/chat/completions",
        model_id="my-custom-model",
    ),
)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment