Skip to content

feat: add lyzr-tools plugin bridging Lyzr-authorized tools into GitAgent#78

Open
akshatkumar2808 wants to merge 1 commit into
open-gitagent:mainfrom
akshatkumar2808:feat/lyzr-tools-bridge
Open

feat: add lyzr-tools plugin bridging Lyzr-authorized tools into GitAgent#78
akshatkumar2808 wants to merge 1 commit into
open-gitagent:mainfrom
akshatkumar2808:feat/lyzr-tools-bridge

Conversation

@akshatkumar2808

Copy link
Copy Markdown

Summary

  • Adds a lyzr-tools plugin that discovers Lyzr-authorized tools (Gmail, Slack, MCP servers) and proxies execution through Lyzr instead of requiring separate local credentials
  • Registers discovered tools as lyzr_-prefixed GitAgent tools; unauthorized tools return a structured authorization_required result instead of prompting for local credentials
  • Redacts secrets from tool result details; adds prompt guidance preferring lyzr_* tools over local duplicate skills
  • Enabled by default in agent.yaml; no-ops with a warning if LYZR_API_KEY isn't set (no network call without a key)

See docs/lyzr-tool-auth-rca.md for the RCA/design and docs/lyzr-tool-bridge-test-cases.md for the acceptance criteria this targets.

Test plan

  • npm run build && npm test — 59/59 passing (32 new in test/lyzr-tools.test.ts, no real network calls)
  • Verified end-to-end through the real plugin loader (not just mocks): no-API-key no-op path, and full discovery→register→execute cycle against a local HTTP stub

GitAgent's LYZR_API_KEY was only wired into the model path, so users with
Gmail/Slack/etc. already authorized in Lyzr still had to configure separate
local credentials (e.g. local Gmail SMTP app passwords) for tool execution.

Adds a lyzr-tools plugin that:
- Discovers authorized provider actions (GET /v3/providers/tools/actions/*)
  and MCP server tools (/v3/tools/mcp/servers*), cross-referenced against
  connected-account status (/v3/tools/credentials/connected_accounts).
- Registers each as a lyzr_-prefixed gitagent tool, avoiding collisions
  with local skills by construction.
- Proxies execution through /v3/inference/tools/execute or
  /v3/tools/mcp/tools/execute, normalizing results into success /
  authorization_required / error, with secret redaction on all details.
- Adds prompt guidance preferring lyzr_ tools over local duplicates
  (e.g. the bundled gmail-email skill) when both exist.

Enabled by default in agent.yaml; no-ops with a single warning if
LYZR_API_KEY isn't set, so it never makes a network call without a key.

See docs/lyzr-tool-auth-rca.md for the RCA and design this implements, and
docs/lyzr-tool-bridge-test-cases.md for the acceptance criteria covered by
test/lyzr-tools.test.ts (32 tests, no real network calls).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.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.

1 participant