Added documentation

This commit is contained in:
Deepak
2024-12-27 17:45:28 +05:30
parent a537716d99
commit 041953c1d5
2 changed files with 20 additions and 1 deletions

View File

@@ -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:

View File

@@ -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