Commit Graph

572 Commits

Author SHA1 Message Date
AI Christianson fee23fcc21 add /v1/spawn-agent 2025-03-15 21:35:43 -04:00
AI Christianson 510e1016f8 make it so we have only one server entrypoint 2025-03-15 16:34:49 -04:00
AI Christianson 64a04e2535 make 1818 the default port 2025-03-15 16:24:34 -04:00
AI Christianson c18c4dbd22 session API endpoint 2025-03-15 16:12:17 -04:00
AI Christianson 77cfbdeca7 webui -> server 2025-03-15 15:14:56 -04:00
AI Christianson e0aab1021b use pydantic models 2025-03-15 14:29:42 -04:00
Ariel Frischer 6c159d39d4 feat(agent_utils.py): add get_model_name_from_chat_model function to improve model handling
refactor(build_agent_kwargs): simplify state modifier logic by using model name instead of model attribute
2025-03-15 09:48:52 -07:00
Ariel Frischer f1274b3164 refactor(anthropic_token_limiter.py): update model parameter type in state_modifier to BaseChatModel for better compatibility
feat(anthropic_token_limiter.py): add get_model_name_from_chat_model function to extract model name from BaseChatModel instances
style(anthropic_token_limiter.py): format code for better readability and consistency in function definitions and logging messages
2025-03-15 09:37:26 -07:00
Ariel Frischer bef504d756 fix(agent_utils.py): add check for model attribute to prevent errors when model does not have 'model' attribute 2025-03-15 09:23:01 -07:00
AI Christianson 75636f0477 webui -> server 2025-03-15 10:02:05 -04:00
Andrew 05eb50bd97
Update shell.py
adding windows support so shell commands run native without wsl
2025-03-14 16:37:32 -07:00
Andrew I. Christianson aaf09c5df6
Merge pull request #132 from ariel-frischer/fix-token-limiter-2
Fix Sonnet 3.7 Token Limiter - Adjust Effective Max Input Tokens
2025-03-14 16:42:39 -04:00
Ariel Frischer 92faf8fc2d feat(anthropic_token_limiter): add get_provider_and_model_for_agent_type function to streamline provider and model retrieval based on agent type
fix(anthropic_token_limiter): refactor get_model_token_limit to use the new get_provider_and_model_for_agent_type function for cleaner code
test(anthropic_token_limiter): add unit tests for get_provider_and_model_for_agent_type and adjust_claude_37_token_limit functions to ensure correctness and coverage
2025-03-14 13:31:51 -07:00
Ariel Frischer 29c9cac4f4 feat(main.py): reorganize litellm configuration to improve clarity and maintainability
feat(agent_utils.py): add model detection utilities for Claude 3.7 models
fix(agent_utils.py): update get_model_token_limit to handle Claude 3.7 token limits correctly
test(model_detection.py): add unit tests for model detection utilities
chore(agent_utils.py): remove deprecated is_anthropic_claude function and related tests
style(agent_utils.py): format code for better readability and consistency
2025-03-14 13:10:44 -07:00
Will 39ed523288 Removing get_aidr_executable as no longer a depedency 2025-03-14 15:29:11 -04:00
AI Christianson c511cefc67 add check for fallback handler 2025-03-13 08:48:51 -04:00
AI Christianson f08e9455b6 version bump 2025-03-13 07:17:26 -04:00
AI Christianson be0b566edb fix ERROR - Error getting expert guidance for planning: module 'ra_aid.agent_utils' has no attribute 'process_thinking_content' 2025-03-13 07:11:32 -04:00
AI Christianson be415ca968 fix config param error 2025-03-13 07:02:25 -04:00
AI Christianson 715d5f483d version bump 2025-03-13 07:02:25 -04:00
Ariel Frischer b6f0f6a577 fix(llm.py): remove unnecessary thinking_kwargs from ChatOpenAI parameters to streamline client creation 2025-03-12 11:50:32 -07:00
Ariel Frischer 77a256317a feat: add session and trajectory models to track application state and events
- Introduce a new `Session` model to store information about each program run, including command line arguments and environment details.
- Implement a `Trajectory` model to log significant events and errors during execution, enhancing debugging and monitoring capabilities.
- Update various repository classes to support session and trajectory management, allowing for better tracking of user interactions and system behavior.
- Modify existing functions to record relevant events in the trajectory, ensuring comprehensive logging of application activities.
- Enhance error handling by logging errors to the trajectory, providing insights into failures and system performance.

feat(vsc): add initial setup for VS Code extension "ra-aid" with essential files and configurations
chore(vsc): create tasks.json for managing build and watch tasks in VS Code
chore(vsc): add .vscodeignore to exclude unnecessary files from the extension package
docs(vsc): create CHANGELOG.md to document changes and updates for the extension
docs(vsc): add README.md with instructions and information about the extension
feat(vsc): include esbuild.js for building and bundling the extension
chore(vsc): add eslint.config.mjs for TypeScript linting configuration
chore(vsc): create package.json with dependencies and scripts for the extension
feat(vsc): implement extension logic in src/extension.ts with webview support
test(vsc): add initial test suite in extension.test.ts for extension functionality
chore(vsc): create tsconfig.json for TypeScript compiler options
docs(vsc): add vsc-extension-quickstart.md for guidance on extension development
2025-03-12 11:47:21 -07:00
Ariel Frischer fdd73f149c feat(agent_utils.py): add support for sonnet_35_state_modifier for Claude 3.5 models to enhance token management
chore(anthropic_message_utils.py): remove debug print statements to clean up code and improve readability
chore(anthropic_token_limiter.py): remove debug print statements and replace with logging for better monitoring
test(test_anthropic_token_limiter.py): update tests to verify correct behavior of sonnet_35_state_modifier without patching internal logic
2025-03-12 11:16:54 -07:00
AI Christianson 12d27952d5 add --show-cost flag 2025-03-12 10:21:06 -04:00
AI Christianson 826c53e01a improve prompts 2025-03-12 08:24:41 -04:00
Ariel Frischer 7cfbcb5a2e chore(anthropic_token_limiter.py): comment out max_input_tokens and related debug prints to clean up code and reduce clutter during execution 2025-03-12 00:12:39 -07:00
Ariel Frischer e42f281f94 chore(anthropic_message_utils.py): remove unused fix_anthropic_message_content function to clean up codebase
chore(anthropic_token_limiter.py): remove import of fix_anthropic_message_content as it is no longer needed
test: add unit tests for has_tool_use and is_tool_pair functions to ensure correct functionality
test: enhance test coverage for anthropic_trim_messages with tool use scenarios to validate message handling
2025-03-11 23:48:08 -07:00
Ariel Frischer 376d486db8 refactor(anthropic_message_utils.py): clean up whitespace and improve code readability by removing unnecessary blank lines and aligning code formatting
fix(anthropic_message_utils.py): add warning in docstring for anthropic_trim_messages function to indicate incomplete implementation and clarify behavior
fix(anthropic_message_utils.py): ensure consistent formatting in conditional statements and improve readability of logical checks
2025-03-11 23:38:31 -07:00
Ariel Frischer a3284c9d7e feat(anthropic_token_limiter.py): add dataclass import for future use and improve code readability by restructuring import statements 2025-03-11 23:37:20 -07:00
Ariel Frischer ee73c85b02 feat(anthropic_message_utils.py): add utilities for handling Anthropic-specific message formats and trimming to improve message processing
fix(agent_utils.py): remove debug print statement for max_input_tokens to clean up code
refactor(anthropic_token_limiter.py): update state_modifier to use anthropic_trim_messages for better token management and maintain message structure
2025-03-11 23:24:57 -07:00
Ariel Frischer 09ba1ee0b9 refactor(anthropic_token_limiter.py): rename messages_to_dict to message_to_dict for consistency and clarity
feat(anthropic_token_limiter.py): add convert_message_to_litellm_format function to standardize message format for litellm
fix(anthropic_token_limiter.py): update wrapped_token_counter to handle only BaseMessage objects and improve token counting logic
chore(anthropic_token_limiter.py): add debug print statements to track token counts before and after trimming messages
2025-03-11 21:26:57 -07:00
AI Christianson c8fbd942ac session model 2025-03-11 20:11:14 -04:00
Ariel Frischer 5c9a1e81d2 feat(main.py): refactor imports for better organization and readability
feat(main.py): add DEFAULT_MODEL constant to centralize model configuration
feat(main.py): enhance logging and error handling for better debugging
feat(main.py): implement state_modifier for managing token limits in agent state
feat(anthropic_token_limiter.py): create utilities for handling token limits with Anthropic models
feat(output.py): add print_messages_compact function for debugging message output
test(anthropic_token_limiter.py): add unit tests for token limit utilities and state management
2025-03-11 14:03:18 -07:00
AI Christianson ae9cf5021b record trajectory at all steps 2025-03-11 11:01:05 -04:00
AI Christianson 5d899d3d13 trajectory 2025-03-11 08:56:12 -04:00
AI Christianson d0985b6b84 store trajectory for tasks 2025-03-11 08:41:59 -04:00
AI Christianson 96093e8dfc trajectory for stage transitions 2025-03-11 08:34:08 -04:00
Ariel Frischer 4aa1b0ba93 refactor(agent_utils.py): remove unused run_research_agent and run_web_research_agent functions to clean up code and improve maintainability
refactor(agent_utils.py): import run_research_agent and run_web_research_agent from their respective modules to streamline the code structure and enhance clarity
2025-03-10 17:09:05 -07:00
Ariel Frischer c4b2d2bb51 fix(agent_utils.py): remove merge conflict markers and clean up imports to ensure code integrity
refactor(agent_utils.py): consolidate research agent imports for better organization and readability
2025-03-10 17:07:24 -07:00
Ariel Frischer 89e4556e7b feat: implement trajectory model and repository for tracking agent actions
This commit introduces a new `Trajectory` model to the database, which tracks the sequence of actions taken by agents, including tool executions and their results. The addition of the `TrajectoryRepository` allows for storing and retrieving these trajectories, enabling better analysis of agent behavior and debugging of issues.

Additionally, the commit refactors existing code to utilize the new repository and model, improving the overall architecture and maintainability of the codebase. This change is essential for enhancing the capabilities of the agent system and providing a more robust framework for future development.
2025-03-10 17:05:34 -07:00
Ariel Frischer 8f2adc7f61 fix(output.py): update subtitle text from "Total Cost" to "Cost" for clarity in cost information display 2025-03-10 17:01:00 -07:00
Ariel Frischer f43c5e72b6 feat(output.py): add get_cost_subtitle function to generate cost subtitles for agent output
refactor(output.py): simplify subtitle generation in print_agent_output function by using get_cost_subtitle
2025-03-10 16:58:39 -07:00
Ariel Frischer 416689b030 feat(agent_utils.py): pass callback to print_agent_output to track costs and tokens
feat(output.py): enhance print_agent_output to display cost and token information in the output panel
2025-03-10 16:51:42 -07:00
AI Christianson 909825bf1b refactor: extract get_most_recent_id 2025-03-10 19:37:39 -04:00
AI Christianson b3010bb649 add error info to trajectory records 2025-03-10 19:12:14 -04:00
AI Christianson 78983ec20b add trajectory table 2025-03-10 18:59:42 -04:00
AI Christianson a18998be0d add project info to reasoning assist prompts 2025-03-10 18:01:56 -04:00
AI Christianson 3db7cc2ca9 improve prompt 2025-03-10 17:47:31 -04:00
AI Christianson b5e4c64042 improve prompts; make list_directory more resilient 2025-03-10 16:41:09 -04:00
AI Christianson 7d579f5557 improve prompts 2025-03-10 15:37:38 -04:00