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.1.tar.gz (5.6 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.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gemagent-0.1.1.tar.gz
  • Upload date:
  • Size: 5.6 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.1.tar.gz
Algorithm Hash digest
SHA256 3574910ac4941b6c34831ad1088a04cf79354abe8c418c785ceb247164ddc828
MD5 cb5e439a5b4742f73b1460d44f45c436
BLAKE2b-256 9e8e1668eb784f787b330216366fd7defb84ffda9f237e3b6127f38f38647d0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gemagent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1e38c382b5443ba4a3dceabd2c739acc78c0742398ba3dd0dbc9b30df8acbc2
MD5 1738844e86a1fb7b47d598e068fb8bb1
BLAKE2b-256 7ee3c57df8f130380a36dea61556b68fed2b07b217d280c29d5bc0b7d778fa9e

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