Inspiration
Marketing teams waste 10+ hours weekly on repetitive content tasks - researching competitors, planning calendars, and analyzing performance. The TiDB AgentX Hackathon's focus on multi-step agentic AI was the perfect opportunity to automate this entire workflow with a truly autonomous system.
What it does
Contentr is an AI agent that automates content marketing using TiDB Serverless vector search. It runs a 6-step autonomous workflow:
- Data Ingestion - Pulls social content and generates OpenAI embeddings
- Vector Search - Uses TiDB cosine similarity to find content gaps
- AI Analysis - GPT-4 analyzes patterns and opportunities
- Strategy Generation - Creates optimized content calendars
- Performance Tracking - Monitors engagement metrics
- Continuous Optimization - Refines strategy based on results
The system delivers 90% time savings (10+ hours → 1 hour weekly) and 40% better engagement through data-driven insights.
How we built it
Backend: FastAPI with TiDB Serverless for vector search, Redis for caching, OpenAI GPT-4 for analysis
Frontend: Next.js 14 with TypeScript, Tailwind CSS styling
Key TiDB Integration:
-- Content similarity search
SELECT content_text, engagement_rate
FROM content_posts
ORDER BY VEC_COSINE_DISTANCE(content_embedding, :query_embedding)
LIMIT 10;
Architecture: Multi-step workflow where vector search results feed AI analysis, which generates strategy, creating true autonomous decision-making.
Challenges we ran into
Performance Optimization: Vector similarity searches needed optimization for real-time analysis. Implemented TiDB vector indexes to improve query performance.
Workflow Coordination: Managing 6 autonomous steps required careful state management and error handling between components.
Accomplishments that we're proud of
True Multi-Step Autonomy: Goes beyond simple chatbots to demonstrate genuine autonomous decision-making across 6 workflow steps
Advanced TiDB Usage: Leverages vector indexes, full-text search, JSON columns, and serverless auto-scaling
Production Quality: Complete with API documentation, live demos, and scalable architecture
Real Business Impact: Quantifiable 90% time savings and 40% engagement improvements
What we learned
Vector Search Optimization: Learned how to effectively use TiDB's vector capabilities for content similarity matching
Agentic AI Patterns: Building autonomous systems requires robust workflow orchestration, not just LLM chains
Real-World Applications: Successful AI products need deep domain understanding alongside technical implementation
What's next for Contentr - AI Content Marketing Automation
Short-term: Enhanced error handling, additional platforms (YouTube, TikTok), basic A/B testing
Medium-term: Team collaboration workflows, custom templates, more scheduling integrations
Focus on refining the core agentic workflow and gathering user feedback. Open-source MIT license enables community contributions.
Built With
- docker
- fastapi
- next.js
- openai-gpt-4
- python
- redis
- tailwindcss
- tidb-serverless
- typescript
Log in or sign up for Devpost to join the conversation.