feat(agent): add public_agents (GET /v1/ai/agents) - #565
Open
sunli829 wants to merge 1 commit into
Open
Conversation
List all publicly available Agents on the platform — the Explore catalog. Unlike `agents`, this endpoint is not scoped to a Workspace: it returns every published, publicly-shared Agent. Reuses the existing Agent / AgentsResponse / GetAgentsOptions types (same page/limit/name query and response shape). Added to Rust (async + blocking), Python (sync + async + .pyi), Node.js (+ regenerated index.d.ts), Java (JNI + SdkNative + AgentContext.publicAgents), C (lb_agent_context_public_agents + regenerated header), and C++.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
AgentContext.public_agents— list all publicly available Agents on the platform (the same catalog shown on the Explore page). ImplementsGET /v1/ai/agents, documented in longbridge/developers#1202.Unlike
agents(which lists agents in a Workspace), this endpoint is not scoped to a Workspace: it returns every Agent that is published and publicly shared. The returnedAgent.uidis used as the path parameter ofconversation.API
GET /v1/ai/agentspage(default 1),limit(default 20, max 50),name(fuzzy search) — all optionalAgentsResponse { agents: [Agent], total }— the response shape is identical to workspace agents, so no new types were neededLanguages
Added across every binding:
AgentContext::public_agents(async) + blocking wrapperAgentContext.public_agents/AsyncAgentContext.public_agents(+openapi.pyistubs)AgentContext.publicAgents(+ regeneratedindex.d.ts)AgentContext.publicAgents+SdkNative.agentContextPublicAgents+ JNI impllb_agent_context_public_agents(+ regeneratedlongbridge.h)AgentContext::public_agentsTest plan
cargo buildall crates (Rust/Python/Node.js/Java/C) — passcargo clippy— clean;cargo +nightly fmtnpm run build:debugregeneratesindex.d.tswithpublicAgentslb_agent_context_public_agents; C++-fsyntax-onlyclean🤖 Generated with Claude Code