Thomas Piacentini
← Atelier

Projet

Support Agent With Google ADK

Texte original · anglais480 min

Prepare a redacted support reply or a human escalation, then run the same routing and capability rules through real ADK agents. The useful result is an HTML review page and JSON with source guidance, retained reply text and handoff history.

Python 3.10 or newer. Start with dictionaries, exceptions and modules; the optional stage adds async model events. The required core uses standard libraries and authored support guidance.

bash
python3 scripts/project_test.py support-agent-with-google-adk --init my-support
python3 scripts/project_test.py support-agent-with-google-adk --stage 1 --path my-support --strict
python3 scripts/project_test.py support-agent-with-google-adk --all --solution --strict
cd projects/support-agent-with-google-adk/solution
python3 main.py --ticket fixtures/ticket.json --out support-output

Open support-output/index.html. The ticket file has id and text fields. Unknown topics and ties escalate; a selected specialist can only read its permitted local guidance. No billing system, account service or outgoing email is connected.

  1. Validate before starting a session: bound input and remove the documented email/API-key patterns.
  2. Route and authorize: distinguish domain scoring from a read-capability allowlist.
  3. Retain the actual response: enforce received, routed, answered and escalated transitions.
  4. Reuse policy inside ADK: compose earlier contracts before constructing real agents.

The redaction patterns are deliberately narrow. They do not guarantee removal of every sensitive value. The default reply is sourced from an authored local guidance record, not generated by a language model.

Actual SDK comparison

From the repository root:

bash
python3 -m venv .venv
.venv/bin/python -m pip install -r projects/support-agent-with-google-adk/requirements-framework.txt
.venv/bin/python scripts/project_test.py support-agent-with-google-adk --all --solution --optional --strict
.venv/bin/python projects/support-agent-with-google-adk/solution/framework_demo.py

The adapter is pinned to google-adk 2.10.0. It runs a real Workflow and LlmAgent pair with deterministic local BaseLlm fixtures. Tests inspect event authors, final state, redacted model requests, blocked capabilities and human escalation. The framework-independent composition also runs without the package. Missing dependencies produce SKIP; strict optional grading fails on a skip.

For your own redacted ticket through the SDK:

bash
.venv/bin/python projects/support-agent-with-google-adk/solution/main.py --ticket YOUR_TICKET.json --adk --out support-adk-output

Appending --model YOUR_ADK_MODEL explicitly selects a live model and requires that provider's documented credentials. The model receives the cleaned ticket and selected source guidance. Its answer remains a draft for review; prompting alone cannot prove grounding. The deterministic routing and capability gates cannot be overridden by a model route proposal.

A useful extension is a real read-only support knowledge adapter with source IDs. Keep ticket intake and authorization ahead of that adapter, then evaluate unsupported answers separately from SDK control-flow tests.

Official ADK documentation. All project implementations, examples and fixture guidance are original.

Code et livrables 38
Ce que vous en retenez

Enregistré dans votre carnet sur cet appareil.

Sources et limites

Les repères de lecture sont déclaratifs. Les résultats de tests sont enregistrés séparément ; ils valent pour les cas exécutés.

AI Engineering from Scratch · 3f9715c · MIT

Télécharger ce fichier ↓