From 041953c1d52ff701ffaba483734c26d51d87c411 Mon Sep 17 00:00:00 2001 From: Deepak Date: Fri, 27 Dec 2024 17:45:28 +0530 Subject: [PATCH] Added documentation --- README.md | 17 +++++++++++++++++ examples/agent-kit-langgraph/README.md | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6aa9d99..33685e0 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,23 @@ const price = await agent.pythFetchPrice( console.log("Price in BTC/USD:", price); ``` +## Examples + +### LangGraph Multi-Agent System + +The repository includes an advanced example of building a multi-agent system using LangGraph and Solana Agent Kit. Located in `examples/agent-kit-langgraph`, this example demonstrates: + +- Multi-agent architecture using LangGraph's StateGraph +- Specialized agents for different tasks: + - General purpose agent for basic queries + - Transfer/Swap agent for transaction operations + - Read agent for blockchain data queries + - Manager agent for routing and orchestration +- Fully typed TypeScript implementation +- Environment-based configuration + +Check out the [LangGraph example](examples/agent-kit-langgraph) for a complete implementation of an advanced Solana agent system. + ## Dependencies The toolkit relies on several key Solana and Metaplex libraries: diff --git a/examples/agent-kit-langgraph/README.md b/examples/agent-kit-langgraph/README.md index cd4ea37..6bf7836 100644 --- a/examples/agent-kit-langgraph/README.md +++ b/examples/agent-kit-langgraph/README.md @@ -6,7 +6,7 @@ This example demonstrates how to build an advanced Solana agent using LangGraph - Multi-agent architecture using LangGraph's StateGraph - Specialized agents for different tasks: - - General purpose agent for basic queries + - General purpose agent for basic queries (with optional Tavily search integration) - Transfer/Swap agent for transaction operations - Read agent for blockchain data queries - Manager agent for routing and orchestration @@ -38,6 +38,7 @@ cp .env.example .env Edit the `.env` file with your configuration: - Add your OpenAI API key +- Add your Tavily API key (optional, enables web search capabilities) - Configure any other required environment variables ## Project Structure @@ -69,6 +70,7 @@ The example demonstrates a workflow where: ## Dependencies - `@langchain/community`: LangChain community tools and utilities + - Includes Tavily search integration for enhanced query responses - `@langchain/core`: Core LangChain functionality - `@langchain/langgraph`: Graph-based agent workflows - `solana-agent-kit`: Solana Agent Kit for blockchain interactions