Projects
1.3kviews
CompletedPython, AI, SDK, Pypi

GemAgent: A Gemini-Powered Agent SDK

GemAgent is a lightweight Python SDK for building Gemini-powered agents with tool-calling capabilities, offering a free alternative to OpenAI's Agents SDK. Easily integrate custom tools and leverage Gemini power for local prototyping.

R

Rishabh Dubey

June 4, 2025 – June 4, 2025

GemAgent: A Gemini-Powered Agent SDK

GemAgent: A Gemini-Powered Agent SDK

This project introduces GemAgent, a lightweight Python SDK designed for building powerful AI agents that leverage Google's Gemini 1.5 language model. It offers a free and accessible alternative to existing paid solutions, enabling developers to quickly prototype and experiment with agent-based applications.

Overview

GemAgent simplifies the process of creating agents capable of interacting with various tools. Its modular design separates the agent's logic from the runner, improving code organization and maintainability. Custom tools are easily integrated, and the SDK handles tool invocation and response parsing efficiently. Simulated streaming output provides a user-friendly experience, enhancing the interactive nature of agent development.

Key Features

  • Supports Google Gemini 1.5 models
  • Easy custom tool registration and usage
  • Clean separation of agent and runner logic
  • Simulated streaming output for improved user experience
  • Simple tool call parsing using call_tool function

Technical Implementation

GemAgent is built using Python and utilizes the google.generativeai library to interact with Gemini 1.5. The core functionality revolves around the Agent and Runner classes. The Agent class defines the agent's behavior and tools, while the Runner class handles the execution flow. Custom tools are defined as Python functions decorated with @tool_custom, enabling seamless integration. The call_tool function facilitates tool invocation with simple argument passing.

Challenges & Solutions

One of the biggest challenges was using the OpenAI API—it got way too expensive and I’m broke, so that clearly wasn’t sustainable. Gemini 1.5 was also pretty underwhelming for agent workflows, nowhere close to OpenAI’s Agent SDK. So I started building my own tools to bridge the gap. Right now, I’ve added basic internet search support as a start—still a lot of work left, but it’s open-sourced, so feel free to fork it, extend it, and maybe raise a PR if you think it can be better.

GemAgent empowers developers to build sophisticated AI agents without the financial burden of costly API access, fostering innovation and accessibility in the field of large language model applications.

See more

More projects