Skip to main content

A framework for building agents that use Gemini's function calling capabilities

Project description

Gemini Agent Framework

A Python framework for building agents that use Gemini's function calling capabilities. This framework allows you to easily create agents that can break down complex tasks into sequential steps using available tools.

Installation

pip install gemini-agent-framework

Quick Start

from gemini_agent import Agent
from dotenv import load_dotenv

load_dotenv()

# Define your tools
@Agent.description("Multiplies two numbers.")
@Agent.parameters({
    'a': {'type': int, 'description': 'The first number'},
    'b': {'type': int, 'description': 'The second number'}
})
def multiply(a: int, b: int) -> int:
    return a * b

# Create an agent instance
agent = Agent(api_key="your-api-key", tools=[multiply])

# Use the agent
response = agent.prompt("Multiply 3 and 7")
print(response)  # Should output 21

Features

  • Easy tool definition using decorators
  • Automatic sequential task breakdown
  • Support for structured responses
  • Intermediate result handling
  • Error handling and recovery

Documentation

For more detailed documentation, please visit the documentation page.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

gemini_agent_framework-0.1.10.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

gemini_agent_framework-0.1.10-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file gemini_agent_framework-0.1.10.tar.gz.

File metadata

  • Download URL: gemini_agent_framework-0.1.10.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for gemini_agent_framework-0.1.10.tar.gz
Algorithm Hash digest
SHA256 2070016b95cb25d6e3f95850ec2c97ee0b4313dc09d086732f7ec96cae250f22
MD5 e22ab05422ebb7bcd278094a0286cc4c
BLAKE2b-256 d2c40486ee2654ea207bd7e9c97dfc2f92f12d3e87c0d4791c8b30dfa24bcc49

See more details on using hashes here.

File details

Details for the file gemini_agent_framework-0.1.10-py3-none-any.whl.

File metadata

File hashes

Hashes for gemini_agent_framework-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 fb2112b44d4baf3eb06fd43f6f8dcfb970ac0d22d5fcafa011bd661db7f24cb9
MD5 70cb9148c78fe0e60c77e970e0a2a82b
BLAKE2b-256 bc335d0ad0ef534d192a1a6841277b05171834acf39afcc6533c8a335ecfb264

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