feat: add AI Digital Employee agent orchestrator with pipeline tracking
- New AgentPipeline model with JSONB pipeline_data for stages/leads/summary
- AgentOrchestrator service chains DiscoveryService search→analyze→outreach→auto-save
- 3 new API endpoints: POST /agent/start, GET /agent/pipelines, GET /agent/{id}
- Full Agent dashboard Vue component with stats, pipeline grid, leads table, outreach preview
- Sidebar redesigned with AI Agent as primary entry point
- Updated PROGRESS.md, AGENTS.md, DATABASE_SCHEMA.md with latest state
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
from sqlalchemy import Column, String, Integer, DateTime, Text
|
||||
from sqlalchemy.dialects.postgresql import UUID, JSONB
|
||||
from datetime import datetime
|
||||
from app.database import Base
|
||||
import uuid
|
||||
|
||||
|
||||
class AgentPipeline(Base):
|
||||
__tablename__ = "agent_pipelines"
|
||||
|
||||
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
user_id = Column(UUID(as_uuid=True), nullable=False, index=True)
|
||||
status = Column(String(50), default="running")
|
||||
progress = Column(Integer, default=0)
|
||||
product_name = Column(String(255), nullable=False)
|
||||
product_description = Column(Text, default="")
|
||||
target_market = Column(String(255), nullable=False)
|
||||
pipeline_data = Column(JSONB, default={
|
||||
"stages": {
|
||||
"discover": {"status": "pending", "message": ""},
|
||||
"analyze": {"status": "pending", "message": ""},
|
||||
"outreach": {"status": "pending", "message": ""},
|
||||
"complete": {"status": "pending", "message": ""},
|
||||
},
|
||||
"leads": [],
|
||||
"summary": {},
|
||||
})
|
||||
error_message = Column(Text)
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
||||
Reference in New Issue
Block a user