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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gemini_agent_framework-0.1.8.tar.gz.
File metadata
- Download URL: gemini_agent_framework-0.1.8.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67e1474c08fd72db6e5bb5b0f50d2bd0c4cd87b0b2a5a32f5c43aaae385e48ec
|
|
| MD5 |
76dfdf8cd805ad070947556ad9309f8b
|
|
| BLAKE2b-256 |
d134c1bb11bd56f90da99138553b34e33517418880919088ae5346f3199a560c
|
File details
Details for the file gemini_agent_framework-0.1.8-py3-none-any.whl.
File metadata
- Download URL: gemini_agent_framework-0.1.8-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
843c3ede734febffea7f3127b6d68d94d37693597a8fac46a0fd424a16abc4e5
|
|
| MD5 |
eb77aa04b33eb7d822e34c092655a64f
|
|
| BLAKE2b-256 |
8552e461db7dd19e22c8b998b68179e10a8b94e097eba7a82c5ecf08149125c9
|