Building an AI Agent Front Door: Implementing llms.txt, robots.txt, and Sitemaps

The web is changing. AI agents like ChatGPT, Claude, and Perplexity are increasingly how people discover and interact with content. But these agents don't browse websites the way humans do—they need structured, efficient ways to understand what a site offers.
That's why I've implemented what I call an "AI Agent Front Door" on this site: a set of standards that help AI systems quickly understand who I am, what I do, and how to navigate my content.
The Problem: AI Agents Have Limited Context
When an AI agent visits a website, it faces a critical limitation: context windows. These systems can only process a limited amount of text at once, and most websites are filled with navigation menus, ads, JavaScript, and other elements that consume valuable tokens without providing useful information.
Imagine trying to understand a book by reading every page number, margin note, and publisher information along with the actual content. That's what AI agents face when crawling traditional websites.
The Solution: Three Key Files
I've implemented three files that work together to create a clear path for AI agents:
1. robots.txt - The Permission Layer
This file tells AI crawlers what they're allowed to access—though it's important to note that robots.txt is a suggestion, not enforcement. Ethical crawlers respect it, but bad actors can ignore it. Mine is simple:
User-agent: *
Allow: /
Sitemap: https://zackrylangford.com/sitemap.xml
This signals to all AI crawlers (GPTBot, ClaudeBot, PerplexityBot, etc.) that my content is open for indexing and points them to my sitemap for efficient discovery. Major AI companies like OpenAI, Anthropic, and Perplexity respect these directives, but if you need true enforcement, you'd need server-level blocking.
Enforcing the Rules: For bots that ignore robots.txt (like some aggressive scrapers), there are several options:
-
Vercel Firewall (WAF) - If you're on Vercel Pro, you can use their Web Application Firewall to block specific user agents, IP ranges, or patterns. Vercel even provides templates for blocking AI bots.
-
Next.js Middleware - Create
middleware.tsto check user agents and block bad actors:import { NextResponse } from 'next/server'; import type { NextRequest } from 'next/server'; const BLOCKED_BOTS = ['BadBot', 'Scraper', 'AlibabaBot']; export function middleware(request: NextRequest) { const userAgent = request.headers.get('user-agent') || ''; if (BLOCKED_BOTS.some(bot => userAgent.includes(bot))) { return new NextResponse('Forbidden', { status: 403 }); } return NextResponse.next(); } -
Rate Limiting - Use services like Upstash, Arcjet or build out a custom setup to limit requests per IP, preventing aggressive crawling regardless of user agent.
For my site, I'm starting with the cooperative approach (robots.txt) since I want ethical AI crawlers to access my content. If I see abuse in the future, I can add enforcement layers.
2. sitemap.xml - The Navigation Map
The sitemap provides a structured list of all pages on my site with metadata about update frequency and priority. For AI agents, this is like a table of contents that helps them understand the site structure without crawling every link.
My implementation dynamically generates the sitemap from my blog posts and portfolio items, ensuring it's always up-to-date as I publish new content.
3. llms.txt - The AI-Friendly Overview
This is the newest and most interesting piece. The llms.txt file is a proposed standard that provides a curated, markdown-formatted overview of your site specifically designed for Large Language Models.
The Emerging Landscape: While llms.txt is gaining traction for content discovery, it's worth noting that the AI agent ecosystem is rapidly evolving with multiple standards:
- llms.txt - What I'm using: Simple markdown file for content overview (proposed by Jeremy Howard)
- Model Context Protocol (MCP) - Anthropic's standard for agents to access tools and data sources
- Agent2Agent (A2A) - Google's protocol for agent-to-agent communication and collaboration
- Agent Network Protocol (ANP) - Open-source protocol aiming to be "the HTTP of the agentic web"
- agents.json - Metadata document (at
/.well-known/agent.json) describing agent capabilities
For now, I'm starting with llms.txt because it's the simplest to implement and directly addresses the content discovery problem. As these standards mature and gain adoption, I'll evaluate which ones make sense for my use case.
Here's what mine looks like:
# Zack Langford - Cloud Architect & Systems Designer
> I design and launch clear, scalable AWS architectures—automation, CI/CD, and cloud-native systems from concept to production.
Technology Assistant at Marshall District Library managing cloud infrastructure. Freelance Cloud Architect working with Nexus Technologies Group and LKF Marketing. AWS Certified Cloud Practitioner and Solutions Architect Associate.
**Tech Stack:** AWS (Lambda, DynamoDB, S3, API Gateway, CloudFormation), Infrastructure as Code (Terraform, CDK), CI/CD, DevOps, Next.js, Python, Node.js
**Contact:** Use the contact form or book a meeting directly through the site.
## About
- [About Me](https://zackrylangford.com/about): Professional background, skills, certifications, and experience
## Portfolio
- [Serverless Event Registration System](https://zackrylangford.com/portfolio/mdl-serverless-event-registration): AWS Lambda, DynamoDB, API Gateway event management system
- [ExoplanetHub Serverless Sync](https://zackrylangford.com/portfolio/exoplanethub-serverless-sync): Automated data synchronization using AWS services
- [WordPress on AWS Architecture](https://zackrylangford.com/portfolio/WordPress-Architecture-AWS): Scalable WordPress deployment on AWS infrastructure
- [AI-Integrated Personal Site](https://zackrylangford.com/portfolio/AI-integrated-site): This site - Next.js with AWS Bedrock AI agent
## Blog
- [Architecting in the Age of Agents](https://zackrylangford.com/blog/Architecting-in-the-age-of-agents): Thoughts on building for AI-first interactions
- [Why AI for My Blog](https://zackrylangford.com/blog/why-ai-for-blog): The reasoning behind AI integration
- [Introducing Myself](https://zackrylangford.com/blog/Introducing-Myself): Background and career journey
## Contact
- [Contact Form](https://zackrylangford.com/contact): Send me a message
- [Book a Meeting](https://zackrylangford.com/book): Schedule time via Cal.com integration
- Email: zack@cloudzack.com
- LinkedIn: https://www.linkedin.com/in/zackry-langford/
Think of it as an elevator pitch for AI systems—concise, structured, and pointing to the most important content.
Implementation in Next.js
Since I'm using Next.js 16 with the App Router, implementation was straightforward:
robots.txt - Created app/robots.ts using Next.js's MetadataRoute API:
import { MetadataRoute } from 'next';
export default function robots(): MetadataRoute.Robots {
return {
rules: { userAgent: '*', allow: '/' },
sitemap: 'https://zackrylangford.com/sitemap.xml',
};
}
sitemap.xml - Created app/sitemap.ts that dynamically generates from content:
import { MetadataRoute } from 'next';
import { getAllPosts } from '@/lib/blog';
import { getAllPortfolioItems } from '@/lib/portfolio';
export default function sitemap(): MetadataRoute.Sitemap {
const posts = getAllPosts();
const portfolioItems = getAllPortfolioItems();
// Generate sitemap entries...
}
llms.txt - For now, a static file in public/llms.txt. I may make this dynamic later as my content grows.
Why This Matters
This isn't just about being "AI-friendly"—it's about being discoverable in the future web. As AI agents become the primary way people find and interact with content, having these standards in place ensures:
- Discoverability: AI systems can find and understand my content
- Accuracy: They get correct, curated information about my work
- Efficiency: They don't waste tokens parsing irrelevant HTML
- Control: I decide what information is prioritized
What's Next
This is Phase 1 of building an "AI Agent Lane" on my site. Future phases include:
- Bot analytics to monitor which agents visit and identify bad actors
- Dynamic llms.txt generation as content grows
- Markdown versions of key pages (e.g.,
page.html.md) - Model Context Protocol (MCP) for richer agent interactions
- Middleware enforcement if needed for aggressive crawlers
Try It Yourself
You can see my implementation live:
If you're building a site and want to be AI-ready, start with these three files. They're simple to implement but make a significant difference in how AI systems understand and represent your work.
Resources
- llms.txt specification
- Next.js Metadata Files documentation
- Dark Visitors - Track AI agent traffic
Building something similar? I'd love to hear about your approach. Reach out or connect with me on LinkedIn.