Agent Tools & Capabilities
Introduction
The OpsHub Agent System provides 144+ specialized tools that enable AI agents to automate investment operations workflows. These tools transform natural language requests into concrete actions across spreadsheets, databases, dashboards, compliance systems, and more.Tool Execution Model
Key Characteristics:- Tenant-Isolated: Every tool call is scoped to the user’s organization and team
- Audited: All tool executions are logged to
audit.audit_logfor compliance - Type-Safe: Pydantic schemas ensure valid parameters
- Context-Aware: Tools access workspace context (active portfolio, date, page)
- Human-in-the-Loop: Critical operations require user approval via draft system
Tool Categories
Priority Tiers
Tools are organized into priority tiers based on usage frequency:| Tier | Usage | Tool Count | Examples |
|---|---|---|---|
| P0 Critical | 50-80% of conversations | 4 tools | fetch_and_display, prepare_spreadsheet_workspace |
| P1 High Priority | 30-40% of conversations | 7 tools | nl_query, create_spreadsheet_chart, emit_agent_insight |
| P2 Feature | 10-30% of conversations | 15 tools | generate_report, validate_compliance, query_resource_details |
| Specialized | 5-10% of conversations | 107 tools | Domain-specific tools for advanced workflows |
P0 Critical Tools (4 Tools)
prepare_spreadsheet_workspace - Set up spreadsheet environment
prepare_spreadsheet_workspace - Set up spreadsheet environment
- User asks to “add data to a spreadsheet”
- Before inserting data into sheets
- Creating new workbooks
fetch_and_display - Universal data retrieval and display
fetch_and_display - Universal data retrieval and display
- User wants to see database data in any UI component
- “Show me portfolios”, “Add holdings to sheet”, “Create dashboard”
spreadsheet- Univer Sheets (Excel-like grids)document- Univer Docs (rich text documents)slide- Univer Slides (presentations)widget- Dashboard widgetsdashboard- Full dashboard layoutsformula- Formula builder interfaceauto- Automatic detection based on workspace context
fetch_and_insert_to_spreadsheet - Atomic spreadsheet data insertion
fetch_and_insert_to_spreadsheet - Atomic spreadsheet data insertion
- User explicitly wants data in a spreadsheet
- Reliability is critical (one-step operation reduces failure points)
insert_data_to_spreadsheet - Insert pre-fetched data
insert_data_to_spreadsheet - Insert pre-fetched data
- You already have data from another tool call
- Inserting transformed or filtered data
data parameter. Always pass the data array from previous query results.P1 High Priority Tools (7 Tools)
Data Access & Querying
nl_query - Natural language to SQL (PRIMARY data access)
nl_query - Natural language to SQL (PRIMARY data access)
- Converts natural language to SQL using GPT-4 with full schema context
- Validates SQL for safety (blocks DROP, DELETE, etc.)
- Executes query with row limits
- Formats results in natural language
- Stores query history for learning
- Auto-filters by selected portfolio/date if available
- Focuses on relevant tables from current page context
- Uses active dashboard/workflow state to scope queries
- Use for ALL data retrieval questions
- Let the tool handle SQL generation (don’t write SQL manually)
- Check
confidencescore - warn user if < 0.7 - Review
warningsarray for potential issues
get_query_history - Learn from past queries
get_query_history - Learn from past queries
- Understanding common query patterns
- Finding examples for similar questions
- Debugging failed queries
Visualization & Analysis
create_spreadsheet_chart - Visualize data in sheets
create_spreadsheet_chart - Visualize data in sheets
line- Time series, trendsbar- Comparisons, rankingspie- Composition, percentagesscatter- Correlations, distributionsarea- Cumulative values
create_pivot_table - Aggregate and summarize
create_pivot_table - Aggregate and summarize
spreadsheet_analyze - AI-powered data analysis
spreadsheet_analyze - AI-powered data analysis
Communication & Insights
emit_agent_insight - Proactive recommendations
emit_agent_insight - Proactive recommendations
info- Informational messageswarning- Potential issues requiring attentionrisk- Risk alerts and compliance concernsdependency- Workflow dependencies and blockers
- Discovered issues during analysis
- Proactive risk identification
- Workflow status updates
- Dependency alerts
record_agent_draft - Propose changes for approval
record_agent_draft - Propose changes for approval
- Data modifications
- Compliance approvals
- Workflow changes
- High-risk operations
apply_agent_draft - Execute approved changes
apply_agent_draft - Execute approved changes
Spreadsheet Automation (6 Tools)
Spreadsheet Manipulation Tools
Spreadsheet Manipulation Tools
spreadsheet_set_cell
Set a single cell value (text, number, boolean).spreadsheet_get_cell
Read a cell’s value, formula, and formatting.spreadsheet_set_formula
Create calculated cells with Excel-style formulas.Supported Functions:- Math:
SUM(),AVERAGE(),MIN(),MAX(),ROUND() - Logic:
IF(),AND(),OR(),NOT() - Text:
CONCATENATE(),LEFT(),RIGHT()
spreadsheet_select_range
Highlight a range of cells for user attention.spreadsheet_insert_row
Insert one or more blank rows.select_spreadsheet_cell
Select a specific cell to direct user focus.Database Operations (5 Tools)
Database Query & Schema Tools
Database Query & Schema Tools
execute_database_query
Execute SQL queries with automatic tenant isolation.nl_query over this tool. Use execute_database_query only when you need direct SQL control for complex queries.get_schema_info
Retrieve database schema metadata (tables, columns, relationships).get_table_summary
Get table statistics (row counts, column types, sample data).query_resource_details
Fetch detailed information about a specific resource (portfolio, fund, security).get_database_catalog
List all accessible schemas and tables for current user.Natural Language Query (2 Tools)
Already covered in P1 High Priority Tools:nl_query- Convert natural language to SQLget_query_history- Learn from past queries
Breach & Anomaly Detection (4 Tools)
Predictive Analytics & Alerts
Predictive Analytics & Alerts
Reconciliation (2 Tools)
Compliance & Governance (6 Tools)
ASIC RG94 Compliance Tools
ASIC RG94 Compliance Tools
check_compliance
Validate action against regulatory requirements (SOX, ASIC RG94, AIFMD).request_approval
Initiate approval workflow for compliance-sensitive actions.submit_approval_decision
Approve or reject a pending approval request.get_pending_approvals
Retrieve approvals awaiting decision.generate_compliance_report
Generate regulatory compliance reports.Report Types:sox_audit- Sarbanes-Oxley audit trailrg94_validation- ASIC RG94 validation summaryaifmd- AIFMD valuation complianceagent_activity- AI agent action auditapproval_workflow- Approval workflow report
verify_audit_integrity
Verify completeness and integrity of audit logs.Report Generation (3 Tools)
Automated Reporting
Automated Reporting
generate_report
Generate regulatory and operational reports.Report Types:nav_certification- Daily NAV certificationbreach_summary- Validation breach reportreconciliation_status- Reconciliation summaryperformance_attribution- Performance analysiscompliance_summary- Compliance status
list_report_templates
Browse available report templates.schedule_report
Schedule recurring report generation.Workflow Generation (3 Tools)
Scheduling Optimization (3 Tools)
Smart Suggestions (5 Tools)
Context-Aware Automation Suggestions
Context-Aware Automation Suggestions
generate_suggestions
Generate context-aware automation suggestions.apply_suggestion
Apply a suggestion with one click.undo_suggestion
Rollback a previously applied suggestion.provide_suggestion_feedback
Improve suggestions through feedback.get_suggestion_stats
Retrieve suggestion performance metrics.Agent Delegation (3 Tools)
Memory & Context (4 Tools)
Document Extraction (2 Tools)
Explainability & HITL (3 Tools)
Self-Healing Workflows (2 Tools)
Analytics & Performance (4 Tools)
Dashboard Control (8 Tools)
Dashboard Builder Automation
Dashboard Builder Automation
create_dashboard
Create new dashboard from template or scratch.add_widget
Add widget to dashboard.configure_widget
Update existing widget configuration.remove_widget
Remove widget from dashboard.apply_dashboard_filter
Apply global filters to dashboard.export_dashboard
Export dashboard to PDF, PNG, JSON, or Excel.submit_dashboard_for_approval
Submit dashboard for compliance approval.get_dashboard_details
Retrieve dashboard configuration and widgets.Data Modeler Control (9 Tools)
Visual Query Builder Automation
Visual Query Builder Automation
add_table_to_canvas
Add table to visual query builder canvas.create_join
Create join between tables.add_filter
Add filter to query.add_calculation
Add calculated field.select_columns
Choose columns to include in query.generate_sql
Generate SQL from visual query.preview_query_results
Preview query results before execution.save_query
Save query for reuse.export_query_results
Export query results to various formats.Navigation & UI Control (14 Tools)
Complete Frontend Automation
Complete Frontend Automation
navigate_to_page
Navigate to specific page/view.open_modal
Open modal dialog.close_modal
Close active modal.click_button
Trigger button click.fill_form_field
Populate form field.submit_form
Submit form.select_tab
Switch to specific tab.toggle_sidebar
Show/hide sidebar.show_notification
Display toast notification.scroll_to_element
Scroll to specific element.highlight_element
Highlight element for user attention.open_context_menu
Open context menu.trigger_keyboard_shortcut
Simulate keyboard shortcut.update_url_params
Update URL parameters without navigation.ETL Control (13 Tools)
Data Pipeline Automation
Data Pipeline Automation
create_pipeline
Create new data pipeline.configure_source
Configure data source.map_fields
Map source fields to destination schema.add_transformation
Add data transformation rule.add_validation_rule
Add data quality validation.add_data_quality_check
Add data quality check.configure_schedule
Schedule pipeline execution.run_pipeline
Execute pipeline immediately.get_pipeline_status
Check pipeline execution status.get_pipeline_logs
Retrieve pipeline execution logs.view_data_lineage
View data lineage graph.export_pipeline_config
Export pipeline configuration.clone_pipeline
Duplicate existing pipeline.Valuation Tools (5 Tools)
Private Equity Valuation Suite
Private Equity Valuation Suite
calculate_dcf_valuation
Perform Discounted Cash Flow valuation.calculate_comparable_companies
Calculate valuation based on comparable companies.validate_valuation_assumptions
Validate reasonableness of valuation assumptions.generate_investment_memo
Generate investment memo document.generate_investment_recommendation
Generate investment recommendation based on analysis.Spectacle Visualization (5 Tools)
Spectacle Chart & Dashboard Creation
Spectacle Chart & Dashboard Creation
create_spectacle_chart
Create chart using Spectacle library.create_spectacle_dashboard
Create dashboard with Spectacle.add_spectacle_widget
Add widget to Spectacle dashboard.create_spectacle_slide
Create presentation slide with Spectacle.export_spectacle_visualization
Export Spectacle visualization.Lexical Document Editor (6 Tools)
Multi-Option Tools (3 Tools)
Tool Selection Guide
When to Use Which Tool?
User Asks a Question
nl_queryConvert natural language to SQL and return formatted results.Example: “Which portfolios are underperforming?”User Wants Data in Spreadsheet
fetch_and_display or fetch_and_insert_to_spreadsheetAtomic operation to fetch and insert data.Example: “Add holdings to the sheet”User Requests a Report
generate_reportGenerate formatted reports with templates.Example: “Generate NAV certification report”User Wants to Create a Dashboard
create_dashboard + add_widgetBuild custom dashboards programmatically.Example: “Create a risk monitoring dashboard”User Needs Compliance Check
check_complianceValidate against regulatory requirements.Example: “Is this NAV variance compliant?”User Asks for Automation
generate_workflow + generate_suggestionsCreate workflows and suggest automations.Example: “Automate daily NAV validation”Decision Tree
Tool Security & Permissions
Tenant Isolation
Every tool execution is wrapped with tenant context injection:- Data Isolation: Users only see their organization’s data
- Audit Trail: Every tool call logged with tenant context
- Quota Enforcement: Rate limits per tenant
- Permission Checks: IAM-based access control
Row-Level Security (RLS)
Database queries automatically filtered by RLS policies:- ✅
iam.*- Identity and access management - ✅
vault.*- Credential storage (admin-only) - ✅
agent.*- Agent sessions and drafts - ✅
investment.*- Portfolio and holdings data - ✅
validation.*- Compliance validation data - ✅
audit.*- Audit logs (compliance/admin only)
Permission Model
IAM Roles:ADMIN- Full system access (GLOBAL scope)FUND_MANAGER- Manage funds and strategies (ORGANIZATION scope)PORTFOLIO_MANAGER- Manage portfolios (TEAM scope)OPERATIONS_LEAD- Operational activities (ORGANIZATION scope)COMPLIANCE_OFFICER- Compliance and audits (ORGANIZATION scope)VIEWER- Read-only access (TEAM scope)
| Tool Category | Viewer | Portfolio Manager | Operations Lead | Compliance Officer | Admin |
|---|---|---|---|---|---|
| Data Query | ✅ Read | ✅ Read | ✅ Read | ✅ Read | ✅ Full |
| Spreadsheet | ✅ Read | ✅ Full | ✅ Full | ✅ Read | ✅ Full |
| Reports | ✅ Read | ✅ Generate | ✅ Generate | ✅ Full | ✅ Full |
| Compliance | ❌ | ❌ | ✅ Check | ✅ Full | ✅ Full |
| Workflows | ❌ | ❌ | ✅ Full | ✅ Read | ✅ Full |
| Approvals | ❌ | ✅ Request | ✅ Approve | ✅ Approve | ✅ Full |
| Admin Tools | ❌ | ❌ | ❌ | ❌ | ✅ Full |
- Data modifications (
UPDATE,DELETE) - Compliance approvals
- Workflow changes
- Always use the draft system for high-risk operations
Tool Execution Flow
Standard Execution
Human-in-the-Loop Execution
Error Handling
Tool Performance Characteristics
Latency Benchmarks
| Tool Category | P50 Latency | P95 Latency | Notes |
|---|---|---|---|
| nl_query | 2.5s | 5.0s | Includes GPT-4 reasoning + SQL execution |
| Database Query | 150ms | 500ms | Direct SQL, no AI |
| Spreadsheet | 50ms | 200ms | Client-side execution |
| Dashboard | 300ms | 1.0s | Multiple widget queries |
| Report Generation | 5.0s | 15.0s | Includes PDF rendering |
| Workflow Generation | 3.0s | 8.0s | AI workflow definition generation |
| Compliance Check | 200ms | 600ms | Rule evaluation |
Optimization Tips
- Use
nl_queryfor complex questions (caches schema) - Use
execute_database_queryfor repeated queries (skip AI reasoning) - Specify
max_resultsto limit data transfer - Use workspace context filters to scope queries
- Use P0 tools (
fetch_and_display,prepare_spreadsheet_workspace) for common tasks - Always use drafts for high-risk operations
- Check tool return status before proceeding
- Provide clear error messages to users
Creating Custom Tools
Developers can extend the agent system with custom tools. See Advanced: Custom Tool Development for details.Tool Template
Registering Custom Tools
Summary
Tool Statistics
- Total Tools: 133 tools
- P0 Critical: 4 tools (50-80% usage)
- P1 High Priority: 7 tools (30-40% usage)
- P2 Feature: 15 tools (10-30% usage)
- Specialized: 107 tools (5-10% usage)
Coverage Areas
Data Access
- Natural language query
- Direct SQL execution
- Schema inspection
- Resource details
Automation
- Spreadsheet manipulation
- Dashboard creation
- Workflow generation
- Report automation
Intelligence
- Breach prediction
- Anomaly detection
- Auto-reconciliation
- Smart suggestions
Governance
- Compliance checks
- Approval workflows
- Audit trails
- ASIC RG94 validation
Collaboration
- Agent delegation
- Multi-agent coordination
- Draft system
- User feedback
Insights
- Explainable AI
- Memory & learning
- Performance analytics
- ROI calculation
Next Steps
Agent Profiles
Integration Patterns
Custom Tool Development
Security & Compliance
- API Documentation: See
/docs/api/agent-api.yamlfor OpenAPI specs - Developer Guide: See
opshub-agent-backend/README.md - Support: Contact support@opshub.ai