Summary
Currently, many of the basic examples focus on simple ping-pong messaging or fetching static APIs. You can propose adding an agent that integrates with a modern LLM API to process natural language.
How to build it: Create a Python agent using the uagents framework that imports the google-generativeai package. The agent would receive a text prompt via a message protocol, query the Gemini API, and return the synthesized response to the sender.
Why it stands out: Fetch.ai is all about AI agents, but many beginners struggle to bridge the gap between the communication framework and actual Large Language Models. This provides a plug-and-play template.
Steps to reproduce
🔄 Steps to Reproduce / Execute the Example
To verify the integration and see the Generative AI agent in action, a user would follow these steps:
-
Navigate to the new example directory:
cd innovation-lab-examples/gemini_ai_assistant
-
Install the required dependencies:
pip install -r requirements.txt
(Dependencies will include uagents and google-generativeai)
-
Set up the Gemini API Key:
export GEMINI_API_KEY="your_actual_api_key_here"
-
Run the agent scripts:
- Open two terminal windows.
- In Terminal 1, start the user proxy agent:
python user_agent.py
- In Terminal 2, start the Gemini AI assistant agent:
python gemini_agent.py
-
Observe the interaction:
- The
user_agent sends a message payload containing a natural language prompt (e.g., "Explain quantum computing in simple terms").
- The
gemini_agent receives the message, invokes the Google Gemini API using the securely configured environment variable, gets the response, and replies back to the user_agent.
🎯 Expected Behavior
- The agents should successfully register on the local or testnet Almanac contract.
- The communication between the two agents must remain entirely asynchronous using the
uagents native messaging protocol.
- The response received from the Gemini API should print clearly in the
user_agent logs without truncation or authentication failures.
Expected behavior
When the new Generative AI example is executed, a user should be able to send a natural language prompt via a user_agent. The gemini_agent will receive this message, query the Google Gemini API, and successfully return the AI-generated response back to the user agent via the uagents messaging protocol.
Actual behavior
Currently, the repository lacks an example demonstrating how to integrate modern Large Language Models (like Google Gemini) with the uagents framework. Developers looking to build AI-driven agents must build the integration architecture from scratch without a reference example.
Affected file or folder path
No response
Logs / traceback
Environment
No response
Summary
Currently, many of the basic examples focus on simple ping-pong messaging or fetching static APIs. You can propose adding an agent that integrates with a modern LLM API to process natural language.
How to build it: Create a Python agent using the uagents framework that imports the google-generativeai package. The agent would receive a text prompt via a message protocol, query the Gemini API, and return the synthesized response to the sender.
Why it stands out: Fetch.ai is all about AI agents, but many beginners struggle to bridge the gap between the communication framework and actual Large Language Models. This provides a plug-and-play template.
Steps to reproduce
🔄 Steps to Reproduce / Execute the Example
To verify the integration and see the Generative AI agent in action, a user would follow these steps:
Navigate to the new example directory:
cd innovation-lab-examples/gemini_ai_assistantInstall the required dependencies:
pip install -r requirements.txt(Dependencies will include
uagentsandgoogle-generativeai)Set up the Gemini API Key:
export GEMINI_API_KEY="your_actual_api_key_here"Run the agent scripts:
python user_agent.pypython gemini_agent.pyObserve the interaction:
user_agentsends a message payload containing a natural language prompt (e.g., "Explain quantum computing in simple terms").gemini_agentreceives the message, invokes the Google Gemini API using the securely configured environment variable, gets the response, and replies back to theuser_agent.🎯 Expected Behavior
uagentsnative messaging protocol.user_agentlogs without truncation or authentication failures.Expected behavior
When the new Generative AI example is executed, a user should be able to send a natural language prompt via a user_agent. The gemini_agent will receive this message, query the Google Gemini API, and successfully return the AI-generated response back to the user agent via the uagents messaging protocol.
Actual behavior
Currently, the repository lacks an example demonstrating how to integrate modern Large Language Models (like Google Gemini) with the uagents framework. Developers looking to build AI-driven agents must build the integration architecture from scratch without a reference example.
Affected file or folder path
No response
Logs / traceback
Environment
No response