482 Commits

Author SHA1 Message Date
4b808f9a30 Docs: MCP local clones and tool profiles
Document local-cloned MCP server layout, docker mounts, tool-call JSON protocol for local providers, profile routing behavior, and common gotchas. Add a brief pointer from the multi-bot Docker guide.

Made-with: Cursor
2026-03-31 12:53:34 -04:00
7050e032e8 Improve MCP tool calling and routing
Some checks failed
CI / Lint with ruff (pull_request) Failing after 47s
CI / Test Python 3.11 (pull_request) Successful in 51s
CI / Test Python 3.12 (pull_request) Successful in 50s
CI / Build package (pull_request) Has been cancelled
Add explicit JSON tool-call protocol for local providers, improve parsing of JSON-only tool calls, and add heuristic routing to MCP-capable profiles for repo/PR intents. Also document and mount local-cloned MCP servers and expand MCP env var handling.

Made-with: Cursor
2026-03-31 12:15:05 -04:00
93b34bc214 Enhance CalendarTool action handling
- Introduce logic to set default action to "list_events" when `action` is omitted and only a single key-value pair is present.
- Expand handling for various input scenarios to ensure correct action assignment based on known actions and input keys.
- Improve robustness of the coerced dictionary to accommodate different input formats.

Made-with: Cursor
2026-03-30 14:15:09 -04:00
a6bd3e0e9b Agent: tool profiles and profile-scoped MCP connections
- Extend tool profile helpers for MCP server key resolution and filtering
- Lazily connect/disconnect MCP servers per active profile in AgentLoop
- Harden MCP client (timeouts, tool naming, connect_mcp_server entry)
- Adjust context and tool modules to align with profile-aware tooling
- docker-compose: minor gateway/workspace notes

Made-with: Cursor
2026-03-30 13:27:46 -04:00
7901f090f9 Add per-agent workspaces and MCP/skills backlog doc
- Add agent_workspaces/{ilia,family,wife} skeletons (AGENTS, USER, SOUL, memory)
- Add scripts/init-agent-workspaces.sh to populate ~/.nanobot/workspaces/
- Mount ~/.nanobot/workspaces/{ilia,family,wife} in multi compose as /workspace
- Document Step 0 and layout in DOCKER_MULTI_BOT_GUIDE.md
- Track docs/mcp_and_skills_backlog.md (force-add; docs/ is gitignored)

Made-with: Cursor
2026-03-30 13:20:38 -04:00
d50183c3d7 feat(agent): tool profiles and LLM router (rebased on docker/merge base)
- tools.toolProfiles / tools.toolRouting in config; filter tools per turn
- Router picks profile; expandOnMissingTool widens to full registry once
- Wire gateway and CLI AgentLoop; ToolRegistry.get_definitions_subset
- Ruff: fix tool_routing exception handling and format touched files

Made-with: Cursor
2026-03-27 14:30:15 -04:00
a2ae3f0cea style: satisfy Ruff I001/W293 in agent package
- isort: reorder imports in __init__.py and loop.py
- Strip trailing whitespace on blank lines in context.py
- Use module-level ExecToolConfig/CronService and unquoted annotations in loop.py (fix F821)

Made-with: Cursor
2026-03-27 14:24:06 -04:00
5292f91548 Merge remote-tracking branch 'origin/feature/cleanup-providers-llama-only' into test-ci 2026-03-27 13:26:34 -04:00
1faabed3f1 Merge pull request 'Enhance CI workflow: add installation verification for key dependencies' (#3) from test-ci into feature/cleanup-providers-llama-only
Reviewed-on: #3
2026-03-27 12:23:30 -05:00
3a827cd0f8 Update .gitignore to include environment variable files with wildcard support 2026-03-27 13:07:13 -04:00
4f50cfac3c Add multi-bot Docker setup and improve MCP/tool reliability
Document and add multi-bot Docker workflows with env layering scripts, and update agent/tool configuration handling to make MCP/email/calendar behavior more robust for day-to-day operations.

Made-with: Cursor
2026-03-27 13:06:24 -04:00
daeeec7756 Add attachment_name filter and improve email attachment handling
- Add attachment_name parameter to filter emails by attachment filename (case-insensitive)
- Fix download_attachments parameter handling (was being filtered out)
- Improve attachment filename matching with Gmail-style prefix support
- Add comprehensive logging for attachment download operations
- Increase default limit from 10 to 100 for better attachment searches
- Handle nested parameters and string-to-boolean/int conversions
- Update AGENTS.md with attachment_name filter documentation
2026-03-10 14:34:27 -04:00
a947ffd149 Fix CI workflow: trigger on all PRs and feature branches
Some checks failed
CI / Lint with ruff (pull_request) Failing after 1m37s
CI / Test Python 3.11 (pull_request) Successful in 1m29s
CI / Test Python 3.12 (pull_request) Successful in 1m50s
CI / Build package (pull_request) Has been skipped
2026-03-06 14:01:20 -05:00
44366f96f1 Enhance CI workflow: add installation verification for key dependencies
- Include installation of nanobot with all dependencies and dev dependencies
- Add verification step to ensure key dependencies (pytest, ruff, pydantic, typer, litellm) are installed
2026-03-06 13:30:24 -05:00
98d7c0b788 Merge pull request 'feature/web-search-and-cron-improvements' (#2) from feature/web-search-and-cron-improvements into feature/cleanup-providers-llama-only
Reviewed-on: #2
2026-03-06 13:20:19 -05:00
2e71c21094 Enhance CalendarTool: include additional event details in output
- Request additional fields for events, including attendees and attachments
- Extract and display event end time, location, attendees, attachments, and description in the event listing
- Truncate long descriptions for better readability
2026-03-06 13:07:15 -05:00
5d80eab8bd Add CI workflow for testing and linting 2026-03-06 13:07:06 -05:00
6364a195c5 Calendar integration: add timezone config and fix tool call parsing
- Add timezone field to CalendarConfig for local timezone support
- Update CustomProvider to parse calendar tool calls from JSON in LLM responses
- Add pytz dependency to pyproject.toml for timezone handling
2026-03-06 12:42:45 -05:00
bc53dc6535 Fix calendar tool: improve event deletion and time parsing
- Add validation for placeholder event IDs in delete_event action
- Fix time parsing in update_event to use original event's date context
- Add _parse_time_with_date helper for date-aware time parsing
- Improve error messages to be more directive (STOP, DO NOT EXPLAIN)
- Update tool description to emphasize immediate execution
- Fix duration calculation in update_event to use original start/end times
- Improve list_events output with numbered events and LAST/FIRST markers
- Update AGENTS.md with explicit deletion workflow instructions
- Remove reference to non-existent delete_events_today action
2026-03-06 12:42:27 -05:00
bc5f169bc8 Fix calendar tool execution: add calendar to CustomProvider valid_tools list
- Added calendar and other missing tools to valid_tools whitelist in CustomProvider
- This fixes issue where calendar tool calls were shown in response instead of being executed
- Also added edit_file, cron, email to the whitelist for completeness
2026-03-05 16:52:34 -05:00
760a7d776e Add Google Calendar integration
- Add CalendarConfig to schema with OAuth2 credentials support
- Implement CalendarTool with list_events, create_event, and check_availability actions
- Add email parser utility for extracting meeting information from emails
- Register calendar tool in agent loop (auto-loaded when enabled)
- Add calendar skill documentation
- Update AGENTS.md with calendar integration instructions
- Add CALENDAR_SETUP.md with complete setup guide
- Add Google Calendar API dependencies to pyproject.toml
- Support time parsing for 'today', 'tomorrow', and various time formats (12/24-hour, am/pm)
- Ensure timezone-aware datetime handling for Google Calendar API compatibility
2026-03-05 16:29:33 -05:00
f39325c846 Fix spawn tool: clarify that task parameter must be natural language, not tool call syntax 2026-03-05 15:27:25 -05:00
32cef2df77 Update cron tool documentation and context improvements
- Update cron tool and skill documentation
- Update TOOLS.md with email tool documentation
- Context builder improvements
2026-03-05 15:15:25 -05:00
2e69dc7ca8 Fix email channel: skip progress updates and improve deduplication
- Skip progress updates (tool call hints) for email channel to prevent spam
- Mark skipped emails (from self/replies) as seen to avoid reprocessing
- Track skipped UIDs to prevent checking same emails repeatedly
- Reduce log noise by summarizing skipped emails instead of logging each one
2026-03-05 15:14:56 -05:00
a6d70f3d14 :more instructions for git commit 2026-03-04 15:03:18 -05:00
7db96541a6 Fix HTTPS to HTTP conversion for Gitea API 2026-03-04 15:01:31 -05:00
edb409bb0c Improve web search and cron scheduling
- Update web search to use ddgs package (renamed from duckduckgo_search)
- Add ddgs>=9.0.0 to dependencies in pyproject.toml
- Fix cron tool to handle recurring jobs with duration limits
  - When both every_seconds and in_seconds are provided, create multiple
    one-time jobs instead of ignoring every_seconds
  - Fixes issue where 'remind me every X for Y duration' only created
    a single reminder instead of multiple recurring reminders
2026-03-04 13:18:13 -05:00
192b975861 Merge pull request 'fix-cron-scheduled-tasks' (#1) from fix-cron-scheduled-tasks into feature/cleanup-providers-llama-only
Reviewed-on: #1
2026-03-04 12:04:57 -05:00
9c9c4e3ebf Add security configuration documentation
- Comprehensive security configuration guide for nanobot
- Production deployment security checklist
- Channel access control configuration
- API key and credential management
- Workspace and file system security settings
2026-03-03 13:13:42 -05:00
c46b0a7e37 Add cursor rules for nanobot security guidelines
- Document security restrictions and best practices
- Provide production deployment checklist
- Include tool-specific security rules
- Reference implementation files for security checks
2026-03-03 13:12:30 -05:00
7bff134cb5 Update cron skill documentation
- Add examples for in_seconds parameter usage
- Clarify when to use in_seconds vs at parameter
- Improve time expression examples
2026-03-03 13:11:20 -05:00
63d1edba91 Add Groq provider support and improve Ollama timeout handling
- Add Groq provider config for voice transcription support
- Pass Groq API key to Telegram channel for voice transcription
- Increase Ollama timeout settings (10min read timeout for slow GPU responses)
- Improve timeout handling in custom provider
2026-03-03 13:11:06 -05:00
7933245ec3 Improve agent instructions and documentation
- Clarify when NOT to use message tool (simple acknowledgments, normal conversation)
- Add guidance for natural conversational responses
- Update cron tool documentation with better examples
- Improve scheduled tasks documentation in AGENTS.md
2026-03-03 13:10:59 -05:00
096d76430b Improve agent reliability and error handling
- Add timeout protection (120s) for LLM provider calls
- Skip memory consolidation for CLI mode to avoid blocking
- Add timeout protection for memory consolidation (120s)
- Improve error handling with better logging
- Add parameter type coercion before validation
- Allow None values for optional parameters in validation
- Fix type coercion for memory updates (handle dict responses)
2026-03-03 13:10:53 -05:00
d9919828c5 Fix cron scheduled tasks not executing
- Add auto-start functionality to cron service when jobs are added
  if service is not running and event loop is available
- Add 'reminder' field to CronPayload to distinguish between
  simple reminders (send message directly) and tasks (execute via agent)
- Update cron tool to accept 'reminder' parameter
- Fix callback logic to check reminder field: reminders send directly,
  tasks are processed through agent
- Ensures both 'remind me to X' and 'schedule a task to do X' work correctly
2026-03-03 13:09:44 -05:00
ac334e9cf7 Enhance ReadFileTool for improved file reading capabilities
- Added support for PDF file extraction using pdftotext, with error handling for extraction failures.
- Updated tool description to clarify usage and file type support.
- Improved error messages for binary and non-UTF-8 encoded files.
- Updated ExecTool description to emphasize the importance of using read_file for reading files before executing commands.
2026-02-24 11:28:24 -05:00
d3cb1d0050 Add SETUP_GUIDE.md with improved alias instructions
- Enhanced alias section with clearer options
- Added examples for common nanobot commands
- Improved formatting and organization
2026-02-23 14:37:13 -05:00
02cf7fb4da Add debugging improvements and litellm workaround
- Enhanced logging in agent loop for better debugging
- Added workaround for litellm's os.getcwd() issue when directory is deleted
- Improved tool result logging and iteration tracking
2026-02-23 14:35:59 -05:00
3b0598d689 Improve LLM reliability for data analysis tasks
- Enhanced exec tool description with specific pandas/CSV examples
- Added JSON tool call parsing in custom_provider for Ollama compatibility
- Added timeouts to prevent hanging on slow LLM responses
- Improved guidance for Excel/CSV operations to reduce LLM errors

Changes:
- nanobot/agent/tools/shell.py: Added detailed examples in tool description
- nanobot/providers/custom_provider.py: Added JSON parsing fallback and timeouts
2026-02-23 14:35:21 -05:00
e6b5ead3fd Merge origin/main into feature branch
- Merged latest 166 commits from origin/main
- Resolved conflicts in .gitignore, commands.py, schema.py, providers/__init__.py, and registry.py
- Kept both local providers (Ollama, AirLLM) and new providers from main
- Preserved transformers 4.39.3 compatibility fixes
- Combined error handling improvements with new features
2026-02-18 13:03:19 -05:00
9c858699f3 Improve web search and error handling
- Add DuckDuckGo search fallback when Brave API key is not available
  - Web search now works without requiring an API key
  - Falls back to DuckDuckGo if BRAVE_API_KEY is not set
  - Maintains backward compatibility with Brave API when key is provided

- Improve error handling in agent CLI command
  - Better exception handling with traceback display
  - Prevents crashes from showing incomplete error messages
  - Improves debugging experience
2026-02-18 12:41:11 -05:00
7961bf1360 Fix transformers 4.39.3 compatibility issues with AirLLM
- Fix RoPE scaling compatibility: automatically convert unsupported 'llama3' type to 'linear' for local models
- Patch LlamaSdpaAttention to filter out position_embeddings argument that AirLLM passes but transformers 4.39.3 doesn't accept
- Add better error handling with specific guidance for compatibility issues
- Fix config file modification for local models with unsupported rope_scaling types
- Improve error messages to help diagnose transformers version compatibility issues

These fixes allow nanobot to work with transformers 4.39.3 and AirLLM.
2026-02-18 12:39:29 -05:00
f1faee54b6 Add automated setup script for installation and configuration 2026-02-18 10:28:47 -05:00
Xubin Ren
8de36d398f
docs: update news about release information 2026-02-18 23:09:55 +08:00
Re-bin
1f1f5b2d27 docs: update v0.1.4 release news 2026-02-18 14:41:13 +00:00
Re-bin
b14d4711c0 release: v0.1.4 2026-02-18 14:31:26 +00:00
Xubin Ren
92d279924f
Merge pull request #802 to enable stream intermediate progress
feat: stream intermediate progress to user during tool execution
2026-02-18 22:28:37 +08:00
Re-bin
715b2db24b feat: stream intermediate progress to user during tool execution 2026-02-18 14:23:51 +00:00
Re-bin
ce4f00529e Merge PR #713: scope sessions to workspace with migration and tool metadata 2026-02-18 05:16:00 +00:00
Re-bin
27a131830f refine: migrate legacy sessions on load and simplify get_history 2026-02-18 05:09:57 +00:00