Skip to content

[codex] Add connector package prototype#3436

Draft
dannyzhang-oai wants to merge 5 commits into
mainfrom
codex/agent-sdk-connector-package-prototype
Draft

[codex] Add connector package prototype#3436
dannyzhang-oai wants to merge 5 commits into
mainfrom
codex/agent-sdk-connector-package-prototype

Conversation

@dannyzhang-oai
Copy link
Copy Markdown

@dannyzhang-oai dannyzhang-oai commented May 16, 2026

Summary

Adds an initial Agents SDK connector package prototype that composes existing SDK primitives instead of introducing a separate runtime.

  • Adds Connector, ConnectorComponents, ConnectorPlugin, ConnectorRegistry, connector policy labels, and HostedConnectorAuthorization.
  • Allows Agent(connectors=[...]) to include connector-provided direct tools and MCP servers in the existing tool resolution path.
  • Adds package loading for shared Codex plugin-style bundles via .codex-plugin/plugin.json, .mcp.json, and optional .app.json hosted connector IDs.
  • Adds ConnectorRegistry.from_plugin_records(...) and Connector.from_installed_plugin(...) as a narrow adapter for already-fetched Unified Plugins-style records.
  • Hardens installed plugin records with mounted package paths under package_root, auth aliases/refs, app-level server labels, allowed tools, approval/deferred-loading options, and policy label metadata.
  • Keeps marketplace install, cloud sync, workspace sharing, admin policy, and package discovery outside the SDK runtime for now.
  • Updates examples/connectors/package_demo.py to verify the registry path end to end without an API key, including auth alias resolution, mounted package paths, policy labels, and hosted tool options.
  • Preserves existing positional Agent(...) constructor compatibility by appending the new connectors field.
  • Adds English docs/API reference coverage for connectors and installed plugin registries.

Test plan

  • uv run --frozen pytest tests/test_connectors.py tests/test_connector_demo.py tests/test_source_compat_constructors.py::test_agent_connectors_append_preserves_reset_tool_choice_position -q
  • uv run --frozen python examples/connectors/package_demo.py --verify
  • uv run --frozen ruff format --check src/agents/connectors.py src/agents/agent.py src/agents/__init__.py examples/connectors/package_demo.py tests/test_connectors.py tests/test_connector_demo.py tests/test_source_compat_constructors.py
  • uv run --frozen ruff check src/agents/connectors.py src/agents/agent.py src/agents/__init__.py examples/connectors/package_demo.py tests/test_connectors.py tests/test_connector_demo.py tests/test_source_compat_constructors.py
  • uv run --frozen mypy src/agents/connectors.py src/agents/agent.py tests/test_connectors.py tests/test_connector_demo.py tests/test_source_compat_constructors.py
  • uv run --frozen pyright src/agents/connectors.py src/agents/agent.py tests/test_connectors.py tests/test_connector_demo.py tests/test_source_compat_constructors.py
  • uv run --frozen mkdocs build

mkdocs build still emits the repo's existing localized-doc/autoref warnings, but exits 0. Full make tests, make lint, and make format were not run; this is focused prototype validation.

Issue number

N/A

Checks

  • I've added new tests
  • I've added/updated the relevant documentation
  • I've run make lint and make format
  • I've made sure tests pass

@dannyzhang-oai dannyzhang-oai force-pushed the codex/agent-sdk-connector-package-prototype branch from eb6aa95 to 67694d2 Compare May 19, 2026 02:13
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