feat(nodejs-langgraph-agent): LangGraph ReAct agent with Dynamic server-side MPC wallet - #65
Open
avneesh0612 wants to merge 2 commits into
Open
feat(nodejs-langgraph-agent): LangGraph ReAct agent with Dynamic server-side MPC wallet#65avneesh0612 wants to merge 2 commits into
avneesh0612 wants to merge 2 commits into
Conversation
… delegated MPC wallet A minimal LangGraph ReAct agent (Claude Haiku 4.5) that acts on a user's wallet through a Dynamic delegated MPC wallet — no private keys held by the agent. Trimmed down from the full langgraph-dynamic-agent (drops Polymarket, LI.FI, voice). Tools: - list_wallets — returns the delegated wallet address - get_token_balances — Dynamic multi-chain balances API (optional USD prices) - send_transaction — native transfer signed via Dynamic MPC, gated behind a y/N confirm prompt Matches the repo's nodejs-* conventions (pnpm + tsx, dotenv, exact-pinned deps, .example.env). Only .example.env (placeholders) is tracked; real .env is gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Deployment failed with the following error: |
…op delegation + user JWT - Replace delegated MPC wallet with DynamicEvmWalletClient server wallet; agent creates and owns its wallet on first run, persisted to .wallet-state.json (0o600, gitignored) — no user JWT or delegation credentials required - get_token_balances now queries native balances on-chain via viem instead of the Dynamic balances API (which needed a user JWT) - Migrate from deprecated createReactAgent (@langchain/langgraph/prebuilt) to createAgent from langchain@1.4.1 (llm→model, checkpointSaver→checkpointer, stateModifier→systemPrompt) - Trim .example.env to just ANTHROPIC_API_KEY + DYNAMIC_ENVIRONMENT_ID + DYNAMIC_API_KEY Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
What
A minimal LangGraph ReAct agent (Claude Haiku 4.5) that acts through its own Dynamic server-side MPC wallet. The agent creates and owns its wallet entirely server-side — no user JWT, no delegation, no client-side approval flow required. On first run, a new MPC wallet is created and persisted to `.wallet-state.json`; subsequent runs reuse it.
Tools
list_walletsget_token_balancessend_transactiony/Nconfirm prompt.Layout
Notes
nodejs-*conventions: pnpm +tsx,dotenv, exact-pinned dependencies,.example.env..example.env(placeholders) is tracked; real.envand.wallet-state.jsonare gitignored.pnpm typecheckpasses; runtime startup verified (creates/loads the server wallet, then runs the REPL).Security considerations
.env*and.wallet-state.jsonare gitignored, only placeholder.example.envis tracked..wallet-state.jsoncontains the server key share (written with0o600permissions) — treated like a private key.send_transactionrequires explicity/Nuser confirmation before broadcasting.🤖 Generated with Claude Code