Skip to content

Commit 697fe7f

Browse files
deploy: e81b9fa
1 parent da7a355 commit 697fe7f

File tree

5 files changed

+4
-419
lines changed

5 files changed

+4
-419
lines changed

.doctrees/environment.pickle

-1.43 KB
Binary file not shown.

.doctrees/index.doctree

-16.9 KB
Binary file not shown.

_sources/index.rst.txt

Lines changed: 1 addition & 219 deletions
Original file line numberDiff line numberDiff line change
@@ -553,231 +553,13 @@ Example Custom Guardrails - Optional
553553
Tools
554554
~~~~~~
555555

556-
Solana Transfer
556+
Solana Agent Kit
557557
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
558558

559559
.. code-block:: bash
560-
561-
pip install sakit
562-
563-
.. code-block:: python
564-
565-
from solana_agent import SolanaAgent
566-
567-
config = {
568-
"tools": {
569-
"solana_transfer": {
570-
"rpc_url": "my-rpc-url", # Required - your RPC URL - Helius is recommended
571-
"private_key": "my-private-key", # Required - base58 string - please use env vars to store the key as it is very confidential
572-
},
573-
},
574-
"agents": [
575-
{
576-
"name": "solana_expert",
577-
"instructions": "You are a Solana expert that can transfer tokens.",
578-
"specialization": "Solana Blockchain",
579-
"tools": ["solana_transfer"], # Enable the tool for this agent
580-
}
581-
],
582-
}
583-
584-
solana_agent = SolanaAgent(config=config)
585-
586-
async for response in solana_agent.process("user123", "Transfer 0.01 Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB to DzvqBkUHUhuhHtNKGWSCVEAm2rHdm9bxxdQYC6mZBZyF"):
587-
print(response, end="")
588-
589-
Solana Swap
590-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
591-
592-
.. code-block:: bash
593-
594-
pip install sakit
595-
596-
.. code-block:: python
597-
598-
from solana_agent import SolanaAgent
599-
600-
config = {
601-
"tools": {
602-
"solana_swap": {
603-
"rpc_url": "my-rpc-url", # Required - your RPC URL - Helius is recommended
604-
"private_key": "my-private-key", # Required - base58 string - please use env vars to store the key as it is very confidential
605-
"jupiter_url": "my-custom-url" # Optional - if you are using a custom Jupiter service like Metis from QuickNode
606-
},
607-
},
608-
"agents": [
609-
{
610-
"name": "solana_expert",
611-
"instructions": "You are a Solana expert that can swap tokens.",
612-
"specialization": "Solana Blockchain",
613-
"tools": ["solana_swap"], # Enable the tool for this agent
614-
}
615-
],
616-
}
617-
618-
solana_agent = SolanaAgent(config=config)
619-
620-
async for response in solana_agent.process("user123", "Swap 0.01 Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB to So11111111111111111111111111111111111111112"):
621-
print(response, end="")
622-
623-
624-
Internet Search
625-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
626560
627-
.. code-block:: bash
628-
629561
pip install sakit
630562
631-
.. code-block:: python
632-
633-
from solana_agent import SolanaAgent
634-
635-
config = {
636-
"openai": {
637-
"api_key": "your-openai-api-key",
638-
},
639-
"tools": {
640-
"search_internet": {
641-
"api_key": "your-openai-api-key",
642-
},
643-
},
644-
"agents": [
645-
{
646-
"name": "news_specialist",
647-
"instructions": "You are an expert news agent. You use your search_internet tool to get the latest information.",
648-
"specialization": "News researcher and specialist",
649-
"tools": ["search_internet"], # Enable the tool for this agent
650-
}
651-
],
652-
}
653-
654-
solana_agent = SolanaAgent(config=config)
655-
656-
async for response in solana_agent.process("user123", "What is the latest news on Elon Musk?"):
657-
print(response, end="")
658-
659-
660-
MCP
661-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
662-
663-
Zapier MCP has been tested, works, and is supported.
664-
665-
Other MCP servers may work but are not supported.
666-
667-
.. code-block:: bash
668-
669-
pip install sakit
670-
671-
.. code-block:: python
672-
673-
from solana_agent import SolanaAgent
674-
675-
config = {
676-
"tools": {
677-
"mcp": {
678-
"url": "my-zapier-mcp-url",
679-
}
680-
},
681-
"agents": [
682-
{
683-
"name": "zapier_expert",
684-
"instructions": "You are an expert in using Zapier integrations using MCP. You always use the mcp tool to perform Zapier AI like actions.",
685-
"specialization": "Zapier service integration expert",
686-
"tools": ["mcp"], # Enable the tool for this agent
687-
}
688-
]
689-
}
690-
691-
solana_agent = SolanaAgent(config=config)
692-
693-
async for response in solana_agent.process("user123", "Send an email to bob@bob.com to clean his room!"):
694-
print(response, end="")
695-
696-
697-
Image Generation
698-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
699-
700-
Generate images using OpenAI, Grok, or Gemini image models and upload them to S3-compatible storage.
701-
702-
.. code-block:: bash
703-
704-
pip install sakit
705-
706-
.. code-block:: python
707-
708-
from solana_agent import SolanaAgent
709-
710-
config = {
711-
"tools": {
712-
"image_gen": {
713-
"provider": "openai", # Required: either "openai", "grok", or "gemini"
714-
"api_key": "your-api-key", # Required: your OpenAI or Grok or Gemini API key
715-
"s3_endpoint_url": "https://your-s3-endpoint.com", # Required: e.g., https://nyc3.digitaloceanspaces.com
716-
"s3_access_key_id": "YOUR_S3_ACCESS_KEY", # Required: Your S3 access key ID
717-
"s3_secret_access_key": "YOUR_S3_SECRET_KEY", # Required: Your S3 secret access key
718-
"s3_bucket_name": "your-bucket-name", # Required: The name of your S3 bucket
719-
"s3_region_name": "your-region", # Optional: e.g., "nyc3", needed by some providers
720-
"s3_public_url_base": "https://your-cdn-or-bucket-url.com/", # Optional: Custom base URL for public links (include trailing slash). If omitted, a standard URL is constructed.
721-
}
722-
},
723-
"agents": [
724-
{
725-
"name": "image_creator",
726-
"instructions": "You are a creative assistant that generates images based on user descriptions. Use the image_gen tool to create and store the image.",
727-
"specialization": "Image generation and storage",
728-
"tools": ["image_gen"], # Enable the tool for this agent
729-
}
730-
]
731-
}
732-
733-
solana_agent = SolanaAgent(config=config)
734-
735-
async for response in solana_agent.process("user123", "Generate an image of a smiling unicorn!"):
736-
print(response, end="")
737-
738-
739-
### Nemo Agent
740-
741-
This plugin allows the agent to generate python programs using [Nemo Agent](https://nemo-agent.com) and uploads the files in a ZIP file to s3-compatible storage. It returns the public URL of the zip file.
742-
743-
This has been tested using [Cloudflare R2](https://developers.cloudflare.com/r2/).
744-
745-
.. code-block:: bash
746-
747-
pip install sakit
748-
749-
.. code-block:: python
750-
751-
from solana_agent import SolanaAgent
752-
753-
config = {
754-
"tools": {
755-
"nemo_agent": {
756-
"provider": "openai", # Required: either "openai" or "gemini"
757-
"api_key": "your-api-key", # Required: your OpenAI or Gemini API key
758-
"s3_endpoint_url": "https://your-s3-endpoint.com", # Required: e.g., https://nyc3.digitaloceanspaces.com
759-
"s3_access_key_id": "YOUR_S3_ACCESS_KEY", # Required: Your S3 access key ID
760-
"s3_secret_access_key": "YOUR_S3_SECRET_KEY", # Required: Your S3 secret access key
761-
"s3_bucket_name": "your-bucket-name", # Required: The name of your S3 bucket
762-
"s3_region_name": "your-region", # Optional: e.g., "nyc3", needed by some providers
763-
"s3_public_url_base": "https://your-cdn-or-bucket-url.com/", # Optional: Custom base URL for public links (include trailing slash). If omitted, a standard URL is constructed.
764-
}
765-
},
766-
"agents": [
767-
{
768-
"name": "python_dev",
769-
"instructions": "You are an expert Python Developer. You always use your nemo_agent tool to generate python code.",
770-
"specialization": "Python Developer",
771-
"tools": ["nemo_agent"], # Enable the tool for this agent
772-
}
773-
]
774-
}
775-
776-
solana_agent = SolanaAgent(config=config)
777-
778-
async for response in solana_agent.process("user123", "Generate an example leetcode medium in Python and give me the zip file."):
779-
print(response, end="")
780-
781563
Inline Tool Example
782564
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
783565

0 commit comments

Comments
 (0)