Skip to content
All agent resources

Work with Prefect from your agent

Inspect runs through MCP, use the CLI from your project, and look up current Prefect documentation.

Get started

  1. Connect your workspace

    Choose an agent guide for plugin or MCP setup. Hosted connections use Prefect Cloud sign-in; local MCP servers use your own Prefect configuration.

    Choose an agent
  2. Use the CLI for project work

    A coding agent can use the Prefect CLI in your development environment. Unlike the read-only MCP tools, CLI commands can change your workspace. Review commands that deploy, run, or delete resources.

    CLI setup for agents
  3. Prefect skills

    The public skills repository is coming soon. Installation instructions will be added here when it is available.

Investigate a run

Paste this into your agent after connecting.

Use Prefect to investigate the most recent failed flow run in my chosen workspace. Read its task runs and logs, cite the run and relevant errors, and explain what I should check before retrying. Do not retry or change anything.

Documentation & source

MCP setup and authenticationPlugins and MCP sourceInstall Prefect

Investigate a failed Prefect run.

Ask your agent to inspect a Prefect flow run. It can read task states and logs to help you understand the failure.

Prefect · example investigationorders-sync
1 of 3

Illustrative walkthrough with sample data. No live workspace is connected to this page.