Skip to content

docs(python): remove legacy v0 SDK references from package READMEs#3283

Open
zen-agent wants to merge 5 commits into
nextfrom
zen/docs-remove-old-sdk-refs-5ov0fp
Open

docs(python): remove legacy v0 SDK references from package READMEs#3283
zen-agent wants to merge 5 commits into
nextfrom
zen/docs-remove-old-sdk-refs-5ov0fp

Conversation

@zen-agent
Copy link
Copy Markdown
Contributor

Description

The Python package READMEs that ship to PyPI were still showing the legacy v0 SDK (composio-core, ComposioToolSet, Action.X / App.X enums, toolset.get_tools(actions=[...])). New users landing on the composio PyPI page or any provider PyPI page were copy-pasting v0 code into v1/v3 projects.

This PR rewrites those READMEs so the entry-point examples match the current SDK pattern (Composio(provider=…) + composio.tools.get(user_id=…, toolkits=[…]) + composio.provider.handle_tool_calls(…)).

Files updated:

  • python/README.md
    • Drop the pip install composio-core alternative and add a one-line note marking it as the legacy SDK.
    • Refresh the provider install list to cover the actual current provider packages (openai, openai-agents, anthropic, claude-agent-sdk, langchain, langgraph, crewai, llamaindex, google, gemini, google-adk, autogen). Each now installs composio alongside the provider.
    • Rewrite the LangChain example to LangchainProvider + composio.tools.get + create_agent, instead of the old ComposioToolSet pattern.
    • Fix from composio.core.provider import OpenAIProviderfrom composio_openai import OpenAIProvider in the configuration snippet (the old import path doesn't exist).
  • python/providers/openai/README.md — rewrite to OpenAIProvider (mention OpenAIResponsesProvider for Responses API).
  • python/providers/anthropic/README.md — fix wrong package name (composio-claudecomposio-anthropic, composio_claudecomposio_anthropic) and rewrite to AnthropicProvider.
  • python/providers/google/README.md — rewrite to GoogleProvider + handle_response. Now correctly points users at composio-gemini for the standalone google-genai SDK.
  • python/providers/gemini/README.md — rewrite to GeminiProvider with string tool slugs (no more Action.GITHUB_… enum).
  • python/providers/langgraph/README.md — rewrite to LanggraphProvider with string tool slugs; model.bind_tools(tools) instead of bind_functions(functions).
  • python/providers/openai_agents/README.md — rewrite to OpenAIAgentsProvider with string tool slugs.

Out of scope (intentionally left alone):

  • docs/content/docs/quickstart.mdx — the composio_core references there sit inside <PromptBanner> "DO NOT use" blocks acting as LLM guardrails. They steer users away from v0, not toward it.
  • docs/content/docs/migration-guide/new-sdk.mdx — the v0 snippets there are intentional "Python (previous)" / "TypeScript (previous)" tabs in a migration guide.
  • docs/content/changelog/*.mdx — historical changelog entries.

How did I test this PR

  • grep -nE "composio-core|composio_core|ComposioToolSet|App\.[A-Z_]+|Action\.[A-Z_]+|toolset\.get_tools|composio-cli" python/README.md python/providers/{openai,anthropic,google,gemini,langgraph,openai_agents}/README.md — only match left is the new "legacy SDK" note in python/README.md.
  • Cross-checked every code example against the canonical demo for that provider in python/providers/<name>/<name>_demo.py so the import paths, class names, and method signatures all match what's actually exported today.
  • Verified each install command corresponds to a real [project] name = … in the matching python/providers/<name>/pyproject.toml.

Rewrites the Python package READMEs that ship to PyPI so new users
land on the current SDK pattern instead of the legacy v0 (`composio-core`,
`ComposioToolSet`, `Action.X`/`App.X` enums) one.

- python/README.md: drop the `pip install composio-core` alternative,
  add a note marking it as legacy, refresh the provider install list,
  rewrite the LangChain example to use `LangchainProvider` +
  `composio.tools.get`, and fix the `OpenAIProvider` import path in
  the configuration snippet.
- python/providers/openai/README.md: rewrite to `OpenAIProvider` +
  `composio.tools.get` + `composio.provider.handle_tool_calls`.
- python/providers/anthropic/README.md: fix wrong package name
  (`composio-claude` -> `composio-anthropic`, `composio_claude` ->
  `composio_anthropic`) and rewrite to `AnthropicProvider`.
- python/providers/google/README.md: rewrite to `GoogleProvider` +
  `handle_response`.
- python/providers/gemini/README.md: rewrite to `GeminiProvider` with
  string tool slugs.
- python/providers/langgraph/README.md: rewrite to `LanggraphProvider`
  with string tool slugs and `bind_tools(tools)`.
- python/providers/openai_agents/README.md: rewrite to
  `OpenAIAgentsProvider` with string tool slugs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Co-authored-by: palash <palash@composio.dev>
@zen-agent zen-agent requested a review from jkomyno as a code owner April 25, 2026 06:30
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 25, 2026 6:46am

Request Review

Codex flagged that the introduced setup commands `composio add github`
and `composio toolkits` are not valid CLI subcommands. The real top-level
command for linking a connected account is `composio link <toolkit>`,
and toolkit discovery only exists under developer mode (`composio dev
toolkits …`). Replace the broken pair with the working `composio link`
command and a parenthetical pointing to the dashboard, so users on the
default (non-dev) CLI mode can follow the quickstarts end-to-end.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Co-authored-by: palash <palash@composio.dev>
- google README: composio.tools.get() already returns a list of
  FunctionDeclaration; wrapping it again in `tools=[tool]` produced a
  nested list. Pass `tools=tools` directly so GenerativeModel receives
  the function declarations at the right depth.
- openai_agents README: revert "Python 3.10+" back to "Python 3.9+" to
  match `python/providers/openai_agents/pyproject.toml` and `setup.py`,
  which still declare `>=3.9`. Documented floor was over-restrictive.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Co-authored-by: palash <palash@composio.dev>
- All provider READMEs: drop the `composio link github` setup step.
  The `composio` CLI is shipped via the TypeScript package only, so
  on a Python-only install it's unavailable and users would hit
  `composio: command not found`. Point readers at the Composio
  dashboard for connecting accounts instead.
- google README: wrap the FunctionDeclaration list returned by
  `composio.tools.get()` in `vertexai.generative_models.Tool` before
  passing to `GenerativeModel(tools=...)`. Vertex AI validates each
  entry as a `Tool`, so the previous snippet would raise
  `TypeError: Unexpected tool type` at model construction.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Co-authored-by: palash <palash@composio.dev>
- python/README.md Configuration block: drop the `from composio_openai
  import OpenAIProvider` line so this generic SDK-config example works
  on a base `pip install composio` install (composio_openai ships in
  the separate `composio-openai` package). OpenAIProvider is the default
  so the constructor still works without it; left a comment pointing to
  the package for users who want to import it explicitly.
- python/README.md provider list: split the merged "Google GenAI /
  Gemini integration" entry into two separate entries because
  `composio-google` is the Vertex AI provider and `composio-gemini` is
  the google-genai provider — installing the wrong one for the example
  you copy-paste produces ModuleNotFoundError.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Co-authored-by: palash <palash@composio.dev>
@zen-agent
Copy link
Copy Markdown
Contributor Author

PR status update

Codex review: 4 iterations, all findings addressed.

  • iter 1: replaced fabricated composio add / composio toolkits CLI commands with the real composio link <toolkit>
  • iter 2: fixed nested-list bug in Google Vertex AI snippet; reverted overly strict Python 3.10+ requirement on openai_agents README to match its declared >=3.9
  • iter 3: removed the composio link github step entirely (the CLI ships only via the npm/TS package, not pip), pointed users at the dashboard; wrapped Vertex AI FunctionDeclarations in Tool(function_declarations=...) as the API requires
  • iter 4: removed composio_openai import from the generic config snippet so it works on a base pip install composio; split the merged composio-google (Vertex AI) vs composio-gemini (google-genai) install entries
  • iter 5: clean

CI: 3/3 checks green at SHA 957db630.

Build checks: ruff check . failed on docs/examples/workplace-search/authorize.py:27 (f"Already connected." — F541 f-string without placeholders). Confirmed pre-existing on origin/next (introduced in a48a23bc7 docs: add workplace search agent cookbook), unrelated to this PR.

Testing: docs-only PR; no unit tests apply. Cross-checked every code example in the modified READMEs against the matching demo file in python/providers/<name>/<name>_demo.py and verified import paths/class names/method signatures match the actual exports. Verified install commands resolve to real [project] name = … entries in each pyproject.toml.

PR comments: no human reviews/comments to address (only Vercel deployment bot).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant