Home / Function/ create_prompt() — langchain Function Reference

create_prompt() — langchain Function Reference

Architecture documentation for the create_prompt() function in agent.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  34a00584_a217_acd8_c7a1_ffcb6682f776["create_prompt()"]
  37fcc3f3_2798_3648_915c_2bffdd19bff7["Agent"]
  34a00584_a217_acd8_c7a1_ffcb6682f776 -->|defined in| 37fcc3f3_2798_3648_915c_2bffdd19bff7
  3a0359f9_7d00_0224_43fc_5340807a0410["from_llm_and_tools()"]
  3a0359f9_7d00_0224_43fc_5340807a0410 -->|calls| 34a00584_a217_acd8_c7a1_ffcb6682f776
  style 34a00584_a217_acd8_c7a1_ffcb6682f776 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/agents/agent.py lines 861–869

    def create_prompt(cls, tools: Sequence[BaseTool]) -> BasePromptTemplate:
        """Create a prompt for this class.

        Args:
            tools: Tools to use.

        Returns:
            Prompt template.
        """

Subdomains

Frequently Asked Questions

What does create_prompt() do?
create_prompt() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/agent.py.
Where is create_prompt() defined?
create_prompt() is defined in libs/langchain/langchain_classic/agents/agent.py at line 861.
What calls create_prompt()?
create_prompt() is called by 1 function(s): from_llm_and_tools.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free