Skip to content

Agent Skills with Google ADK and DNS Agent

examples/demo_dns_adk.py implements exactly the same DNS Agent with the same 6 skills, but using Google ADK instead of SkillAgent. The behavior is identical — the difference is in the framework infrastructure.

# ── Pure Python (skill_engine.py) ──────────────────────────────────────────
from skill_engine import SkillAgent
from dns_skills import list_dns_records, create_dns_record, ...
agent = SkillAgent(
skills=[list_dns_records, create_dns_record, find_dns_record,
update_dns_record, validate_dns, check_propagation],
instructions="You are a DNS agent...",
name="DNS Agent"
)
agent.run("Create api.yourdomain.com pointing to 203.0.113.50")
# ── Google ADK (demo_dns_adk.py) ────────────────────────────────────────────
from google.adk import Agent, Runner
from google.adk.sessions import InMemorySessionService
from dns_skills import list_dns_records, create_dns_record, ...
agent = Agent(
name="dns_agent",
model="gemini-2.5-flash",
tools=[list_dns_records, create_dns_record, find_dns_record,
update_dns_record, validate_dns, check_propagation],
instruction="You are a DNS agent..."
)
session_service = InMemorySessionService()
runner = Runner(agent=agent, session_service=session_service, app_name="dns_demo")

The skills (dns_skills.py) are exactly the same Python functions in both cases — nothing needs to be rewritten.

Defines the agent: model, tools and instructions.

agent = Agent(
name="dns_agent",
model="gemini-2.5-flash",
tools=[...], # The same Python functions from dns_skills.py
instruction="..." # System prompt — Layer 1
)

Orchestrates execution: connects the agent with the session service and manages the conversation cycle.

runner = Runner(
agent=agent,
session_service=session_service,
app_name="dns_demo"
)

Keeps conversation history in memory. ADK manages it automatically.

session_service = InMemorySessionService()
session = session_service.create_session(app_name="dns_demo", user_id="user")

ADK uses asyncio. The main function is async:

import asyncio
from google.genai import types
async def run_agent(user_message: str):
content = types.Content(
role="user",
parts=[types.Part(text=user_message)]
)
async for event in runner.run_async(
user_id="user",
session_id=session.id,
new_message=content
):
if event.is_final_response():
print(event.content.parts[0].text)
asyncio.run(run_agent("Create api.yourdomain.com pointing to 203.0.113.50"))
python examples/demo_dns_adk.py --demo # 3 pre-defined scenarios
python examples/demo_dns_adk.py # interactive mode
python examples/demo_dns_adk.py "your request" # direct mode

The output is equivalent to demo_dns.py — same scenarios, same behavior.

Pure Python (SkillAgent)Google ADK
DependenciesOnly google-genaiFull google-adk
Session stateDoesn’t persist between callsInMemorySessionService handles it
Multi-agent / A2ANot nativeNative support with RemoteA2aAgent
Ideal forSimple scripts, quick demosProduction systems, A2A integration