Skip to content

feat: optional agent_id in chat + agents.list()#6

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

feat: optional agent_id in chat + agents.list()#6
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 agent_id. 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.

Changes

  • chat.send / chat.stream: agent_id 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. A zero- or multi-agent result raises RalioConfigError rather than guessing.
  • Add client.agents.list() and the exported Agent type.
  • README note + examples updated; CHANGELOG updated (rolls into the initial release).

Verification

ruff check ., mypy, and pytest -q all pass.

🤖 Generated with Claude Code

@lgrosales lgrosales force-pushed the feat/sdk-resolve-agent-id branch from 9e94a81 to 3c2e687 Compare June 2, 2026 13:02
chat.send / chat.stream now accept calls without agent_id. When omitted,
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. A zero- or multi-agent
result raises RalioConfigError rather than guessing.

CHANGELOG updated, README note + examples updated, tests added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lgrosales lgrosales force-pushed the feat/sdk-resolve-agent-id branch from 3c2e687 to 48a3c05 Compare June 2, 2026 13:05
@lgrosales lgrosales merged commit b199d73 into main Jun 2, 2026
7 checks passed
@lgrosales lgrosales deleted the feat/sdk-resolve-agent-id branch June 2, 2026 13:06
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