AWS Builder Center
Weekend Creative Agent Challenge: NRW KITA Space Scout & Spot Predictor Agent

Weekend Creative Agent Challenge: NRW KITA Space Scout & Spot Predictor Agent

An autonomous serverless AI agent that monitors KITA (Kindertageseinrichtung) vacancy data across North Rhine-Westphalia, matches parents with available spots, and generates personalized daily briefings plus formal application letters — all in German, fully GDPR-compliant.

Vision & What It Does

In North Rhine-Westphalia (NRW), Germany, over 100,000 families are waiting for a childcare spot (KITA-Platz). The search process is exhausting: parents must manually check availability across dozens of facilities, write formal application letters in German bureaucratic style (Amtssprache), and repeat this daily because spots appear and disappear without warning. Most parents have full-time jobs and simply cannot dedicate this time every morning.
NRW KITA Space Scout is an always-on autonomous agent that solves this problem by doing the work while parents sleep. Every morning at 07:00 CET, without any human triggering a button or opening an app, the agent:
  1. Ingests the latest  KITA  facility data from NRW's official open government data portal ( KiBiz.web , licensed under Datenlizenz Deutschland 2.0)
  1. Simulates vacancy availability using probability distributions (real-time vacancy APIs don't exist yet in  NRW )
  1. Matches each registered parent's profile against available spots using a composite scoring algorithm (proximity 40%, vacancy count 30%, pedagogical preference overlap 30%)
  1. Generates a warm, personalized German daily briefing via Amazon Bedrock — summarizing today's matches with context on why each KITA is a good fit
  1. Drafts formal German application letters (Bewerbungsschreiben) in DIN 5008 format for the top matches — properly addressed to the KITA director, referencing the child's age and the family's specific reasons for choosing that facility
  1. Delivers everything to the parent's inbox via Amazon SES before they wake up
The parent opens their email to find a complete daily briefing and ready-to-send application letters. The best tool is the one you never have to open — and that's exactly what this agent achieves.
This is not a toy demo. It's built as a production-grade, multi-tenant, GDPR-compliant system with a real landing page, user registration, and proper German data privacy compliance (Datenschutzerklärung, Impressum, TTDSG cookie consent). Parents register once, set their preferences, and the agent handles everything from that point forward — autonomously, every single day.



How I Built It

The Real Problem

I live in NRW and have seen firsthand how desperate the KITA situation is. The existing portals (like Little Bird in Cologne) let you register interest in up to 5 facilities per year, but they don't proactively notify you about new openings, don't match your preferences, and definitely don't write your application letters. I wanted to build something that truly removes the burden from parents.

Key Technical Decisions

Spec-Driven Development with Kiro: Before writing a single line of code, I used Kiro's spec workflow to generate comprehensive requirements (20 user stories in EARS notation), a detailed design document (DynamoDB single-table schema, TypeScript interfaces, Bedrock prompt templates), and 34 sequenced implementation tasks. This gave me a clear roadmap and prevented scope creep during the weekend build.
Single-Table DynamoDB Design: Instead of multiple tables, I designed a single DynamoDB table with two GSIs that handles 9 entity types (parents, KITAs, vacancies, matches, briefings, letters, notifications, config, rate limits). This keeps costs low and enables efficient access patterns without joins.
Step Functions over Simple Lambda Chains: The pipeline has error handling at every stage. If Bedrock throttles during letter generation for one parent, it doesn't block other parents. The Map state processes parents in parallel batches of 5, with retry logic and exponential backoff.
Prompt Engineering in German: Getting Bedrock to produce natural, formal German (not Google-Translate-German) required careful prompt engineering. The system prompt establishes the tone (formal Amtssprache for letters, warm Sie-form for briefings), and user messages use structured templates with sanitized variables — never raw user input in system prompts. This also prevents prompt injection.

Challenges & Solutions

Challenge 1: No real vacancy data exists. NRW publishes facility information (name, address, groups, places) but not real-time availability. I solved this by building a vacancy simulator with configurable probability distributions (5-15% of places marked available per day). The architecture is designed so that when real APIs become available, swapping in the real data source requires changing only one Lambda module.
Challenge 2: Cost protection at scale. A malicious user could theoretically trigger thousands of Bedrock invocations. I built a three-tier cost defense: per-tenant daily token caps (5,000 tokens/user/day), a global circuit breaker (trips at 500,000 total tokens/day), and CloudWatch alarms that fire at $10 daily spend. The circuit breaker auto-resets at midnight UTC.
Challenge 3: German data privacy law. This isn't just GDPR — Germany has additional requirements (TTDSG for cookies, TMG for Impressum). I implemented: no cookies before consent, explicit opt-in checkboxes (not pre-checked), self-service data export (Art. 20), self-service account deletion (Art. 17 cascade delete), and proper legal pages in German.



AWS Services Used / Architecture Overview

Architecture Diagram

EventBridge Scheduler (daily 07:00 CET)
│
▼
Step Functions (Standard Workflow)
│
├── Lambda: DataIngestion ──→ NRW Open Data (WFS/GeoJSON)
│ ──→ DynamoDB (KITA + Vacancy entities)
│ ──→ S3 (raw archive)
│
├── Lambda: ProfileMatcher ──→ DynamoDB (query parents × vacancies)
│ ──→ DynamoDB (write match records)
│
├── [Map: parallel per parent batch]
│ ├── Lambda: BriefingGenerator ──→ Amazon Bedrock (Claude Haiku)
│ │ ──→ DynamoDB (store briefing)
│ └── Lambda: LetterGenerator ───→ Amazon Bedrock (Claude Haiku)
│ ──→ DynamoDB (store letters)
│
└── Lambda: NotificationDispatcher ──→ Amazon SES (email)
──→ Amazon SNS (SMS)
NRW KITA Space Scout & Spot Prediction Agent - AWS Architecture


AWS Services

Service
Role
Why This Service
Amazon Bedrock (Claude 3 Haiku)
Generates personalized German briefings and formal application letters
Pay-per-token, no GPU management, excellent German language quality
AWS Lambda (Node.js 20, ARM64)
6 functions: ingestion, matching, briefing gen, letter gen, notification, API
Serverless compute, zero idle cost, ARM64 for 20% cost savings
Amazon DynamoDB
Single-table design storing all entities (parents, KITAs, matches, letters)
On-demand billing, millisecond latency, built-in encryption, TTL auto-cleanup
AWS Step Functions
Orchestrates the daily pipeline with error handling and parallel processing
Visual workflow, built-in retry/catch, Map state for fan-out
Amazon EventBridge Scheduler
Triggers the pipeline daily at 07:00 CET
Timezone-aware cron, no polling, direct Step Functions integration
Amazon SES
Delivers daily briefing emails with generated letters
Low cost ($0.10/1000 emails), high deliverability, DKIM/SPF
Amazon SNS
SMS notifications for opt-in parents
Optional channel, spending limits built-in
Amazon Cognito
User authentication with Advanced Security
Managed auth, adaptive MFA, compromised credential detection, GDPR deletion support
Amazon S3
Static website hosting (React SPA) + raw data archive
CloudFront origin, lifecycle policies, encryption at rest
Amazon CloudFront
CDN for the landing page and SPA
Global edge caching, HTTPS enforcement, WAF integration
AWS WAF v2
Bot protection, rate limiting, geo-restriction
Managed rules (CommonRuleSet, BotControl), per-IP rate limits
Amazon CloudWatch
Metrics, structured logs, alarms, security dashboard
Cost tracking (Bedrock token usage), anomaly detection
AWS X-Ray
End-to-end distributed tracing across all Lambdas
Pipeline performance visibility, bottleneck identification
AWS CDK (TypeScript)
Infrastructure as Code — 9 stacks
Type-safe, testable, version-controlled infrastructure

Cost (Free Tier Friendly)

The entire system runs well within AWS Free Tier for low usage. At scale (1,000 parents), estimated monthly cost is approximately $35-45. The primary cost driver is Bedrock token usage, which is controlled by per-tenant and global caps.



What I Learned

1. Bedrock's German Language Quality is Impressive

Claude 3 Haiku produces remarkably natural formal German. The generated Bewerbungsschreiben (application letters) read like they were written by a native speaker, not translated. The key was being very specific in the system prompt about tone (Amtssprache), format (DIN 5008), and what NOT to include (no hallucinated phone numbers).

2. Single-Table DynamoDB is Worth the Upfront Design Cost

Designing the access patterns upfront took significant thought, but the payoff is a system with one table, two GSIs, and sub-millisecond queries for every operation. No provisioned capacity, no joins, no connection pools. For serverless systems with well-understood access patterns, single-table design is the way to go.

3. Cost Circuit Breakers are Essential for AI Agents

Any autonomous agent that calls a pay-per-token API needs kill switches. Without my circuit breaker, a runaway loop could burn through hundreds of dollars before anyone notices. The pattern is simple: increment a DynamoDB counter on every Bedrock call, trip the breaker at the threshold, auto-reset daily.

4. German Data Privacy is More Than GDPR

Building for Germany means dealing with three layers: GDPR (EU), BDSG (German federal), and TTDSG (German cookie law). The practical impact: no cookies without consent, mandatory Impressum with your real address, and the privacy policy needs to name the specific supervisory authority (LDI NRW). It's doable, but you need to know about it before you build.

5. Spec-Driven Development Saved My Weekend

Having the full spec (requirements, design, tasks) generated before coding meant I never had to stop and think "what's next?" or make architectural decisions under time pressure. The dependency graph in tasks.md told me exactly what could be parallelized. I could focus entirely on implementation.

6. EventBridge Scheduler + Step Functions = Perfect Agent Orchestration

This combination is the ideal "set it and forget it" pattern for autonomous agents. EventBridge handles the "when" (timezone-aware cron), Step Functions handles the "what happens if something fails" (retry, catch, continue). The agent has been running daily without intervention since deployment.



Link to App or Repo

The repository contains:
  • Complete AWS CDK infrastructure (9 stacks, TypeScript)
  • All Lambda function source code with TypeScript types
  • React SPA frontend with landing page, registration, and dashboard
  • Bedrock prompt templates (German system prompts + Handlebars user templates)
  • Data seeding scripts for NRW KITA facilities
  • Integration tests
  • Full documentation (architecture, security, GDPR, API)
Evidence of Autonomous Operation: The EventBridge rule  cron(0 6 * * ? *)  triggers the Step Functions state machine daily. CloudWatch logs and Step Functions execution history show the pipeline running without manual initiation. Screenshots of execution history and delivered emails are included in the repository's  /docs/evidence/  directory.

Disclaimer

This project is built for educational and learning purposes as part of the AWS Weekend Challenge. It is a technical demonstration and prototype — not a production service offered to the public. No real user data is collected or processed in a live environment. The KITA vacancy data shown is simulated and does not represent actual availability from any childcare facility. While I have made every effort to design the system with GDPR, BDSG, and TTDSG compliance in mind, this is a learning project built within a weekend timeframe. Errors or omissions in legal compliance may exist. This project should not be taken as legal advice or as a reference implementation for German data protection law. If you identify any compliance issues or have suggestions, I welcome feedback. The goal is to learn and demonstrate what's possible with AWS serverless and generative AI — not to operate a regulated service.


Built with Amazon Bedrock, AWS Lambda, DynamoDB, Step Functions, EventBridge, SES, Cognito, S3, CloudFront, WAF, and CDK. Data sourced under Datenlizenz Deutschland 2.0 from MKJFGFI NRW via open.nrw.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article