Commit Graph

39 Commits

Author SHA1 Message Date
aryan
87db99a996 Implement Discord bot starter template (#129)
# Pull Request Description

## Changes Made
This PR introduces a starter template example project for creating a
Discord Bot built to interact with the user and perform actions using
the Solana Agent Kit.

## Implementation Details
The bot uses the latest version of discord.js and has an ability to
process DMs on Discord, perform actions using the agent kit and reply
back to the user.

[Link to demo
video](https://bafybeidjub6alzloxx2on5df6j5dhfse7txemivcbjohxzlqkxuz5ymqlm.ipfs.web3approved.com/?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaWQiOiJiYWZ5YmVpZGp1YjZhbHpsb3h4Mm9uNWRmNmo1ZGhmc2U3dHhlbWl2Y2Jqb2h4emxxa3h1ejV5bXFsbSIsInByb2plY3RfdXVpZCI6IjRlOTEzNjIzLTI0N2ItNDAwMC1iNjUwLTgyNzI0MzBhMzk3MCIsImlhdCI6MTczNTk4Njc5Niwic3ViIjoiSVBGUy10b2tlbiJ9.vF6R99GnycpALTbPPmVJUXWvqXHYGkhfBIMaF1wVvkk)

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
- [x] I have added a transaction link
- [x] I have added the prompt used to test it
2025-01-12 14:32:55 +05:30
aryan
8e2fe87c1c Added advanced telegram bot examples (#193)
# Pull Request Description

## Related Issue
Fixes #192 

## Changes Made
This PR adds the following changes:

Now we have the below detailed examples in the tg bot examples:

1. **Basic TG Bot**: This guide explains how to run a simple Solana
Agent Kit on a Telegram bot for a single user.

2. **Advanced TG Bot**: This guide includes advanced features such as:
    - Storing chat history for each user in a PostgreSQL database.
    - Maintaining a unique wallet for each user in a Firebase database.
    - Managing the chats of multiple users simultaneously.

3. **Group TG Bot**: This example demonstrates how to create a Telegram
bot using the Solana Agent Kit by Send AI. It includes advanced features
such as:
    - Storing chat history for each user in a PostgreSQL database.
    - Maintaining a unique wallet for each user in a Firebase database.
- This special bot can be run in Telegram groups and handle private
conversations, such as wallet addresses, in private chats. It works in
groups, maintains a separate context for each user, responds to each
user by tagging them, and can handle multiple requests simultaneously.
It will only reply if the bot is tagged in the group or its message is
replied to.

## Checklist
- [ x ] I have tested these changes locally
2025-01-12 02:56:46 +05:30
Arihant Bansal
338cc410ea feat: move to tsx 2025-01-12 00:16:13 +05:30
Arpit Singh Bhatia
14d4d468bb Minor changes 2025-01-11 23:50:21 +05:30
Damjan Dimitrov
793330b0a1 Merge branch 'main' into main 2025-01-10 11:35:22 +01:00
biccsdev
b3555ebded test 2025-01-06 21:39:31 -06:00
DonDuala
f03f5dd3ff Move mm agent to examples 2025-01-06 12:35:52 -04:00
Damjan
a6856409bc Add user chat history memory store 2025-01-04 11:14:21 +01:00
Damjan
e3a303d67a Implement Discord bot starter template 2025-01-04 10:52:34 +01:00
michaelessiet
c2bf6191ff fix: lint 2025-01-03 18:22:32 +01:00
teenager-ETH
f1c5213742 typo fix Update README.md 2025-01-02 19:46:36 +01:00
aryan
e17e2138c4 Feat: add langchain nextjs template (#68)
## Related Issue
Fixes #58 

## Changes Made
This PR adds the following changes:
<!-- List the key changes made in this PR -->
- I added an examples directory with a README file which can be used to
list templates, projects and examples built by the team and community
  
## Implementation Details
<!-- Provide technical details about the implementation -->
- The template link contained in the README is a template I created
using the Nextjs and Langchain template.
- The template includes a proper implementation of the Solana Agent Kit
and Langchain response streaming.

## Additional Notes
<!-- Any additional information that reviewers should know -->
I believe that examples should be left out of library repos, not just
because of bundle size but because the repo itself can get quite big and
maintaining a monorepo never scales well.

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
2024-12-31 23:31:38 +05:30
krill
0e6b78b971 🚚 fix more typos; rename example 2024-12-31 12:04:11 +09:00
krill
df386a8cbd 📝 fix typos 2024-12-31 12:02:55 +09:00
michaelessiet
b13985f31d fix: deploy to vercel readme button 2024-12-30 22:19:38 +01:00
aryan
9b8bd14cf5 chore: deploy to vercel 2024-12-31 02:39:56 +05:30
Michael Essiet
6e6bad0482 Merge branch 'main' into example/nextjs-langchain 2024-12-30 12:26:55 +01:00
michaelessiet
aedcf4643f fix: rawHtml type 2024-12-30 12:07:02 +01:00
michaelessiet
56185d94fb feat: markdown formatting 2024-12-30 12:00:51 +01:00
aryan
4c0124da97 chore: lint 2024-12-30 14:37:47 +05:30
ARYAN
02130be8e6 Added a Telegram bot starter example (#84)
# Pull Request Description
Added a Telegram bot starter example, with steps on how to run and host
it successfully.

## Related Issue
Fixes #83 

## Changes Made
This PR adds the following changes:
- Adds an example on how we can use agent kit in a telegram bot using
nextjs
- 
  
## Implementation Details
- Used next js and ngrok or vercel to host the bot and telegram bot api
to have it.

## Transaction executed by agent 
Yes it is able to do everything.

## Prompt Used
NA

## Additional Notes
NA

## Checklist
- [ x  ] I have tested these changes locally
2024-12-30 06:43:49 +05:30
aryan
fab1441a00 chore: docs 2024-12-30 03:26:26 +05:30
michaelessiet
1cbdb82bb5 feat: add the nextjs starter template to examples/ dir 2024-12-29 20:12:48 +01:00
michaelessiet
f3c895560e feat: add the nextjs starter template to examples/ dir 2024-12-29 20:09:05 +01:00
Michael Essiet
354b3261e0 Merge branch 'main' into example/nextjs-langchain 2024-12-29 11:19:58 +01:00
Arpit Singh Bhatia
4bcbf0502a tg-bot-starter repo 2024-12-28 13:53:48 +05:30
ARYAN
fd15656304 Langgraph (#78)
# Pull Request Description

## Related Issue
Fixes #61

## Changes Made
This PR adds the following changes:
- Added a new example demonstrating LangGraph integration with Solana
Agent Kit
- Implemented a multi-agent system with specialized agents for different
tasks
- Added state management and routing logic using LangGraph's StateGraph
- Integrated Tavily search capabilities for enhanced general-purpose
queries
- Added support for token swaps using Jupiter DEX
- Implemented TypeScript-based project structure with full type safety
- Added comprehensive documentation and architecture diagram

## Implementation Details
- Created a directed workflow using StateGraph with the following
components:
  - Manager Agent: Handles query classification and routing
- General Agent: Processes basic queries with Tavily search integration
  - Transfer/Swap Agent: Handles token transfers and DEX operations
  - Read Agent: Manages blockchain data queries
- Implemented state management using LangGraph annotations for query
classification
- Added environment-based configuration for API keys and RPC endpoints
- Integrated with external dependencies:
  - @langchain/community v0.3.20
  - @langchain/core v0.3.26
  - @langchain/langgraph v0.2.36
  - solana-agent-kit v1.3.0
- Set up TypeScript configuration with ESM support

## Architecture

<img width="801" alt="Screenshot 2024-12-27 at 5 59 26 PM"
src="https://github.com/user-attachments/assets/a90597ac-3bfc-47e1-b1de-5a17a3de106b"
/>


## Transaction executed by agent 
Example transaction: 


## Additional Notes
- The implementation follows a modular architecture as shown in the
architecture diagram
- Supports both read and write operations on the Solana blockchain
- Includes comprehensive error handling and type safety
- Provides flexible configuration through environment variables
- Project structure follows best practices with clear separation of
concerns
- Includes example queries for testing different agent pathways

## Checklist
- [x] I have tested these changes locally
- [x] I have updated the documentation
- [x] I have added a transaction link
- [x] I have added the prompt used to test it
2024-12-28 02:25:28 +05:30
Arpit Singh Bhatia
592c4987df fix 2024-12-28 02:00:49 +05:30
Arpit Singh Bhatia
9de0153b9e readme 2024-12-28 01:41:17 +05:30
Deepak
e9c1d3067a added architecture 2024-12-27 18:02:54 +05:30
Deepak
041953c1d5 Added documentation 2024-12-27 17:45:28 +05:30
Deepak
a537716d99 fin 2024-12-27 17:41:12 +05:30
Deepak
3cdd45d623 added write functionalities ie, swap and transfer 2024-12-27 16:53:12 +05:30
Arpit Singh Bhatia
86e96023b7 persistance agent: 2024-12-27 16:03:56 +05:30
Arpit Singh Bhatia
bf28aa3f66 implemented a simple next js repo to run agent kit 2024-12-27 15:32:31 +05:30
Deepak
ab9259d4e2 added pnpm 2024-12-27 15:12:27 +05:30
Deepak
954e49e08e seperated the dependencies from the main project 2024-12-27 14:44:21 +05:30
Deepak
45d5ad21a7 init 2024-12-27 14:14:17 +05:30
michaelessiet
d386f47de7 docs: add examples directory and readme 2024-12-26 19:11:54 +01:00