LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    Standard Tests
    Text Splitters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    Standard Tests
    Text Splitters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Language
    Theme
    Pythonlangchain-classicagentsmrklbaseZeroShotAgentcreate_prompt
    Methodā—Since v1.0

    create_prompt

    Copy
    create_prompt(
      cls,
      tools: Sequence[BaseTool],
      prefix: str = PREFIX
    View source on GitHub
    ,
    suffix
    :
    str
    =
    SUFFIX
    ,
    format_instructions
    :
    str
    =
    FORMAT_INSTRUCTIONS
    ,
    input_variables
    :
    list
    [
    str
    ]
    |
    None
    =
    None
    )
    ->
    PromptTemplate

    Parameters

    NameTypeDescription
    tools*Sequence[BaseTool]

    List of tools the agent will have access to, used to format the prompt.

    prefixstr
    Default:PREFIX

    String to put before the list of tools.

    suffixstr
    Default:SUFFIX

    String to put after the list of tools.

    format_instructionsstr
    Default:FORMAT_INSTRUCTIONS
    input_variableslist[str] | None
    Default:None

    Create prompt in the style of the zero shot agent.

    Instructions on how to use the tools.

    List of input variables the final prompt will expect.