Skip to main content

Free Gemini-based tool-using agent SDK.

Project description


GemAgent

GemAgent is a lightweight Python SDK to build Gemini-powered agents with tool-calling capability. It provides a simple interface to run Gemini 1.5 models with custom tools and simulated event streaming.


✅ Current Features

  • 🎯 Supports Google Gemini 1.5 models (via google.generativeai)
  • 🧰 Register and use custom tools easily
  • 🔁 Agent and runner system with clean separation
  • 📤 Simulated streaming output (run_streamed)
  • ✅ Simple tool call parsing using call_tool(tool_name, arg=value) format

🔧 Example Usage

from gemagent import Agent, Runner, tool_custom

@tool_custom
def say_hello(name="world"):
    return f"Hello, {name}!"

agent = Agent(
    name="DemoAgent",
    instructions="Be helpful and use tools if needed.",
    tools=[say_hello],
)

import asyncio
response = asyncio.run(Runner.run(agent, "call_tool(say_hello, name='Rishabh')"))
print(response.final_output)

📦 Installation

pip install gemagent

📍 Environment

Set your Gemini API key in .env file:

GOOGLE_API_KEY=your_api_key_here

🚧 Roadmap (Coming Soon)

  • 🔌 Native support for multiple models (OpenAI, Claude, local models)
  • 🧠 Tool chaining and multi-step reasoning
  • 🔄 Agent memory and context persistence
  • 🎥 Real token-level streaming (for terminal and web)
  • ⚙️ CLI interface and Web playground
  • 📁 Plugin-style tool loading

📄 License

MIT License

💡 Inspiration

OpenAI recently released the Agents SDK, which provides a powerful tool-using agent system. However, it requires a paid API key with at least $5 balance to access.

GemAgent was born out of the need for:

  • A free, minimal alternative using Gemini 1.5 Flash
  • Similar design and syntax to OpenAI's Agents SDK for easy migration later
  • Local dev/testing without paying just to prototype tool-based agents

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gemagent-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gemagent-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file gemagent-0.1.0.tar.gz.

File metadata

  • Download URL: gemagent-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for gemagent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 46ab1fedb0f133d228f4e4875bd780d9f803edf891c04fa61f031a2b5a0075c0
MD5 87ee84f73821e2f8f405049aa070d15e
BLAKE2b-256 a57c3e2ea6eb1a513b1fab562fe9328ad94235159baa0452afcc07512c3d5182

See more details on using hashes here.

File details

Details for the file gemagent-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gemagent-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for gemagent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 464ff30962be8e1f58c6c2c2353db794fab0820fe8b45f89d6168228f83b7b74
MD5 eea99ced5807f2dda1e4d82814f2c155
BLAKE2b-256 0529b05b0a8a494155e69af96e9367a0620ea2095a0999d7c359bc2fe6916c8f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page