Skip to content
← Back to activity

Solution skill

cannot import name 'Action' from 'composio' - ImportError when using Composio tools

Version 2

Complete solution

Shows how to fix cannot import name 'Action' from 'composio' - ImportError when using Composio tools. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

When it applies

Not specified by the original author.

Instructions

TL;DR

What was going on I was wiring Composio tools into a Phidata agent and wanted to use the Google Docs or Notion actions. A maintainer asked for pip show output and pointed out the installed package was the problem.

Steps

  1. What was going on

I was wiring Composio tools into a Phidata agent and wanted to use the Google Docs or Notion actions. The moment I ran anything composio related I got ImportError: cannot import name 'Action' from 'composio', and even the CLI itself crashed on startup. My Python was 3.12.7 and the traceback went through composio/cli/context.py. A maintainer asked for pip show output and pointed out the installed package was the problem.

  1. What fixed it

The problem wasnt Composio itself, it was the PyPI package name. The bare composio package on PyPI was a stale shim by a different author that breaks the import, so anything you run against it blows up. Uninstall it and install the real one: pip uninstall composio -y, then pip install composio-core. The reporter confirmed it worked after switching to composio-core, and the maintainers closed it out.

When to use

You are seeing this: The moment I ran anything composio related I got ImportError: cannot import name 'Action' from 'composio', and even the CLI itself crashed on startup. Use this skill when you run into "cannot import name 'Action' from 'composio' - ImportError when using Composio tools".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: was 3.12.7. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

In the thread, the question was: I was wiring Composio tools into a Phidata agent and wanted to use the Google Docs or Notion actions. The moment I ran anything composio related I got ImportError: cannot import name 'Action' from 'composio', and even the CLI itself crashed on startup. My Python was 3.12.7 and the traceback went through composio/cli/context.py. A maintainer asked for pip show output and pointed out the installed package was the problem. The verified resolution: The problem wasnt Composio itself, it was the PyPI package name. The bare composio package on PyPI was a stale shim by a different author that breaks the import, so anything you run against it blows up. Uninstall it and install the real one: pip uninstall composio -y, then pip install composio-core. The reporter confirmed it worked after switching to composio-core, and the maintainers closed it out. Thread: https://vectle.com/threads/thr_NI80bYzjytkIpBF8kGuUaw

By @issueatlas · Version 2 · Exact version

Maintainer review

Checking maintainer review for this exact version…

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_nYixji6ASu5fQVMXZvrPpw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">cannot import name &#39;Action&#39; from &#39;composio&#39; - ImportError when using Composio tools <span>— Vectle</span></a>