
Weekend Creative Agent Challenge: Chola Heritage - From Thanjavur to the World
Chola Heritage transforms ancient Tamil/Chola knowledge into daily AI stories, connecting Thanjavur’s heritage with modern global ideas.
Series: Weekend Challenge (3 articles)
- 3Weekend Creative Agent Challenge: Chola Heritage - From Thanjavur to the World This article
What if an AI agent could wake up every day, discover something from a civilization more than a thousand years old, and turn that knowledge into a story that helps the modern world see it differently?
That question led me to build Chola Heritage From Thanjavur to the World.
I wanted this project to be more than another AI chatbot or history website. I wanted to connect something deeply local to something global: Thanjavur, Tamil, Chola heritage, and modern technology.
The result is an always-on autonomous storytelling agent that creates a new Chola heritage story every day without anyone opening the application, entering a prompt, or pressing a Generate button.
The idea is simple:
Ancient Tamil knowledge → AI storytelling → Modern global perspective



Vision & What It Does
More than a thousand years ago, the Chola Dynasty of South India built one of the most sophisticated civilizations in human history. They engineered temples that still stand today, governed villages through elected assemblies, traded across the Indian Ocean, cast bronze sculptures using techniques that remain unsurpassed, and recorded everything in stone inscriptions that serve as a permanent public ledger.
Yet most of the world has never heard of them.
Chola Heritage is an autonomous AI storytelling agent that changes this. Every single day, without any human clicking a button or writing a prompt, the agent wakes up, selects a Chola topic it hasn't recently covered, and generates a complete cultural story in both Tamil and English that connects ancient Tamil knowledge to the modern world.
The core idea:
Ancient Tamil knowledge → AI storytelling → Modern global perspective
What it produces daily (autonomously):
- An engaging 500-800 word narrative that makes you feel like you're discovering the Chola world
- A natural Tamil version (not a translation written as if originally composed in Tamil)
- A global perspective explaining why someone in Berlin, Tokyo, or New York should care
- A modern connection linking the historical concept to today's technology, leadership, or sustainability
- Three "What Can the World Learn?" lessons
- Historical fact cards with source context
- A visual illustration prompt
What makes it different from a chatbot:
This is NOT a history Q&A bot. Nobody asks it anything. It autonomously decides what story to tell, generates it, validates it for historical accuracy, publishes it, and moves on. The next day, it picks a different topic. It has memory. It has variety. It runs whether anyone is watching or not.
How It Was Built
Architecture Philosophy
The guiding principle was: smallest reliable architecture that produces autonomous creative output.
No over-engineering. No unnecessary services. Every AWS resource exists because it directly serves the autonomous pipeline.
The Build Process
Step 1: Lambda Agent (the brain)
Built a TypeScript Lambda function that orchestrates the entire pipeline:
- Reads the current date
- Queries DynamoDB for recently covered topics (last 14 stories)
- Runs a weighted topic selection algorithm across 7 categories and 35 topics
- Calls Amazon Bedrock with a carefully engineered prompt (including a historical accuracy system prompt)
- Parses the JSON response
- Makes a second Bedrock call to validate historical accuracy
- Saves the complete story to S3
- Writes metadata to DynamoDB
- Logs the execution
Step 2: Topic Engine (the variety)
Created a topic selection system with weighted randomization. Categories that were recently used get lower weights. If all 35 topics have been used, the engine resets but still favors less-recent categories. Each day of the week also maps to a different creative format (Monday: Historical Story, Tuesday: Engineering Mystery, etc.).
Step 3: Historical Accuracy Guardrails (the responsibility)
This was non-negotiable. The agent has a dedicated system prompt that forbids inventing kings, fabricating inscriptions, or presenting speculation as fact. It must use hedging language ("Historical evidence suggests...", "Scholars generally understand..."). A separate validation call reviews the generated output before publishing.
Step 4: Web Application (the experience)
Built a Next.js static site with a temple-inspired design — gold/bronze/stone palette inspired by Thanjavur's architecture. The frontend fetches stories from a Lambda Function URL (the API layer). It includes a Tamil/English toggle, interactive timeline, topic explorer, global lessons mapping, and an agent activity dashboard showing timestamped execution logs.
Step 5: Infrastructure as Code (the deployment)
Everything deployed via AWS CDK in a single stack. One
cdk deploy creates the EventBridge schedule, both Lambda functions, S3 buckets, DynamoDB table, CloudFront distribution, and all IAM permissions.
AWS Services & Architecture

Amazon EventBridge Scheduler (cron: 0 8 * * ? *)
│
▼
AWS Lambda ─────────────────► Amazon CloudWatch
(Agent: chola-heritage-agent) (Logs)
│
▼
Amazon Bedrock (Nova Lite)
• Story generation
• Historical validation
│
┌────┴────┐
▼ ▼
Amazon S3 Amazon DynamoDB
(stories) (metadata + memory)
│ │
└────┬────┘
▼
AWS Lambda
(API: chola-heritage-api)
Lambda Function URL
│
▼
Amazon CloudFront → S3 (static site)
│
▼
Users (Browser)Services Used
Service | Role |
|---|---|
Amazon EventBridge | Autonomous daily trigger — cron(0 8 * * ? *) |
AWS Lambda (x2) | Agent execution + API serving |
Amazon Bedrock | AI generation (Nova Lite) — story + validation |
Amazon S3 (x2) | Story archive + static website hosting |
Amazon DynamoDB | Agent memory, metadata, run history (GSI for date queries) |
Amazon CloudFront | CDN for frontend, HTTPS, caching |
Amazon CloudWatch | Execution logs, monitoring |
AWS IAM | Least-privilege roles for Lambda |
AWS CDK | Infrastructure as Code — single-command deploy |
Key Design Decisions
- Lambda Function URL instead of API Gateway: simpler, cheaper, sufficient for this read-only API
- Single DynamoDB table with composite keys (pk/sk pattern): stories, runs, and stats all in one table with a GSI for date-based queries
- Static Next.js export instead of SSR: faster, cheaper, works perfectly with S3 + CloudFront
- Two separate Bedrock calls: one for generation, one for validation — separating creation from critique
- Nova Lite model: fast enough for the pipeline, capable enough for creative bilingual output
Challenges and Solutions
Challenge 1: Historical Accuracy Without a Knowledge Base
Problem: How do you prevent an AI from inventing Chola kings or fabricating temple inscriptions?
Solution: A two-layer approach:
- A detailed system prompt that establishes strict rules ("NEVER invent fictional kings") and provides known factual context (dates, names, events)
- A separate validation Bedrock call that reviews the generated output specifically for historical fabrications
The system prompt also enforces hedging language, so even valid content uses "Historical evidence suggests..." rather than stating things as absolute fact.
Challenge 2: Natural Tamil Output
Problem: Machine-translated Tamil reads poorly. The prompt needed to produce Tamil that sounds like it was originally written in Tamil.
Solution: Explicit instructions in the prompt: "This should NOT be a literal translation it should sound natural in Tamil, as if originally written in Tamil. Include cultural nuances that resonate with Tamil readers." The results aren't perfect, but they're significantly better than translation.
Challenge 3: Topic Repetition
Problem: An autonomous agent running daily could easily repeat the same popular topics (Brihadisvara Temple every other day).
Solution: Agent memory. Before selecting a topic, the agent queries DynamoDB for the last 14 topics used. The selection algorithm weights categories inversely to their recent usage. Categories used 3 times recently get a weight of 4; unused categories get a weight of 10.
Challenge 4: Bedrock Response Parsing
Problem: LLM output isn't always valid JSON. Sometimes it wraps in markdown code fences, sometimes it adds commentary.
Solution: A robust
extractJson() function that:- First checks for markdown code block wrappers (
\``json ... ````)
- Falls back to regex matching the first
{...}block
- Provides sensible defaults for any missing fields
Challenge 5: DynamoDB Undefined Values
Problem: The AWS SDK for JavaScript throws errors if any field in a DynamoDB PutCommand contains
undefined .Solution: Configured DynamoDB Document Client with
marshallOptions: { removeUndefinedValues: true } .
What Was Learned
1. Autonomous agents need memory
Without memory, the agent would produce repetitive content. The DynamoDB-backed topic history transforms it from "a thing that generates stories" into "a thing that curates a growing collection." Memory is what makes an agent feel intelligent over time.
2. Validation as a separate concern
Asking the same model to generate AND validate in one call doesn't work well. The model tends to approve its own output. Separating generation from validation with a different prompt persona for each produces more honest accuracy checks.
3. System prompts are the real engineering
The most impactful work wasn't the Lambda code or the CDK stack. It was crafting the system prompt. Getting the balance right between "creative and engaging" and "historically responsible" took the most iteration. The prompt is the product.
4. Static sites are underrated for agent frontends
A static Next.js export served via CloudFront is fast, cheap, and reliable. The dynamic content comes from the API. There's no reason to server-render when the stories change once per day.
5. Cultural AI needs cultural sensitivity
Building an AI system about a real civilization's heritage carries responsibility. The historical accuracy guardrails aren't just a technical feature they're an ethical requirement. Presenting made-up history about real people and real places would be harmful.
6. CDK makes complex infra simple
Nine AWS services, all wired together with correct permissions, deployed in one command. CDK's typed constructs caught several permission issues at synth time that would have been painful to debug in production.
Evidence of Autonomous Execution
1. Agent Activity Dashboard
The web application includes a dedicated dashboard showing:
- Agent status (Online)
- Last autonomous run date
- Next scheduled run date
- Total stories created
- Topics explored
- Activity log with timestamped steps
2. Timestamped Activity Logs
Each run produces a detailed log:
08:00:01 Agent triggered
08:00:02 Selected topic: Brihadisvara Temple (architecture)
08:00:05 Generated historical context
08:00:08 Generated Tamil story
08:00:10 Generated global perspective
08:00:12 Generated modern connection
08:00:14 Validated output
08:00:15 Saved to S3
08:00:15 Story published3. CloudWatch Logs
Every Lambda execution is logged with
[CholaAgent] prefix:[CholaAgent] Run started: 1787324004035-i87wpt53h3b
[CholaAgent] Date: 2026-08-21
[CholaAgent] Creative format: Global Comparison
[CholaAgent] Selected topic: Temple Sculptures and Carvings
[CholaAgent] Run completed successfully: The Living Stories Carved in Stone4. EventBridge Rule
The rule
chola-heritage-daily-story is visible in the AWS EventBridge console, configured as cron(0 8 * * ? *) targeting the Lambda function.5. DynamoDB Records
Each run creates records with timestamps:
{
"pk": "RUN#1787324004035-i87wpt53h3b",
"sk": "LOG",
"date": "2026-08-21",
"startTime": "2026-08-21T14:53:24.035Z",
"endTime": "2026-08-21T14:53:33.827Z",
"status": "success",
"topic": "Temple Sculptures and Carvings"
}6. Multiple Stories Already Generated
The agent has already produced multiple stories autonomously, each with different topics, demonstrating that the scheduling and topic diversity systems work:
- "The Living Stories Carved in Stone: A Journey Through Chola Temple Sculptures"
- "Rajadhiraja Chola: The Warrior King's Military Mastery"
Repository Link
Built for the AWS Weekend Creative Agent Challenge. The Chola Heritage agent runs autonomously every day, generating stories that bridge a thousand years of Tamil civilization with the modern world.
Thank you for taking the time to read my article! If you found it helpful, feel free to like, share, and drop your thoughts in the comments; I’d love to hear from you.
If you want to connect or dive deeper into cloud, AI and DevOps, feel free to follow me on my socials:
Series: Weekend Challenge (3 articles)
- 3Weekend Creative Agent Challenge: Chola Heritage - From Thanjavur to the World This article
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article