Commit Graph

1444 Commits

Author SHA1 Message Date
Qwertgggnnmkxmxmxnxcnnc 2178963cf9 fix(composio): implement proper get_toolkit_by_slug with direct API call
- Replace pagination-based search with direct toolkit.retrieve() call
- Add fallback logic for auth_schemes to composio_managed_auth_schemes
- Fix issue where toolkits beyond default limit were not found
- Improve performance from O(n) to O(1) API calls
- Maintain same parsing logic as list_toolkits for consistency
2025-10-09 01:32:39 +03:00
Krishav Raj Singh 90ee3585cb fiix: get usage info in case of tool 2025-10-09 01:25:34 +05:30
Krishav Raj Singh c9c07c4860 update sandbox 2025-10-08 15:34:06 +05:30
Krishav Raj Singh 9a2ae7e09a fix: check healthy when init 2025-10-08 15:33:26 +05:30
Krishav Raj Singh a5d8edabc9 rm image from context 2025-10-08 07:42:49 +05:30
Krishav ae04dddf65
Merge pull request #1785 from KrishavRajSingh/main
remove fallback info
2025-10-08 00:54:28 +05:30
Krishav Raj Singh c7e8a9585d remove fallback info 2025-10-08 00:53:32 +05:30
Saumya 6a7999211b fix: remove pagination for kortix templates 2025-10-07 23:42:23 +05:30
Krishav Raj Singh 6baba64271 fix: typo 2025-10-07 21:14:20 +05:30
Krishav Raj Singh 15e073a5df fix: fallback to anthropic when rate limited by bedrock 2025-10-07 20:52:31 +05:30
Saumya ae81e8e403 fix: model preservation during update 2025-10-07 16:05:02 +05:30
Saumya 89a4996dfd fix: fix agent trigger installation 2025-10-07 15:33:44 +05:30
Saumya 44bd6470c0 fix: add model name for triggers 2025-10-06 23:30:16 +05:30
Saumya 9aad9f3014 add agent usage examples to preview dialog 2025-10-06 16:43:48 +05:30
marko-kraemer f0f14de35a refactor: move URL construction to frontend 2025-10-05 18:33:30 +02:00
marko-kraemer ddf2d32f59 feat(admin): add user thread viewer with admin access bypass
 Features:
- Add admin portal thread viewer with pagination
- Display thread list with project names and public status
- Add clickable links to view threads via /share/{thread_id}
- Add admin bypass for accessing all threads (public and private)

🔧 Backend Refactoring:
- Consolidate admin APIs into admin_api.py and billing_admin_api.py
- Remove unused files: users_admin.py, admin/api.py
- Remove unused endpoints: user search, grant-bulk-credits, migrate-user
- Update admin thread endpoint to use share URLs

 Performance:
- Remove message_count from UserThreadSummary (optimization)
- Remove N+1 query issue in thread listing

🔒 Authorization:
- Add admin role bypass in verify_and_authorize_thread_access
- Create RLS migration (20251005160000_admin_roles_access.sql)
- Update thread_select_policy for admin access
- Update message_select_policy for admin access
- Update project_select_policy for admin access
- Update agent_runs_select_policy for admin access

💻 Frontend:
- Add Threads tab to admin user details dialog
- Add useAdminUserThreads hook with pagination
- Remove unused admin hooks (useAdminUserSearch, useAdminAdvancedSearch)
- Display thread metadata with Open button and ExternalLink icon

🗃️ Database:
- Apply RLS policies allowing admin/super_admin roles to bypass restrictions
- Admins can now view any thread, message, project, or agent_run

This enables admins to view and debug any user's threads through the
share page interface, regardless of public/private status.
2025-10-05 18:09:26 +02:00
Marko Kraemer 7f89d96b45
Merge pull request #1777 from kortix-ai/refactor/simplify-backend-agent-handling
Remove workflows system; refactor/simplify backend agent handling
2025-10-04 17:56:08 -07:00
marko-kraemer 0c9c78ec40 wip 2025-10-05 02:55:08 +02:00
marko-kraemer 0ec17b0d3a refactor: completely remove workflow and playbook system
- Remove workflow_tool.py and all workflow-related backend code
- Delete all workflow database tables and create migration
- Remove workflow API endpoints and execution logic
- Clean workflow references from agent tools and triggers
- Remove playbooks tab and UI from agent configuration
- Eliminate workflow_id, workflow_input, and execution_type fields
- Simplify trigger system to agent-only execution
- Remove workflow tool definitions from tool registry
- Clean up TypeScript interfaces and remove workflow types
- Remove playbooks button from chat input
- Update all trigger components to remove workflow selection
- Clean workflow metadata from threads and sidebar
- Remove 80+ critical workflow code references

Simplifies codebase by eliminating complex dual-mode (agent/workflow)
execution system in favor of pure agent-based automation.
2025-10-05 01:51:44 +02:00
Krishav Raj Singh f11d612094 fix: update litellm 2025-10-05 05:17:54 +05:30
Krishav Raj Singh 64a1e9a2aa Revert "hotfix: compression"
This reverts commit 6dad29b3dd.
2025-10-05 05:16:43 +05:30
marko-kraemer c62ea28237 refactor: remove deprecated code and endpoints
- Removed deprecated GET /agent-runs/{agent_run_id} endpoint from threads.py (20 lines)
- Removed unimplemented delete_mcp_server() method from mcp_server_service.py (12 lines)
- Removed deprecated 'sync' and 'update-all' commands from manage_suna_agents.py script (9 lines)
- Cleaned up 41 lines of dead/deprecated code
- No functional impact as these were already marked deprecated or non-functional
2025-10-04 22:45:41 +02:00
marko-kraemer 8b7bc36d5f refactor: consolidate duplicate account lookup logic
- Extracted get_account_id_from_thread() to auth_utils.py (new shared utility)
- Refactored 2 identical _get_current_account_id() methods:
  * tools/agent_builder_tools/base_tool.py (reduced 23 lines → 9 lines)
  * tools/sb_upload_file_tool.py (reduced 23 lines → 9 lines)
- Simplified agent_creation_tool.py's version for consistency
- Eliminated 28+ lines of duplicate code
- Centralized thread→account lookup logic in one place
2025-10-04 22:45:09 +02:00
marko-kraemer 5383897977 refactor: remove redundant code - eliminate 7 workspace_path duplications
- Removed redundant workspace_path='/workspace' from 7 sandbox tool files
  * sb_files_tool.py
  * sb_shell_tool.py
  * sb_deploy_tool.py
  * sb_templates_tool.py
  * sb_upload_file_tool.py
  * sb_presentation_tool.py
  * sb_web_dev_tool.py

- Base class SandboxToolsBase already sets this on line 23
- Eliminates 7 lines of duplicate code
- All tools now inherit workspace_path from base

- Converted sb_upload_file_tool.py to use centralized db_helpers
  * Removed DBConnection import
  * Uses get_initialized_db() instead
2025-10-04 22:43:46 +02:00
marko-kraemer 98e9196d41 refactor: simplify backend - fix naming conflicts and centralize DB dependencies
Backend improvements:
- Fixed duplicate TemplateService naming conflict:
  * Renamed marketplace_service.py::TemplateService → MarketplaceService
  * Eliminates confusion between two classes with same name

- Created centralized DB dependency helpers (db_helpers.py):
  * get_db() - FastAPI dependency for DB connection (singleton)
  * get_db_client() - Returns initialized Supabase client
  * get_initialized_db() - For module-level backward compatibility
  * Addresses 100+ DBConnection() instantiations across 53 files

- Applied new DB helpers to high-usage files:
  * services/api_keys_api.py - Now uses get_db() dependency
  * templates/services/marketplace_service.py - Uses get_initialized_db()

- Comprehensive simplification analysis document:
  * Identified 9 modules with duplicate initialize() patterns
  * Documented large files needing breakdown (1700-2000 lines)
  * Analyzed 35 tool files for common patterns
  * Prioritized recommendations for future work

Frontend cleanup:
- Removed unused template preview components and pages
2025-10-04 22:40:16 +02:00
marko-kraemer 8d7e85de4c refactor: massive backend simplification - eliminate 450+ lines of duplicate code
- Created unified AgentLoader for all agent data operations
- Eliminated 8 manual AgentResponse constructions across codebase
- Reduced agent_runs.py complexity by 163 lines (85→35 lines in 2 functions)
- Reduced core_utils.py from 553→69 lines (-87%)
- Extracted focused utility modules:
  * utils/icon_generator.py (179 lines)
  * utils/limits_checker.py (245 lines)
  * utils/run_management.py (145 lines)
  * utils/project_helpers.py (113 lines)
  * utils/mcp_helpers.py (41 lines)
- Fixed duplicate router inclusions in api.py
- Renamed template_service.py → marketplace_service.py for clarity
- Reduced template transformer from 73→17 lines (-77%)
- Inlined module-specific helpers (moved agent_run access check)
- Fixed version data false alarm warnings
- Updated AgentResponse model to support optional fields for list operations

Total impact: ~450 lines of duplicate code eliminated, dramatically improved maintainability
2025-10-04 22:32:51 +02:00
Krishav Raj Singh 6dad29b3dd hotfix: compression 2025-10-05 00:47:47 +05:30
Saumya 550b9f42ce Merge branch 'main' of https://github.com/kortix-ai/suna into fix-ui-bugs 2025-10-04 03:06:43 +05:30
Saumya 056150059f fix usage deduction 2025-10-04 03:05:54 +05:30
Saumya 381081964f fix billing calculation 2025-10-03 23:18:07 +05:30
Krishav Raj Singh 6d208ef7f3 fix: present_presentation in ppt grp 2025-10-03 21:50:07 +05:30
marko-kraemer 85c4ae00e7 Remove usage_example decorator and all usages 2025-10-03 12:24:36 +02:00
Saumya faf1114c8f Merge branch 'main' of https://github.com/kortix-ai/suna into fix-ui-bugs 2025-10-03 14:58:37 +05:30
marko-kraemer 31c0f8b348 registry fix 2025-10-03 11:10:01 +02:00
Saumya c00bc82b2b Merge branch 'main' of https://github.com/kortix-ai/suna into fix-ui-bugs 2025-10-02 21:51:07 +05:30
Krishav Raj Singh 5c08628394 update description 2025-10-02 15:39:52 +05:30
Krishav Raj Singh ca94a759a9 compress and omit if exceeds context window 2025-10-02 15:05:59 +05:30
Saumya 6f02f398d3 Merge branch 'main' into fix-ui-bugs 2025-10-02 00:36:03 +05:30
Bobbie 7ff206157d
Merge pull request #1767 from escapade-mckv/prebuilt-agents
Prebuilt agents
2025-10-01 22:58:31 +05:30
marko-kraemer e0250092a6 temp reg anthropic 2025-10-01 17:05:03 +02:00
marko-kraemer 6f467c35c0 1m ctxt bedrock 2025-10-01 15:44:02 +02:00
Saumya ccbfe7d975 Merge branch 'main' of https://github.com/kortix-ai/suna into prebuilt-agents 2025-10-01 12:19:15 +05:30
Saumya 9b0e1f94ad fix: scheduled trigger ui fix 2025-10-01 12:19:03 +05:30
Krishav Raj Singh 3506e0b39e fix: load image 2025-10-01 07:47:18 +05:30
marko-kraemer d8100cb7a0 Add Sonnet 4.5 and centralize model configuration system
- Add Claude Sonnet 4.5 (global.anthropic.claude-sonnet-4-5-20250929-v1:0) to registry
- Update all Anthropic models to use bedrock/converse/ endpoint with full ARNs
- Create comprehensive ModelConfig class for centralized provider settings
- Add alias system with raw ARNs for proper LiteLLM response resolution
- Refactor response processor to preserve exact LiteLLM response objects
- Simplify LLM service by merging prepare_params into make_llm_api_call
- Set stream_options include_usage as universal default for all models
- Remove scattered configuration functions in favor of registry-driven approach
- Fix pricing lookup by mapping provider model IDs back to registry entries
2025-10-01 01:32:24 +02:00
marko-kraemer 2b5b8cc0bc Add Sonnet 4.5 model and fix LiteLLM response handling
- Add Claude Sonnet 4.5 (global.anthropic.claude-sonnet-4-5-20250929-v1:0) to model registry
- Update all Anthropic models to use bedrock/converse/ endpoint with full ARNs
- Restore alias system for proper model ID resolution from LiteLLM responses
- Refactor response processor to preserve exact LiteLLM response objects
- Fix pricing lookup by mapping raw ARNs to registry model IDs via aliases
2025-10-01 00:55:24 +02:00
Bobbie b82e0f757f
Merge pull request #1759 from escapade-mckv/research-agent
Research agent
2025-09-30 21:01:41 +05:30
Saumya 87e83e37a3 disable doc parser tool 2025-09-30 20:56:47 +05:30
Saumya 4908f174d6 chore: research agent v1 2025-09-30 20:53:55 +05:30
marko-kraemer f8ab7059b7 fixes 2025-09-29 22:52:49 +02:00