How niyatiswaroop/magicpin-vera-ai works
Vera is a deterministic outreach bot for the magicpin AI challenge. Its main workflow accepts versioned category, merchant, trigger, and customer contexts; resolves a trigger bundle on a periodic tick; composes and validates a personalized message; then records conversation and suppression state before returning an action. Merchant/customer replies follow a separate rule-based multi-turn path for intent detection, answers, and graceful exits. The graph also preserves category voice, trigger-kind specifications, and the optional local Ollama phrasing layer. Relationships reflect the README and shown imports/calls; unsampled implementation details are not inferred.
Main entry points: bot.py HTTP Endpoints · composer.py Message Composer · conversation_handlers.py Reply Handler · llm.py Local Model Client
Components 11
Bot API
- HTTP Endpoints
bot.py
Context State
- Versioned Contexts
store.py - Conversation State
store.py
Message Composition
- Message Composer
composer.py - Provenance and Rules
facts.py - Trigger Specifications
kinds.py - Category Voice
voice.py
Reply Handling
- Reply Handler
conversation_handlers.py
Optional Model
- Local Model Client
llm.py
Other components
- Challenge Harness
- Ollama Service
Connections 14
- Challenge Harness → HTTP Endpoints: pushes contexts
README.md - Challenge Harness → HTTP Endpoints: requests tick
README.md - Challenge Harness → HTTP Endpoints: sends reply
README.md - HTTP Endpoints → Versioned Contexts: stores and resolves
bot.py - HTTP Endpoints → Message Composer: composes action
bot.py - HTTP Endpoints → Reply Handler: routes reply
README.md - HTTP Endpoints → Conversation State: records turns
bot.py - Message Composer → Provenance and Rules: extracts and validates
composer.py - Message Composer → Trigger Specifications: selects specification
composer.py - Message Composer → Category Voice: builds voice plan
composer.py - Message Composer → Local Model Client: phrases optionally
README.md - Local Model Client → Ollama Service: requests completion
llm.py - Reply Handler → Conversation State: tracks inbound state
- HTTP Endpoints → Challenge Harness: returns actions
bot.py