Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2] - 2025-09-04

### Added
- FastAPI bootstrap

## [0.1] - 2025-09-04

### Added
Expand Down
3 changes: 3 additions & 0 deletions GEMINI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# GEMINI.md

We use Python 3.12 and uv for dependency management.
Comment on lines +1 to +3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The heading # GEMINI.md is redundant since it's the same as the filename. It's also a good practice for text files to end with a newline for POSIX compatibility and to avoid issues with some tools.

Suggested change
# GEMINI.md
We use Python 3.12 and uv for dependency management.
We use Python 3.12 and uv for dependency management.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,5 @@ Gemini CLI can use Google Search natively. Ask it, for example, for update to da

```
Search Google ADK documentation and show me some code samples from there
```
```

13 changes: 13 additions & 0 deletions adk_hello_world/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from google.adk import Agent

# Create a simple agent
hello_agent = Agent(
name='hello_agent',
instruction='You are a friendly agent that says "Hello, World!".'
)

# Interact with the agent
response = hello_agent.process('Say hi')

# Print the response
print(response.text)
Comment on lines +1 to +13

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The script's logic is currently in the global scope. It's a best practice in Python to encapsulate the main logic in a function (e.g., main) and use an if __name__ == "__main__": block to call it. This prevents the code from running when the module is imported elsewhere, improving reusability and modularity. I've also added a docstring to the new function for clarity.

from google.adk import Agent


def main():
    """Runs the hello world agent."""
    # Create a simple agent
    hello_agent = Agent(
        name='hello_agent',
        instruction='You are a friendly agent that says "Hello, World!".'
    )

    # Interact with the agent
    response = hello_agent.process('Say hi')

    # Print the response
    print(response.text)


if __name__ == "__main__":
    main()

7 changes: 7 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def read_root():
return {"Hello": "World"}
2 changes: 2 additions & 0 deletions app/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fastapi
uvicorn