Just a little sandbox for playing with Vercel's Python AI SDK (vercel-labs/ai-python).
An agent that brainstorms domain names for your idea and checks real
availability live — querying each TLD registry's RDAP server directly
(with a DNS-delegation fallback for TLDs like .io/.co that don't
publish RDAP). It iterates on the taken ones until it has a shortlist of
names you can actually register.
export ANTHROPIC_API_KEY=sk-ant-...
uv run domain_hunter.py "an AI-powered newsletter tool for domain investors"While it runs you'll see the agent's tool calls stream in real time:
⚙ checking a batch of domains…
✖️ domainbrief.com — taken
✅ namepulse.ai — available
🤔 hunthq.io — probably-available
…and it finishes with a ranked markdown table of confirmed-available names.
ai.Agentfrom the Vercel AI SDK runs the loop: model → tool calls → results → more brainstorming, until the model is satisfied.@ai.tool check_domainsis an async-generator ("streaming") tool: it yields per-domain progress that surfaces asPartialToolCallResultevents in the CLI, and its final yield (a JSON status map) becomes the tool result the model sees.- Availability statuses:
available(registry-confirmed),taken,probably-available(DNS-only TLDs — verify at a registrar),unknown. - Model:
anthropic:claude-opus-4-8by default; override withDOMAIN_HUNTER_MODEL(e.g.anthropic/claude-opus-4-8to route through the Vercel AI Gateway withAI_GATEWAY_API_KEY).