Skip to content

Conversation

happyhuman
Copy link
Collaborator

No description provided.

@slothwriter slothwriter self-requested a review September 8, 2025 19:07
Copy link
Collaborator

@slothwriter slothwriter left a comment

Choose a reason for hiding this comment

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

LGTM, added a few comments. We should also ask the SWE to give the final approval.

"@types/node": "^24.3.1",
"typescript": "^5.9.2"
},
"@google/adk": "file:../adk-js/core",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Update this line before committing (after the release of the agent).

@@ -0,0 +1,12 @@
{
Copy link
Collaborator

@slothwriter slothwriter Sep 9, 2025

Choose a reason for hiding this comment

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

The best practice is to place package.json and tsconfig.json files at the root of the repository (same level as the examples directory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That is definitely true in general, but we will probably have many examples, each with different set of config files. I see a similar practice in the python folder where each example has its own requirements.txt.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That makes sense. I will do the same then.

const USER_ID = "test_user_789";
const SESSION_ID_TOOL_AGENT = "session_tool_agent_ts";
const SESSION_ID_SCHEMA_AGENT = "session_schema_agent_ts";
const MODEL_NAME = "gemini-2.0-flash"; // Using flash for speed
Copy link
Collaborator

Choose a reason for hiding this comment

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

2.5 model ?

Copy link
Collaborator Author

@happyhuman happyhuman Sep 9, 2025

Choose a reason for hiding this comment

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

I used gemini-2.0-flash to maintain consistency with the python snippets, but I am okay to update the version. What do you think? Should we keep things consistent with the python examples, or do our own thing and use the more updated model?

```typescript
// Example: Adding instructions
const capitalAgent = new LlmAgent({
model: 'gemini-2.0-flash',
Copy link
Collaborator

Choose a reason for hiding this comment

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

2.5 model

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same as above.

```typescript
// Example: Defining the basic identity
const capitalAgent = new LlmAgent({
model: 'gemini-2.0-flash',
Copy link
Collaborator

Choose a reason for hiding this comment

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

2.5 model

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same as above.

"name": "adk-docs-examples",
"version": "1.0.0",
"description": "TS code examples for the ADK Documentation",
"main": "index.js",
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is no index.js file that serves as a central export. So, this field is misleading and should be removed.

@@ -0,0 +1,12 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

That makes sense. I will do the same then.

@@ -0,0 +1,24 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the best practice is to add the package-lock.json file as well.

@@ -0,0 +1,24 @@
{
"name": "adk-docs-examples",
Copy link
Collaborator

Choose a reason for hiding this comment

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

lets rename it to "adk-llm_agent-ts-example" since we now agreed to add package.json per feature directory

{
"name": "adk-docs-examples",
"version": "1.0.0",
"description": "TS code examples for the ADK Documentation",
Copy link
Collaborator

Choose a reason for hiding this comment

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

For the same reason above, lets change the description to ADK TS example for LLM agent.

@tpryan tpryan added the adk-js label Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants