{"id":30252150,"url":"https://github.com/bih/google-adk-client-node","last_synced_at":"2025-08-15T11:14:27.033Z","repository":{"id":302855936,"uuid":"1013052312","full_name":"bih/google-adk-client-node","owner":"bih","description":"Node.js wrapper for communicating with Google ADK","archived":false,"fork":false,"pushed_at":"2025-07-04T11:28:41.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-04T12:52:09.281Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bih.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-03T09:33:26.000Z","updated_at":"2025-07-04T11:28:44.000Z","dependencies_parsed_at":"2025-07-04T13:49:27.631Z","dependency_job_id":null,"html_url":"https://github.com/bih/google-adk-client-node","commit_stats":null,"previous_names":["bih/google-adk-client-node"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bih/google-adk-client-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bih%2Fgoogle-adk-client-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bih%2Fgoogle-adk-client-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bih%2Fgoogle-adk-client-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bih%2Fgoogle-adk-client-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bih","download_url":"https://codeload.github.com/bih/google-adk-client-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bih%2Fgoogle-adk-client-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270559180,"owners_count":24606682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-15T11:14:22.279Z","updated_at":"2025-08-15T11:14:27.007Z","avatar_url":"https://github.com/bih.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google ADK Client Node.js\n\nA TypeScript/JavaScript client library for interacting with Google ADK (Agent Development Kit) APIs.\n\n## Features\n\n- ✅ **Full TypeScript Support** - Complete type definitions derived from the FastAPI schema\n- ✅ **Fluent API Design** - Chainable methods for intuitive usage\n- ✅ **Comprehensive Coverage** - All endpoints from the FastAPI schema\n- ✅ **Modern Async/Await** - Promise-based API with proper error handling\n- ✅ **Lightweight** - Minimal dependencies, built on fetch API\n- ✅ **Well Tested** - Unit tests for core functionality\n\n## Installation\n\n```bash\nnpm install google-adk-client-node\n```\n\n## Quick Start\n\n```typescript\nimport { GoogleADKClient } from 'google-adk-client-node';\n\nconst client = new GoogleADKClient({\n  baseURL: 'https://your-adk-api.com',\n  headers: {\n    'Authorization': 'Bearer your-token'\n  }\n});\n\n// List all apps\nconst apps = await client.listApps();\n\n// Get a session and call debugTrace() - fluent API style\nconst trace = await client\n  .app('my-app')\n  .user('user-123')\n  .session('session-456')\n  .debugTrace();\n\n// Create a new session\nconst session = await client\n  .app('my-app')\n  .user('user-123')\n  .sessions()\n  .create({ \n    state: { key: 'value' } \n  });\n```\n\n## API Reference\n\n### Client Initialization\n\n```typescript\nconst client = new GoogleADKClient({\n  baseURL: 'https://your-api.com',\n  timeout: 30000, // optional, defaults to 30s\n  headers: {      // optional\n    'Authorization': 'Bearer token'\n  }\n});\n```\n\n### Fluent API Structure\n\nThe client follows a hierarchical, fluent API design:\n\n```typescript\nclient\n  .app(appName)\n  .user(userId)\n  .session(sessionId)\n  .method()\n```\n\n### Core Resources\n\n#### Apps\n```typescript\n// List all apps\nconst apps = await client.listApps();\n\n// Get app resource\nconst app = client.app('my-app');\n\n// List eval results for an app\nconst results = await app.listEvalResults();\n\n// Get specific eval result\nconst result = await app.getEvalResult('result-id');\n```\n\n#### Sessions\n```typescript\n// Get session resource\nconst session = client.app('my-app').user('user-123').session('session-456');\n\n// Get session data\nconst sessionData = await session.get();\n\n// Create session with ID\nconst newSession = await session.create({ state: { key: 'value' } });\n\n// Delete session\nawait session.delete();\n\n// Get debug trace for session\nconst trace = await session.debugTrace();\n\n// Get event graph\nconst graph = await session.getEventGraph('event-id');\n```\n\n#### Session Collections\n```typescript\n// List all sessions for a user\nconst sessions = await client.app('my-app').user('user-123').sessions().list();\n\n// Create new session (auto-generated ID)\nconst newSession = await client.app('my-app').user('user-123').sessions().create({\n  state: { key: 'value' },\n  events: []\n});\n```\n\n#### Artifacts\n```typescript\n// Get artifacts resource\nconst artifacts = session.artifacts();\n\n// List artifact names\nconst names = await artifacts.listNames();\n\n// Get specific artifact\nconst artifact = session.artifact('artifact-name');\n\n// Load artifact data\nconst data = await artifact.load();\n\n// Load specific version\nconst versionData = await artifact.loadVersion(1);\n\n// List versions\nconst versions = await artifact.listVersions();\n\n// Delete artifact\nawait artifact.delete();\n```\n\n#### Eval Sets\n```typescript\n// Get eval sets resource\nconst evalSets = client.app('my-app').evalSets();\n\n// List eval sets\nconst sets = await evalSets.list();\n\n// Get specific eval set\nconst evalSet = client.app('my-app').evalSet('eval-set-id');\n\n// Create eval set\nawait evalSet.create();\n\n// Add session to eval set\nawait evalSet.addSession({\n  evalId: 'eval-id',\n  sessionId: 'session-id',\n  userId: 'user-id'\n});\n\n// List evals in set\nconst evals = await evalSet.listEvals();\n\n// Get specific eval\nconst evalCase = await evalSet.getEval('eval-case-id');\n\n// Update eval\nawait evalSet.updateEval('eval-case-id', evalCaseData);\n\n// Delete eval\nawait evalSet.deleteEval('eval-case-id');\n\n// Run eval\nconst results = await evalSet.runEval({\n  evalIds: ['eval-1', 'eval-2'],\n  evalMetrics: [{ metricName: 'accuracy', threshold: 0.8 }]\n});\n```\n\n#### Debug Operations\n```typescript\n// Get debug resource\nconst debug = client.debug();\n\n// Get trace for event\nconst trace = await debug.getTrace('event-id');\n\n// Get session trace\nconst sessionTrace = await debug.getSessionTrace('session-id');\n```\n\n#### Agent Runs\n```typescript\n// Get run resource\nconst run = client.run();\n\n// Run agent\nconst events = await run.run({\n  appName: 'my-app',\n  userId: 'user-123',\n  sessionId: 'session-456',\n  newMessage: {\n    parts: [{ text: 'Hello, agent!' }],\n    role: 'user'\n  }\n});\n\n// Run with streaming\nconst streamResult = await run.runSSE({\n  appName: 'my-app',\n  userId: 'user-123',\n  sessionId: 'session-456',\n  newMessage: {\n    parts: [{ text: 'Hello, agent!' }]\n  },\n  streaming: true\n});\n```\n\n## Error Handling\n\nThe client throws `GoogleADKError` for API errors:\n\n```typescript\nimport { GoogleADKError } from 'google-adk-client-node';\n\ntry {\n  const session = await client.app('my-app').user('user-123').session('invalid-id').get();\n} catch (error) {\n  if (error instanceof GoogleADKError) {\n    console.log('API Error:', error.message);\n    console.log('Status Code:', error.statusCode);\n    console.log('Response:', error.response);\n  }\n}\n```\n\n## TypeScript Support\n\nThe library is written in TypeScript and provides comprehensive type definitions:\n\n```typescript\nimport { \n  GoogleADKClient, \n  Session, \n  Event, \n  Content, \n  EvalCase,\n  AgentRunRequest \n} from 'google-adk-client-node';\n\n// All API responses are properly typed\nconst session: Session = await client.app('my-app').user('user-123').session('session-456').get();\nconst events: Event[] = session.events;\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n\n# Run tests\nnpm test\n\n# Watch mode for development\nnpm run dev\n```\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbih%2Fgoogle-adk-client-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbih%2Fgoogle-adk-client-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbih%2Fgoogle-adk-client-node/lists"}