|
| 1 | +# Get Started with Microsoft Agent Framework Google |
| 2 | + |
| 3 | +> **Note**: This package is currently under active development. The chat client implementation for Google AI is coming soon. This initial release provides the foundational settings and configuration classes. |
| 4 | +
|
| 5 | +Please install this package via pip: |
| 6 | + |
| 7 | +```bash |
| 8 | +pip install agent-framework-google --pre |
| 9 | +``` |
| 10 | + |
| 11 | +## Google AI (Gemini API) Integration |
| 12 | + |
| 13 | +This package provides integration with Google's Gemini API for Agent Framework: |
| 14 | + |
| 15 | +- **Google AI (Gemini API)**: Direct access to Google's Gemini models with API key authentication |
| 16 | + |
| 17 | +> **Note**: This package uses the new `google-genai` SDK as recommended by Google. See the [migration guide](https://ai.google.dev/gemini-api/docs/migrate) for more information. |
| 18 | +
|
| 19 | +### Current Status |
| 20 | + |
| 21 | +**Available Now:** |
| 22 | +- `GoogleAISettings`: Configuration class for Google AI (Gemini API) authentication and settings |
| 23 | + |
| 24 | +**Coming Soon:** |
| 25 | +- `GoogleAIChatClient`: Chat client for Google AI with streaming, function calling, and multi-modal support |
| 26 | +- Integration tests and usage samples |
| 27 | + |
| 28 | +### Configuration |
| 29 | + |
| 30 | +You can configure the settings class now, which will be used by the chat client in the next release: |
| 31 | + |
| 32 | +#### Google AI Settings |
| 33 | + |
| 34 | +```python |
| 35 | +from agent_framework_google import GoogleAISettings |
| 36 | + |
| 37 | +# Configure via environment variables |
| 38 | +# GOOGLE_AI_API_KEY=your_api_key |
| 39 | +# GOOGLE_AI_CHAT_MODEL_ID=gemini-1.5-pro |
| 40 | + |
| 41 | +settings = GoogleAISettings() |
| 42 | + |
| 43 | +# Or pass parameters directly (pass SecretStr for type safety) |
| 44 | +from pydantic import SecretStr |
| 45 | + |
| 46 | +settings = GoogleAISettings( |
| 47 | + api_key=SecretStr("your_api_key"), |
| 48 | + chat_model_id="gemini-1.5-pro" |
| 49 | +) |
| 50 | +``` |
| 51 | + |
| 52 | +### Future Usage (Coming Soon) |
| 53 | + |
| 54 | +Once the chat client is released, usage will look like this: |
| 55 | + |
| 56 | +```python |
| 57 | +# from agent_framework.google import GoogleAIChatClient |
| 58 | +# |
| 59 | +# # Configure via environment variables |
| 60 | +# # GOOGLE_AI_API_KEY=your_api_key |
| 61 | +# # GOOGLE_AI_CHAT_MODEL_ID=gemini-1.5-pro |
| 62 | +# |
| 63 | +# client = GoogleAIChatClient() |
| 64 | +# agent = client.create_agent( |
| 65 | +# name="Assistant", |
| 66 | +# instructions="You are a helpful assistant" |
| 67 | +# ) |
| 68 | +# |
| 69 | +# response = await agent.run("Hello!") |
| 70 | +# print(response.text) |
| 71 | +``` |
| 72 | + |
| 73 | +## Configuration |
| 74 | + |
| 75 | +### Environment Variables |
| 76 | + |
| 77 | +**Google AI:** |
| 78 | +- `GOOGLE_AI_API_KEY`: Your Google AI API key ([Get one here](https://ai.google.dev/)) |
| 79 | +- `GOOGLE_AI_CHAT_MODEL_ID`: Model to use (e.g., `gemini-1.5-pro`, `gemini-1.5-flash`) |
| 80 | + |
| 81 | +### Supported Models |
| 82 | + |
| 83 | +- `gemini-1.5-pro`: Most capable model |
| 84 | +- `gemini-1.5-flash`: Faster, cost-effective model |
| 85 | +- `gemini-2.0-flash-exp`: Experimental latest model |
| 86 | + |
| 87 | +## Features |
| 88 | + |
| 89 | +### Planned Features |
| 90 | +- ✅ Chat completion (streaming and non-streaming) |
| 91 | +- ✅ Function/tool calling |
| 92 | +- ✅ Multi-modal support (text, images, video, audio) |
| 93 | +- ✅ System instructions |
| 94 | +- ✅ Conversation history management |
| 95 | + |
| 96 | +## Development Roadmap |
| 97 | + |
| 98 | +This package is being developed incrementally: |
| 99 | + |
| 100 | +- ✅ **Phase 1 (Current)**: Package structure and settings classes |
| 101 | +- 🚧 **Phase 2 (Next)**: Google AI chat client with streaming and function calling |
| 102 | +- 🚧 **Phase 3**: Google AI integration tests and samples |
| 103 | +- 🚧 **Phase 4**: Advanced features (context caching, safety settings, structured output) |
| 104 | + |
| 105 | +> **Note**: Vertex AI support may be added in a future iteration based on user demand. |
| 106 | +
|
| 107 | +## Examples |
| 108 | + |
| 109 | +Examples will be available once the chat client is implemented. Check back soon or watch the [repository](https://github.com/microsoft/agent-framework) for updates. |
| 110 | + |
| 111 | +## Documentation |
| 112 | + |
| 113 | +For more information: |
| 114 | +- [Google AI Documentation](https://ai.google.dev/docs) |
| 115 | +- [Google Gemini API Migration Guide](https://ai.google.dev/gemini-api/docs/migrate) |
| 116 | +- [Agent Framework Documentation](https://aka.ms/agent-framework) |
| 117 | +- [Agent Framework Repository](https://github.com/microsoft/agent-framework) |
0 commit comments