How tortextrx/ecoflow works
ecoFlow is a conversational assistant for managing ecoSoftWEB ERP records and documents. The principal workflow accepts chat text or an attachment, interprets intent, resolves entities and missing details, applies a confirmation-aware operation flow, invokes ERP tools, and returns a humanized response. Separate capabilities cover entities, services, contracts, articles, and invoicing; internal routes also support queued message processing and persistence. The README documents the cognitive, deterministic orchestration, response, and ERP-connector layers. Some implementation relationships are shown as unverified because the current orchestrator and most tool implementations were not sampled.
Main entry points: registry.py Tool registry · orchestrator.py Flow orchestrator · routes_internal.py Internal intake · chat_service.py Chat service
Components 25
Chat and ingress
- Chat endpoint
app/api/routes_chat.py - Internal intake
app/api/routes_internal.py
Conversation processing
- Chat service
app/services/chat_service.py - Flow orchestrator
app/services/orchestrator.py - Intent analysis
app/services/cognitive_service.py - Flow routing
app/services/orchestrator_routing.py - State logic
app/services/conversational_logic.py - Input normalization
app/services/normalizers.py - Entity resolution
app/services/resolver.py - Response generation
app/services/response_service.py
ERP operations
- Tool registry
app/services/tools/registry.py - Entity operations
app/services/tools/entidades_tools.py - Service operations
app/services/tools/servicios_tools.py - Contract operations
app/services/tools/contratos_tools.py - Article operations
app/services/tools/articulos_tools.py - Billing operations
app/services/tools/facturacion_tools.py - Document extraction
app/services/tools/extraer_documento.py
ERP integration
- ERP connectors
app/connectors - Entity mapper
app/mappers/entidades_mapper.py - Billing mapper
app/mappers/facturacion_mapper.py - LLM provider
app/providers/llm_provider.py
Persistence and jobs
- Application database
app/core/db.py - Data repositories
app/repositories - Job queue
app/core/job_queue.py
Other components
- ERP user
Connections 27
- ERP user → Chat endpoint: submits chat
app/api/routes_chat.py - Chat endpoint → Chat service: delegates handling
app/api/routes_chat.py - Chat service → Flow orchestrator: runs flow
app/services/chat_service.py - Chat service → Response generation: uses response
app/services/chat_service.py - Flow orchestrator → Intent analysis: classifies intent
- Flow orchestrator → Entity resolution: resolves entities
- Flow orchestrator → Tool registry: dispatches tools
- Flow orchestrator → Flow routing: uses flow detection
- Flow orchestrator → State logic: uses state logic
- Flow orchestrator → Input normalization: normalizes input
- Entity resolution → Tool registry: queries entities
app/services/resolver.py - Tool registry → Entity operations: registers tools
app/services/tools/registry.py - Tool registry → Service operations: registers tools
app/services/tools/registry.py - Tool registry → Contract operations: registers tools
app/services/tools/registry.py - Tool registry → Article operations: registers tools
app/services/tools/registry.py - Tool registry → Billing operations: registers tools
app/services/tools/registry.py - Tool registry → Document extraction: registers tools
app/services/tools/registry.py - ERP user → Internal intake: sends message
- Internal intake → Job queue: queues work
app/api/routes_internal.py - Internal intake → Application database: persists intake
app/api/routes_internal.py - Internal intake → Data repositories: uses job repository
app/api/routes_internal.py - Chat service → Data repositories: loads conversation
app/services/chat_service.py - Entity operations → ERP connectors: calls ERP
- Billing operations → ERP connectors: calls ERP
- Entity mapper → ERP connectors: builds ERP payload
- Billing mapper → ERP connectors: builds ERP payload
- Intent analysis → LLM provider: calls model