Skip to content

feat(agent): add public_agents (GET /v1/ai/agents) - #565

Open
sunli829 wants to merge 1 commit into
mainfrom
feat/public-agents
Open

feat(agent): add public_agents (GET /v1/ai/agents)#565
sunli829 wants to merge 1 commit into
mainfrom
feat/public-agents

Conversation

@sunli829

Copy link
Copy Markdown
Collaborator

Summary

Add AgentContext.public_agents — list all publicly available Agents on the platform (the same catalog shown on the Explore page). Implements GET /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 returned Agent.uid is used as the path parameter of conversation.

API

  • Method: GET /v1/ai/agents
  • Query: page (default 1), limit (default 20, max 50), name (fuzzy search) — all optional
  • Response: reuses the existing AgentsResponse { agents: [Agent], total } — the response shape is identical to workspace agents, so no new types were needed

Languages

Added across every binding:

  • Rust: AgentContext::public_agents (async) + blocking wrapper
  • Python: AgentContext.public_agents / AsyncAgentContext.public_agents (+ openapi.pyi stubs)
  • Node.js: AgentContext.publicAgents (+ regenerated index.d.ts)
  • Java: AgentContext.publicAgents + SdkNative.agentContextPublicAgents + JNI impl
  • C: lb_agent_context_public_agents (+ regenerated longbridge.h)
  • C++: AgentContext::public_agents

Test plan

  • cargo build all crates (Rust/Python/Node.js/Java/C) — pass
  • cargo clippy — clean; cargo +nightly fmt
  • Node.js npm run build:debug regenerates index.d.ts with publicAgents
  • C header regenerated with lb_agent_context_public_agents; C++ -fsyntax-only clean

🤖 Generated with Claude Code

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++.
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