recipe(voice-agents): agent_ws_client_tools — Atoms Agent WS client-tools sample - #78
Open
abhishekmishragithub wants to merge 1 commit into
Open
recipe(voice-agents): agent_ws_client_tools — Atoms Agent WS client-tools sample#78abhishekmishragithub wants to merge 1 commit into
abhishekmishragithub wants to merge 1 commit into
Conversation
…ools sample Minimal Node.js sample of the client-tools protocol on wss://api.smallest.ai/atoms/v1/agent/connect (session.update, function_call, function_call.result, plus the error codes: tool_name_conflict, client_tools_managed_by_config, invalid_tools, tool_timeout, unknown_call_id, result_too_large). Ships with a runnable index.mjs, README with the message-flow diagram, and an AGENTS.md so a coding agent can extend the sample without extra prompting. Requires Node 18+. Verified live end-to-end: register-call mints wct_ token, WSS handshake, session.update sends 1 tool, server ACKs session.updated with the accepted tool name. Paired doc PR: smallest-inc/smallest-ai-documentation#337 / #378.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
New voice-agents cookbook: minimal Node.js sample of the client-tools protocol on the Atoms Agent WebSocket (`wss://api.smallest.ai/atoms/v1/agent/connect`). Pairs with the docs shipped in smallest-ai-documentation#378 (originally #337) so the protocol has a working end-to-end reference on the customer side.
What's in it
Verified live
Ran against `api.smallest.ai` with a real API key + agent id:
```
opening wss://api.smallest.ai/atoms/v1/agent/connect?token=wct_...
ws open
session.created call_id=CALL-1787313848478-e9cb30 sr=24000
session.updated accepted=["lookup_order"]
```
Full `function_call → function_call.result` handling is in the code path; not exercised in the smoke test because that requires the caller to actually ask the agent to call the tool (mic audio or text). Unit-test the `runTool` branch in isolation.
Test plan