Skip to content

chore(appkit): remove deprecated agent() plugin and createAgentApp shortcut#299

Closed
MarioCadenas wants to merge 1 commit intoagent/5f-from-plugin-apifrom
agent/5g-retire-deprecated-agent
Closed

chore(appkit): remove deprecated agent() plugin and createAgentApp shortcut#299
MarioCadenas wants to merge 1 commit intoagent/5f-from-plugin-apifrom
agent/5g-retire-deprecated-agent

Conversation

@MarioCadenas
Copy link
Copy Markdown
Collaborator

@MarioCadenas MarioCadenas commented Apr 21, 2026

Summary

Pure dead-code removal. With agents() + createAgent(def) + fromPlugin now covering every use case previously served by the transitional agent() plugin and createAgentApp shortcut, the deprecated surface is removed entirely.

Removed

  • packages/appkit/src/plugins/agent/ — entire folder (agent.ts, config-loader.ts, types.ts, manifest.json, tests/)
  • packages/appkit/src/core/create-agent.ts — the old createAgent app-shortcut. Superseded by packages/appkit/src/core/create-agent-def.ts (pure factory) combined with agents()
  • packages/appkit/src/core/tests/create-agent.test.ts — tests for the removed shortcut
  • docs/docs/api/appkit/Function.createAgentApp.md — stale generated API doc
  • agent and createAgentApp exports from packages/appkit/src/index.ts, and the ./agent re-export from packages/appkit/src/plugins/index.ts

Docs

The migration guide's "Gradual migration" and "Removal timeline" sections are dropped — they described a coexistence window that no longer exists. The "Name changes at a glance" table now points at the final shape instead of the deprecated alias.

Net change

−1,761 lines. No runtime behavior change for anyone on the new API. Anyone still importing agent or createAgentApp will see a clear module-not-found error pointing at the new exports.

PR Stack

  1. Shared types + Adapters — feat(appkit): add shared agent types and LLM adapter implementations #282
  2. Tool types + MCP client — feat(appkit): add FunctionTool, HostedTool types and MCP client #283
  3. Agent plugin core + ToolProvider implementations — feat(appkit): add agent plugin core and ToolProvider implementations #284
  4. PluginContext mediator — feat(appkit): add PluginContext mediator for inter-plugin communication #285
  5. createAgent + agent-app + docs (v1) — feat(appkit): add createAgent wrapper, agent-app, and API docs #286
  6. Plugin context-binding separation — refactor(appkit): separate plugin context binding from plugin construction #293
  7. agents() plugin + createAgent(def) + .toolkit()feat(appkit): add agents() plugin, createAgent() factory, and .toolkit() #294
  8. agent-app + docs migrated to agents()feat(appkit): migrate agent-app and docs to the new agents() plugin #295
  9. Relocate shared agent utilities — refactor(appkit): relocate shared agent utilities into plugins/agents #296
  10. preparePlugins forwards eager instance — refactor(appkit): forward eager plugin instance through preparePlugins #297
  11. fromPlugin() API — feat(appkit): add fromPlugin() for referencing plugin tools in code-defined agents #298
  12. Retire deprecated agent() + createAgentApp (this PR)
  13. Retire toPluginWithInstance + bug fixes — refactor(appkit): retire toPluginWithInstance; consolidate on fromPlugin + fix schema/routing bugs #300

Test plan

  • Full vitest suite passing (1,287 tests, down from 1,317 — delta is tests for deleted deprecated code)
  • Typecheck clean
  • Build clean

…ortcut

The `agents()` plugin + `createAgent()` pure factory + `createApp` shape
is the canonical public API. The transitional `agent()` plugin and the
`createAgentApp` shortcut (renamed-old-createAgent) existed to give
callers a migration window; they've been replaced in every in-tree
consumer by the new API.

Removes:

- `packages/appkit/src/plugins/agent/` — entire folder (agent.ts,
  config-loader.ts, types.ts, manifest.json, tests/).
- `packages/appkit/src/core/create-agent.ts` — the app-shortcut variant.
  Superseded by `packages/appkit/src/core/create-agent-def.ts` (pure
  factory) combined with `agents()`.
- `packages/appkit/src/core/tests/create-agent.test.ts` — tests for the
  removed shortcut.
- `docs/docs/api/appkit/Function.createAgentApp.md` — stale generated
  API doc.
- `agent` and `createAgentApp` exports from
  `packages/appkit/src/index.ts`, and the `./agent` re-export from
  `packages/appkit/src/plugins/index.ts`.

Docs: the migration guide's "Gradual migration" and "Removal timeline"
sections are dropped — they described a coexistence window that no
longer exists. The "Name changes at a glance" table now points at the
final shape instead of the deprecated alias.

No runtime behavior change; callers that were still using the deprecated
exports will see a clear import error directing them to the new API.

Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
@MarioCadenas
Copy link
Copy Markdown
Collaborator Author

Superseded by the v2 6-PR stack:

  1. Shared agent types + LLM adapters — feat(appkit): shared agent types and LLM adapter implementations #301
  2. Tool primitives + ToolProvider surfaces — feat(appkit): tool primitives and ToolProvider surfaces on core plugins #302
  3. Plugin infrastructure (attachContext + PluginContext) — feat(appkit): plugin infrastructure — attachContext + PluginContext mediator #303
  4. agents() plugin + createAgent(def) + markdown-driven agents — feat(appkit): agents() plugin, createAgent(def), and markdown-driven agents #304
  5. fromPlugin() DX + runAgent plugins arg + toolkit-resolver — feat(appkit): fromPlugin() DX, runAgent plugins arg, shared toolkit-resolver #305
  6. Reference app + dev-playground + docs — feat(appkit): reference agent-app, dev-playground chat UI, docs, and template #306

The v2 stack reorganizes the same work so no PR ships API that a later PR deletes. Start at #301 for the new entry point. Branches from this older stack are preserved unchanged.

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