Skip to content

feat: optional agentId in chat + agents.list() (v0.1.2)#9

Merged
lgrosales merged 1 commit into
mainfrom
feat/sdk-resolve-agent-id
Jun 2, 2026
Merged

feat: optional agentId in chat + agents.list() (v0.1.2)#9
lgrosales merged 1 commit into
mainfrom
feat/sdk-resolve-agent-id

Conversation

@lgrosales
Copy link
Copy Markdown
Contributor

@lgrosales lgrosales commented Jun 2, 2026

Summary

chat.send / chat.stream no longer require an agentId. When omitted, the SDK resolves the single agent the credential is bound to and caches it, so the common single-agent case needs no agent ID. register() returns the credential handle only (no agent ID), so this removes a frequent point of confusion.

Changes

  • chat.send / chat.stream: agentId is now optional. When omitted, the SDK lists the caller's agents (GET /api/agents, which returns only the bound agent for a credential caller), uses the single result, and caches it. Pass agentId explicitly to target a specific agent, or when the credential can reach more than one (a multi-agent result throws RalioConfigError rather than guessing).
  • Add client.agents.list() and the exported Agent type.
  • README note + examples updated; 0.1.1 -> 0.1.2; CHANGELOG entry.
  • New tests (parse, auto-resolve, caching, multi-agent error). lint / typecheck / test / build all pass.

🤖 Generated with Claude Code

chat.send / chat.stream now accept calls without an agentId: the SDK
resolves the single agent the credential is bound to via GET /api/agents
(which returns only the bound agent for a credential caller) and caches
it. register() returns the credential handle only, so callers no longer
need an agent id for the common single-agent case.

Add client.agents.list() and the Agent type. Pass agentId explicitly to
target a specific agent, or when the credential can reach more than one
(a multi-agent result throws RalioConfigError rather than guessing).

Bump to 0.1.2; update README note + examples; add tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lgrosales lgrosales force-pushed the feat/sdk-resolve-agent-id branch from 5ac72a4 to 564db69 Compare June 2, 2026 13:04
@lgrosales lgrosales merged commit 1ec0c7e into main Jun 2, 2026
5 checks passed
@lgrosales lgrosales deleted the feat/sdk-resolve-agent-id branch June 2, 2026 13:07
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