Skip to content

fix(get_agent): migrate from deprecated agent query to agents endpoint#340

Merged
NadavAvraham merged 2 commits into
masterfrom
fix/nadavav/agents_endpoint
May 10, 2026
Merged

fix(get_agent): migrate from deprecated agent query to agents endpoint#340
NadavAvraham merged 2 commits into
masterfrom
fix/nadavav/agents_endpoint

Conversation

@NadavAvraham
Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the deprecated agent(id: ID!) GraphQL query with the new agents(ids, limit) endpoint
  • Single-agent fetch now passes ids: [id] and takes the first result from the array
  • List-all fetch passes limit: 100 and surfaces that cap in the response message so the LLM can prompt for a higher limit if needed

Monday Item

https://monday.monday.com/boards/8139440172/pulses/11795649625

Test Plan

  • All 910 existing tests pass
  • Updated unit tests cover: single fetch by id, list with limit, not-found (empty array), variable shapes, versionOverride, error propagation
  • Codegen regenerated with updated dev schema that includes agents(ids: [ID!], limit: Int)

🤖 Generated with Claude Code

Uses agents(ids, limit) instead of the soon-to-be-deprecated agent(id) query.
Single-agent fetch passes ids:[id] and takes the first result; list-all passes
limit:100 and surfaces that cap in the response message.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agent state in get_agent results is one of ACTIVE, INACTIVE, ARCHIVED, or FAILED. DELETED agents are filtered from these queries — DELETED only appears as the return value of delete_agent. Agent kind is one of PERSONAL, ACCOUNT_LEVEL, or EXTERNAL.

Pass id to fetch one specific agent by its unique identifier. Omit id to list every non-deleted personal agent owned by the authenticated user. An empty list means the user owns no agents, which is not an error.
Pass id to fetch one specific agent by its unique identifier. Omit id to list agents owned by the authenticated user (capped at 100 — ask the user for a higher limit if needed). An empty list means the user owns no agents, which is not an error.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I know this is not a best practice of course, but agents do not support pagination still. We will work on adding it and I will update the tool as well

@NadavAvraham NadavAvraham merged commit 754a757 into master May 10, 2026
2 checks passed
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.

2 participants