agents.memory_reorganized.search.labs.agent¶
Labs Agent implementation.
Provides interactive project automation with tools and workflows. Similar to Perplexity’s Labs feature that creates apps, dashboards, and automated workflows.
Classes¶
Agent for interactive project automation with tools and workflows. |
Module Contents¶
- class agents.memory_reorganized.search.labs.agent.LabsAgent(name='labs_agent', engine=None, search_tools=None, enable_code_execution=True, **kwargs)¶
Bases:
haive.agents.memory.search.base.BaseSearchAgent
Agent for interactive project automation with tools and workflows.
Mimics Perplexity’s Labs feature by providing comprehensive project automation, including data analysis, visualization creation, app development, and workflow execution.
Features: - Multi-tool integration (Python, SQL, visualization libraries) - Interactive app creation (dashboards, websites, slideshows) - Code execution and data analysis - Asset management and organization - Workflow automation - Real-time collaboration tools
Capabilities: - Data analysis and visualization - Interactive dashboard creation - Basic web app development - Chart and image generation - CSV and data processing - Code execution and debugging
Examples
Basic usage:
agent = LabsAgent( name="labs", engine=AugLLMConfig(temperature=0.3) ) response = await agent.process_labs_project( "Create a dashboard analyzing sales data", data_sources=["sales_data.csv"] )
With specific tools:
response = await agent.process_labs_project( "Build an interactive chart showing trends", required_tools=["pandas", "plotly", "d3.js"], create_interactive_app=True )
Initialize the Labs Agent.
- Parameters:
name (str) – Agent identifier
engine (Optional[haive.core.engine.aug_llm.AugLLMConfig]) – LLM configuration (defaults to optimized settings)
search_tools (list[langchain_core.tools.Tool] | None) – Optional search tools
enable_code_execution (bool) – Enable code execution capabilities
**kwargs – Additional arguments passed to parent
- create_interactive_apps(workflow_steps)¶
Create interactive apps from workflow results.
- create_project_assets(workflow_steps)¶
Create project assets from workflow results.
- async execute_workflow_step(step_plan, step_index)¶
Execute a single workflow step.
- get_response_model()¶
Get the response model for Labs.
- Return type:
type[haive.agents.memory.search.base.SearchResponse]
- plan_project_workflow(query, project_type, data_sources)¶
Plan the workflow steps for a project.
- async process_labs_project(query, project_type='analysis', data_sources=None, required_tools=None, create_interactive_app=True, max_work_time=600, save_to_memory=True)¶
Process a Labs project with comprehensive automation.
- Parameters:
- Returns:
Labs response with project results
- Return type:
haive.agents.memory.search.labs.models.LabsResponse
- async process_search(query, context=None, save_to_memory=True)¶
Process a search query with default Labs settings.