Skip to main content

SAMVAD + LangChain Integration

SAMVAD handles agent-to-agent communication; LangChain handles LLM orchestration. The two complement each other cleanly: expose a LangChain chain as a SAMVAD skill so other agents can call it, or call a remote SAMVAD agent from a LangChain tool.

Expose a LangChain chain as a SAMVAD skill

Install dependencies:
Create an agent that wraps a summarization chain as a public SAMVAD skill:
Run it with tsx summarizer-agent.ts. The SDK generates an Ed25519 keypair on first start and publishes the agent card at /.well-known/agent.json.

Call a SAMVAD agent from a LangChain tool

Install dependencies:
Wrap a remote SAMVAD agent as a LangChain tool and wire it into an agent:

Try it now

Spin up the example agent locally (no cloud setup needed):
Then swap 'http://localhost:3000' in the caller example for 'http://localhost:3002' and call the greet skill: