{"id":6417,"library":"promptflow","title":"Prompt Flow Devkit","description":"Prompt Flow is a development tool designed to streamline the end-to-end development cycle of Large Language Model (LLM)-based AI applications, covering ideation, prototyping, testing, evaluation, and production deployment. It provides a Python SDK and CLI for building, testing, and managing AI workflows. The current version is 1.18.4, with frequent minor releases delivering new features and improvements.","status":"active","version":"1.18.4","language":"en","source_language":"en","source_url":"https://github.com/microsoft/promptflow","tags":["llm","ai","mlops","prompt-engineering","workflow","rag"],"install":[{"cmd":"pip install promptflow","lang":"bash","label":"Install core Prompt Flow SDK"}],"dependencies":[],"imports":[{"note":"Decorator used to define a Python function as a Prompt Flow tool.","symbol":"tool","correct":"from promptflow import tool"},{"note":"Used to establish a connection to Azure OpenAI services within a flow.","symbol":"AzureOpenAIConnection","correct":"from promptflow.connections import AzureOpenAIConnection"},{"note":"The primary client for programmatically interacting with Prompt Flow, managing runs, connections, and flows.","symbol":"PromptFlowClient","correct":"from promptflow.client import PromptFlowClient"}],"quickstart":{"code":"import os\nfrom promptflow import tool\n\n@tool\ndef summarize_text(text: str, max_length: int = 100) -> str:\n    \"\"\"\n    A simple tool that summarizes text by truncating it.\n    In a real Prompt Flow, this might invoke an LLM via a connection.\n    \"\"\"\n    if len(text) <= max_length:\n        return text\n    return text[:max_length-3] + \"...\"\n\n# You can test a tool directly as a Python function:\nlong_text = \"This is a very long piece of text that needs to be summarized. It contains many words and details.\"\nprint(f\"Original: {long_text}\")\nprint(f\"Summarized: {summarize_text(long_text, max_length=30)}\")\n\n# To interact with Prompt Flow programmatically, initialize the client:\n# client = PromptFlowClient(subscription_id=os.environ.get(\"AZURE_SUBSCRIPTION_ID\", \"\"), \n#                          resource_group_name=os.environ.get(\"AZURE_RESOURCE_GROUP_NAME\", \"\"),\n#                          workspace_name=os.environ.get(\"AZURE_WORKSPACE_NAME\", \"\"))\n# You would then use the client to manage flows, connections, and runs.","lang":"python","description":"This quickstart demonstrates how to define a Python function as a Prompt Flow tool using the `@tool` decorator. Tools are the building blocks of Prompt Flow applications. For full flow orchestration and interaction with LLMs via connections, the `PromptFlowClient` or the CLI is typically used."},"warnings":[{"fix":"Upgrade your Python environment to 3.9, 3.10, 3.11, or 3.12.","message":"Prompt Flow versions 1.14.0 and later require Python 3.9 or higher. If you are on an older Python version (e.g., 3.8), you must upgrade your environment before installing or upgrading to `promptflow>=1.14.0`.","severity":"breaking","affected_versions":">=1.14.0"},{"fix":"Review the official Prompt Flow documentation and CHANGELOG for specific migration steps related to connection types you are using. Update connection definitions in YAMLs or Python code accordingly.","message":"Breaking changes were introduced in connection-related classes (`AzureOpenAIConnection`, `OpenAIConnection`, `TestConnection`, `ConnectionProvider`) in versions 1.10.0 and 1.13.0. This might require updates to existing flow YAMLs or Python code that defines or uses connections.","severity":"breaking","affected_versions":"1.10.0, 1.13.0"},{"fix":"Consult the `CHANGELOG.md` before upgrading to understand potential breaking changes. Consider pinning exact versions in production environments and thoroughly testing upgrades.","message":"Prompt Flow is under active and rapid development. While minor version increments often introduce new features, they can also include breaking changes to existing APIs (e.g., client methods, flow definition syntax, tool inputs/outputs). Always review the `CHANGELOG.md` file in the GitHub repository when planning an upgrade, especially across minor versions.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z"}