Skip to content

Docs(Programmatic Control): Added missing agentId, fixed imports and useEffect#4430

Closed
MalaikaAbb wants to merge 2 commits into
CopilotKit:mainfrom
MalaikaAbb:docs(programmatic-control)/improvements-and-fixes
Closed

Docs(Programmatic Control): Added missing agentId, fixed imports and useEffect#4430
MalaikaAbb wants to merge 2 commits into
CopilotKit:mainfrom
MalaikaAbb:docs(programmatic-control)/improvements-and-fixes

Conversation

@MalaikaAbb

Copy link
Copy Markdown
Contributor

Summary

Improved code snippets to add missing dependency in useEffect for Agent Events Subscriber. Also elaborated the use of agentId in case of missing default agent, and fixed accessing of agentId property on agent. Lastly, fixed a wrong import in Run The Agent step.

Changes

  1. Added a note to pass agentId as props to useAgent() hook if the user has initialized a differently named agent because useAgent() searches for 'default' agent if not specificed.
  2. replaced {agent.id} with {agent.agentId} since id does not exist on agent.
  3. Fixed import "@copilotkit/shared/v2" to "@copilotkit/shared" since v2 does not exist in copilotkit/shared package
  4. Addeed [agent] to useEffect dependency array in the 'Subscribing to Agent Events' Section because its required.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@vercel

vercel Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 29, 2026 3:30pm

Request Review

@vercel

vercel Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

@MalaikaAbb is attempting to deploy a commit to the CopilotKit Team on Vercel.

A member of the Team first needs to authorize it.

@copilotkit-qa-bot

Copy link
Copy Markdown

Thanks for the contribution! Mirrored to #4450 (#4450). Closing — we'll take it from here.

@CopilotKit CopilotKit deleted a comment from copilotkit-qa-bot Bot Apr 30, 2026
marthakelly added a commit that referenced this pull request May 11, 2026
…useEffect (mirror of #4430) (#4450)

Mirror of #4430 by @MalaikaAbb.

Adds an agentId note for non-default agents, replaces `agent.id` with
`agent.agentId`, corrects the `@copilotkit/shared/v2` import to
`@copilotkit/shared`, and adds the missing `[agent]` dependency to a
useEffect.
pull Bot pushed a commit to erickirt/CopilotKit that referenced this pull request May 11, 2026
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