Skip to content

feat: add Gemini AI assistant example using uAgents#145

Open
Neelr1912 wants to merge 2 commits into
fetchai:mainfrom
Neelr1912:feat/gemini-ai-assistant-example
Open

feat: add Gemini AI assistant example using uAgents#145
Neelr1912 wants to merge 2 commits into
fetchai:mainfrom
Neelr1912:feat/gemini-ai-assistant-example

Conversation

@Neelr1912

Copy link
Copy Markdown

🛠️ Description of Changes

Fixes #144

This PR adds a complete Gemini AI Assistant example demonstrating how to integrate Google's Gemini API with the Fetch.ai uAgents framework.

Features
Gemini-powered AI assistant agent
User proxy agent for sending prompts
Asynchronous agent-to-agent communication using uAgents
Environment-based API key configuration
PromptRequest and PromptResponse message models
Robust error handling
Comprehensive documentation and setup instructions
Files Added
gemini_ai_assistant/gemini_agent.py
gemini_ai_assistant/user_agent.py
gemini_ai_assistant/models.py
gemini_ai_assistant/requirements.txt
gemini_ai_assistant/.env.example
gemini_ai_assistant/README.md
Architecture

User Agent → PromptRequest → Gemini Agent → Gemini API → PromptResponse → User Agent

Error Handling
Missing API key
Invalid API key
Empty prompts
Gemini API failures
Network-related errors
Verification

Example structure created

Environment configuration documented

Gemini integration implemented

uAgents messaging implemented

README includes setup and execution instructions

No existing repository files modified

@Neelr1912

Copy link
Copy Markdown
Author

Hi maintainers,

I've submitted this PR for Issue #144. The workflow is currently awaiting maintainer approval before CI can run.

When you have a chance, could someone please approve the workflow so the checks can execute?

Thank you!

@Neelr1912

Copy link
Copy Markdown
Author

Hi maintainers,

All automated checks have now completed successfully except for the required review gate. The Gemini AI Assistant example has been implemented and documented, and the PR is ready for review.

When convenient, could someone please take a look at the changes and provide feedback?

Thank you for your time and consideration.

@gautammanak1

Copy link
Copy Markdown
Collaborator

Thanks for the contribution 🚀

One important suggestion: please use the Agent Chat Protocol (uagents_core.contrib.protocols.chatChatMessage / chat_protocol_spec) for agent communication, instead of custom message models. This keeps the example aligned with the rest of the repo and makes the agent discoverable + chat-compatible on Agentverse/ASI:One.

You can reference how the other examples wire it up via their chat_proto.py. Once Chat Protocol support is added (and CI is green), this will be ready for review. Let me know if you need any help! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Feature Request: Add a Generative AI (Gemini) Agent Example

2 participants