Skip to content

feat: add chat & search adapters#13

Open
kantorcodes wants to merge 12 commits intoagent0lab:mainfrom
kantorcodes:feat/agent-chat
Open

feat: add chat & search adapters#13
kantorcodes wants to merge 12 commits intoagent0lab:mainfrom
kantorcodes:feat/agent-chat

Conversation

@kantorcodes
Copy link

@kantorcodes kantorcodes commented Nov 23, 2025

Summary

  • Adds a first-class adapter pattern to agent0-sdk for agent discovery (search/vector search) and agent communication (chat), so teams can plug in different backends behind a stable SDK
    API.
  • Provides an optional Registry + Broker adapter package under agent0-sdk/registry-broker (powered by @hol-org/rb-client) for ERC‑8004 discovery + broker-managed UAID chat sessions.
  • Includes a runnable example (agent0-ts/examples/broker-chat.ts) and an integration test (agent0-ts/tests/registry-broker-erc8004.test.ts) exercising the adapter integration end-to-end.

Value

  • Improves DX: register adapters once, then call sdk.search(...), sdk.vectorSearch(...), and sdk.chat(...) consistently (with optional explicit adapter IDs when multiple are registered).
  • Keeps the SDK extensible: projects can use the provided Registry + Broker adapters or implement their own adapters for other registries/brokers.

How to try

  • Demo: REGISTRY_BROKER_API_KEY=... npx tsx examples/broker-chat.ts (defaults to https://hol.org/registry/api/v1)
  • Tests: REGISTRY_BROKER_BASE_URL=... npm test -- --testPathPattern=registry-broker (set ERC8004_AGENT_UAID=... to enable the live chat test)

Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
@rickycambrian
Copy link
Contributor

rickycambrian commented Nov 28, 2025

@kantorcodes worked for me but not right off the bat, left some notes here on some points, but it did work for me ✅
PR_fixes.md

Intuitively I feel like there should be a more decentralized and direct way to do this that doesn't require a broker in between, but also think options are always good to have

Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
@kantorcodes
Copy link
Author

@kantorcodes worked for me but not right off the bat, left some notes here on some points, but it did work for me ✅ PR_fixes.md

Intuitively I feel like there should be a more decentralized and direct way to do this that doesn't require a broker in between, but also think options are always good to have

Thanks for reviewing this work. Should be good for another pass.

@rickycambrian
Copy link
Contributor

@kantorcodes all looks good to me 👍

Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
@kantorcodes kantorcodes changed the title feat: add agent chat feat: add chat & search adapters Dec 30, 2025
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
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.

2 participants