How vinicius-d-lima/emporio-da-musica-agente- works
Empório Agent is a Portuguese-language customer-service prototype for a musical-instrument store. A customer enters a message through the CLI; the agent builds policy and conversation context, consults an LLM, dispatches validated tool calls for catalogue, pricing, instalments or verified order status, then returns a response and persists conversation history. The major commerce capabilities and policy context are represented separately. Edges are limited to relationships visible in excerpts, the source index or README; unsampled intent and data-loading internals are not wired speculatively.
Main entry points: agent.py Conversation agent · __init__.py Tool registry · promotions.py Promotions and pricing · products.py Product catalogue
Components 20
Customer interface
- CLI
src/emporio_agent/cli.py
Conversation orchestration
- Conversation agent
src/emporio_agent/agent.py - Intent handling
src/emporio_agent/intent.py - Runtime configuration
src/emporio_agent/config.py
Model and context
- Prompt assembly
src/emporio_agent/prompts.py - Policy context
src/emporio_agent/policies.py - Partner stores
data/processed/lojas_parceiras.json - Store policy manual
data/processed/politicas.md - Provider client
src/emporio_agent/llm.py
Commerce capabilities
- Tool registry
src/emporio_agent/tools/__init__.py - Tool argument schemas
src/emporio_agent/schemas.py - Product catalogue
src/emporio_agent/tools/products.py - Promotions and pricing
src/emporio_agent/tools/promotions.py - Instalment simulation
src/emporio_agent/tools/payments.py - Order verification and status
src/emporio_agent/tools/orders.py
Persistence and store data
- Conversation memory
src/emporio_agent/memory.py - SQLite access controls
src/emporio_agent/db.py - Store and conversation database
Other components
- Customer
- Gemini / Groq
Connections 31
- Customer → CLI: sends message
README.md - CLI → Conversation agent: submits message
src/emporio_agent/cli.py - CLI → Conversation memory: resumes conversation
src/emporio_agent/cli.py - Conversation agent → Provider client: requests completion
src/emporio_agent/agent.py - Conversation agent → Prompt assembly: builds context
src/emporio_agent/agent.py - Conversation agent → Conversation memory: loads and saves
src/emporio_agent/agent.py - Conversation agent → Tool registry: dispatches tools
src/emporio_agent/agent.py - Conversation agent → Tool argument schemas: validates arguments
src/emporio_agent/agent.py - Conversation agent → Intent handling: classifies messages
- Prompt assembly → Policy context: gets policy context
src/emporio_agent/prompts.py - Prompt assembly → Partner stores: reads store list
src/emporio_agent/prompts.py - Policy context → Store policy manual: uses policy rules
- Provider client → Runtime configuration: loads provider settings
src/emporio_agent/llm.py - Provider client → Gemini / Groq: calls provider
README.md - Tool registry → Product catalogue: registers tools
src/emporio_agent/tools/__init__.py - Tool registry → Promotions and pricing: registers tools
src/emporio_agent/tools/__init__.py - Tool registry → Instalment simulation: registers tools
src/emporio_agent/tools/__init__.py - Tool registry → Order verification and status: registers tools
src/emporio_agent/tools/__init__.py - Product catalogue → Tool argument schemas: validates inputs
src/emporio_agent/tools/products.py - Product catalogue → SQLite access controls: queries catalogue
src/emporio_agent/tools/products.py - Promotions and pricing → Tool argument schemas: validates inputs
src/emporio_agent/tools/promotions.py - Promotions and pricing → SQLite access controls: queries promotions
src/emporio_agent/tools/promotions.py - Promotions and pricing → Product catalogue: matches product names
src/emporio_agent/tools/promotions.py - Instalment simulation → Product catalogue: checks availability
src/emporio_agent/tools/payments.py - Instalment simulation → Promotions and pricing: gets effective price
src/emporio_agent/tools/payments.py - Instalment simulation → Tool argument schemas: validates inputs
src/emporio_agent/tools/payments.py - Order verification and status → SQLite access controls: queries orders
src/emporio_agent/tools/orders.py - Order verification and status → Conversation memory: records verification
src/emporio_agent/tools/orders.py - Order verification and status → Tool argument schemas: validates inputs
src/emporio_agent/tools/orders.py - Conversation memory → SQLite access controls: persists history
src/emporio_agent/memory.py - SQLite access controls → Store and conversation database: opens SQLite
src/emporio_agent/db.py