Skip to content

Disable openai telemetry when using ollama#2

Open
meirm wants to merge 52 commits intodisler:mainfrom
meirm:main
Open

Disable openai telemetry when using ollama#2
meirm wants to merge 52 commits intodisler:mainfrom
meirm:main

Conversation

@meirm
Copy link

@meirm meirm commented Aug 12, 2025

Disable OpenAI's telemetry collection when the Ollama provider is being used. This is likely a privacy/performance optimization since when using local Ollama models, there's no need for OpenAI telemetry to be active. The
change ensures cleaner operation when running with alternative LLM providers.

@meirm
Copy link
Author

meirm commented Aug 12, 2025

if you leave openai_key blank you get a warning error after running the nano-agent with an ollama model

Updated constants and data types to include 'lmstudio' as a valid provider.
Enhanced ProviderConfig to handle LMStudio-specific logic, including model creation, tracing, and availability checks.
Updated documentation to reflect these changes. This allows users to utilize LMStudio models seamlessly within the application.
Introduced a command file system that allows users to create reusable prompt templates, similar to Claude Code's structure. Users can now run commands using the syntax '/command arguments', enhancing the CLI's functionality.

Implemented an agent system that supports customizable agent personalities, allowing for tailored responses based on specific expertise. Agents are defined in markdown files and can be switched during interactive sessions.

Updated documentation to reflect these new features, including usage examples and command templates. This enhances user experience and flexibility in utilizing the Nano CLI.
Introduced a new configuration option 'show_welcome' to control the display of a welcome message when starting the interactive mode. The default setting is true, and users can toggle it using the commands '/welcome on' or '/welcome off'.

Updated the documentation to include details about the new configuration option and its usage. This enhances user experience by providing a friendly introduction to the interactive session.
…ling

Updated the agent loader to parse optional YAML frontmatter from agent markdown files. This allows for additional metadata such as 'name', 'description', 'keywords', and 'tools' to be defined directly in the agent files.

Introduced a new method to retrieve metadata for all available agents, improving the organization and accessibility of agent information.

Also added 'pyyaml' as a dependency to handle YAML parsing. This enhances the flexibility and usability of agent definitions within the Nano CLI.
Updated the Nano CLI to support additional providers, including 'ollama-native', allowing for better integration with various AI models. Introduced new command-line options for specifying custom API base URLs and keys, which override environment variables for greater flexibility.

Modified the README to include detailed instructions for using the new providers and configuration options. Updated the .env.sample file to reflect the new environment variables required for the Ollama and LMStudio providers. Enhanced tests to ensure proper functionality of the new features and configurations, improving overall reliability and user experience.
Changed the default model from 'gpt-5-mini' to 'gpt-oss:20b', which is a local open-source model that is efficient for most tasks. Updated the default provider from 'openai' to 'ollama' to align with recent enhancements in multi-provider support. This change improves the flexibility and performance of the nano agent codebase.
Updated the README to include a comprehensive quick start guide for end users and developers, detailing installation steps and usage examples for the nano-agent with Claude Desktop. Added new session management features to the CLI, allowing users to continue conversations, manage multiple sessions, and fine-tune model behavior with options for temperature and token limits.

Introduced a permission system for tool execution, enabling users to specify allowed and blocked tools and paths, enhancing security and control during agent operations. Updated the CLI commands to support these new features, improving overall user experience and functionality.
Updated the README to clarify installation options for end users and developers, providing distinct sections for installing from the internet and from a cloned repository. Improved the installation script to support local repository installations and added command-line arguments for better usability.

Enhanced the API key validation in the CLI to check for required keys based on the selected provider, improving error handling and user guidance. Added a new option to enable tracing for OpenAI agents, allowing users to track interactions more effectively. Updated relevant modules to accommodate these changes, ensuring a more robust and user-friendly experience.
Enhanced the CLI to provide clearer error messages when required API keys are missing or invalid. This change improves user experience by guiding users to resolve issues more effectively. Updated relevant documentation to reflect these changes, ensuring users have the necessary information for troubleshooting. Additionally, refined the command-line interface for better usability and consistency.
…tion

Eliminated python-dotenv from the dependencies and dev-dependencies sections in the uv.lock file, as it is no longer required. This streamlines the project configuration and reduces potential clutter.

Added a new read_only option to the CLI, allowing users to disable file system modifications for safer exploration. This enhances user experience by providing a mode for testing without altering the file system.

Improved API key validation in the FlexibleProviderConfig class to check for required environment variables and ensure the availability of the Ollama service. This change enhances error handling and provides clearer guidance for users when setting up their environment.
Added options for maximum tool calls and unlimited tool calls in the CLI, allowing users to control the number of iterations during agent execution. This improves user experience by providing flexibility in managing resource usage.

Introduced new agent tools for grep search and file search, enabling users to perform regex searches and find files based on name queries. These enhancements expand the capabilities of the nano-agent, making it more versatile for various tasks.

Updated relevant data models and response handling to accommodate the new features, ensuring a seamless integration into the existing framework.
Added the internal implementations for the grep search and file search tools, allowing users to perform regex searches and fuzzy filename searches. Each tool includes comprehensive error handling for invalid patterns and file access issues, enhancing robustness.

Introduced new raw tool functions for grep search and file search, which provide formatted results or error messages. Updated the tool registration to include these new functionalities, improving the overall capabilities of the nano-agent.

Enhanced documentation within the code to clarify the purpose and usage of the new features, ensuring maintainability and ease of understanding for future developers.
Deleted the README_ALT.md file, which contained redundant information, and updated README.md to provide a comprehensive overview of the Nano Agent. The README now includes essential details about installation, features, and usage examples, ensuring clarity and accessibility for users.

Updated the installation scripts to create a new YAML configuration file instead of JSON, enhancing the configuration management process. Improved the setup instructions and added sample configurations for better user guidance.

Bumped the version to 0.3.0 to reflect the changes made in this release, including new features and improvements in documentation and configuration handling.
…active mode

Added a reset of terminal attributes before exiting the interactive session to ensure proper terminal state. This change prevents potential display issues after the session ends.

Updated the error handling to check for the presence of metadata in the response object, improving the clarity of error details presented to the user. This enhances the user experience by providing more relevant information when errors occur.
Modified the evaluation results documentation to reflect the evolving nature of the Nano Agent, emphasizing its capabilities in cost-optimized agent delegation. Updated the HOP/LOP guide to include a comprehensive table of contents, core concepts, and implementation strategies, ensuring clarity and accessibility for users. Enhanced examples and best practices for using the HOP/LOP pattern, promoting efficient task delegation and model selection.

Additionally, refined the README and other documentation files to align with the evolving theme, improving overall consistency and user guidance across the codebase.
…improvements

Introduced a new 'init' command in the CLI to initialize or regenerate the nano-cli configuration file. This command allows users to set default provider and model options, and includes a force option to overwrite existing configurations. If the configuration file already exists, it displays the current configuration instead of overwriting it, enhancing user guidance.

Additionally, improved error handling in the nano agent by catching ModelBehaviorError exceptions. This includes specific handling for tool not found errors, providing users with a clear message about available tools and how to list them. These changes enhance the robustness and usability of the nano agent, ensuring users have the necessary information to troubleshoot effectively.
Introduced a new '--dev' option in the CLI to enable development mode, which provides detailed error messages for debugging purposes. This enhancement allows users to gain better insights into issues during execution.

Updated the data model to include a 'dev_mode' field, ensuring that the development mode setting is passed through the system. Enhanced error handling in the nano agent to return detailed information about tool not found errors when in development mode, improving user guidance and troubleshooting capabilities.

Additionally, refined the interactive session error messages for clarity, ensuring users receive accurate instructions for exiting the session. These changes collectively enhance the usability and robustness of the nano agent.
Updated the README files to introduce a flexible configuration system, interactive mode, and enhanced tool system. Key changes include detailed descriptions of the hierarchical YAML/JSON configuration, CLI enhancements, and expanded tool capabilities.

Reorganized core features into a more structured format, adding sections for commands and agents, hook system, and comprehensive documentation. Improved clarity and accessibility of installation instructions and usage patterns, ensuring users have a better understanding of the Nano Agent's capabilities.

Additionally, included testing infrastructure details and expanded test coverage information, promoting a robust development experience. These updates collectively enhance user guidance and align documentation with the latest features.
Modified the README to rename the 'grep_file' command to 'grep_search' for clarity on its functionality. Added a new section for version information in the release notes, detailing the addition of the `--version` flag in the CLI, which displays the current version (0.3.0). This change enhances user awareness of the tool's versioning and improves the overall documentation structure.

Updated the CLI to include a version callback function, allowing users to easily check the current version of the nano-cli. Additionally, registered new search tools in the capabilities list, ensuring they are recognized in the system. These updates collectively improve user guidance and align the documentation with the latest features.
Created a comprehensive guide for developing MCP servers with FastMCP, detailing installation, core concepts, and advanced features. This addition improves user understanding and provides a structured approach to building with the framework.

Implemented a fix for event loop management in the nano agent, addressing `RuntimeError: Event loop is closed` issues. Introduced a new hook executor and simplified hook manager to ensure proper execution of hooks without conflicting event loops. Updated installation script to allow for optional confirmation and testing steps.

Added various hook scripts for notifications, logging, and security checks, enhancing the agent's functionality and user experience. Improved error handling and cleanup processes to ensure robust operation during agent execution.
Updated the agent switching functionality to allow for local agent switching within the interactive session. The previous implementation passed the command to the coordinator without feedback. Now, if the agent is successfully switched, a confirmation message is displayed. If the agent is not found, a helpful message prompts the user to check available agents. This change enhances user experience by providing immediate feedback on agent switching actions.
This commit introduces several key improvements to the agent persona functionality. The `--agent` flag now works correctly in interactive mode, and the `@<agent>` command allows for seamless agent switching during sessions. Additionally, HTTP client management has been enhanced to prevent "RuntimeError: Event loop is closed" exceptions by implementing proper client tracking and cleanup processes.

Key changes include:
- Fixed agent parameter passing in interactive mode.
- Updated agent switching logic to handle commands locally.
- Added tracking and cleanup for HTTP clients to ensure they are properly closed before the event loop shuts down.

These enhancements improve user experience and system stability, ensuring the agent persona system operates effectively in both run and interactive modes.
…g fixes

This commit updates the version of the nano-agent to 0.3.1 in multiple files, including `pyproject.toml`, `uv.lock`, and relevant source files. Additionally, it introduces a new release notes document detailing key improvements and bug fixes, such as the resolution of agent persona issues in interactive mode and enhancements to HTTP client management.

Key changes include:
- Version updated to 0.3.1 across all relevant files.
- New release notes document created, summarizing fixes and improvements for better user awareness.

These updates ensure users are informed of the latest changes and improvements in the nano-agent functionality.
This commit introduces a new file, HOOKS.md, which provides comprehensive documentation for the nano agent hooks system. The documentation outlines the purpose of hooks, their configuration, and examples of usage, enabling users to customize and extend the behavior of nano-cli and nano-agent effectively.

Key additions include:
- Overview of hook functionality and events.
- Quick start guide for installing and testing example hooks.
- Detailed configuration options and best practices for implementing hooks.
- Example scripts demonstrating security checks, logging, and performance monitoring.

These enhancements improve user understanding and facilitate the integration of custom scripts into the nano agent workflow.
This commit updates the NANO_CLI_USAGE.md file to recommend using the -p/--prompt flag for executing prompts directly, replacing the previous 'run' command approach. It clarifies the usage of interactive mode and provides examples for both direct prompt execution and interactive sessions. Additionally, the CLI code has been refactored to support the new prompt flag, improving user experience by streamlining command execution and enhancing the overall structure of the CLI.

Key changes include:
- Updated documentation to reflect the new prompt execution method.
- Refactored CLI code to support -p/--prompt flag for running prompts.
- Improved clarity in interactive mode instructions and examples.

These enhancements aim to provide users with a more intuitive and efficient way to interact with the nano agent.
meirborg and others added 23 commits October 11, 2025 17:28
This commit revises the documentation across multiple files to consistently recommend using the -p/--prompt flag for executing commands in the nano-cli, replacing the previous 'run' command syntax. Key updates include:

- Updated examples in CLAUDE.md, HOOKS.md, and README.md to reflect the new prompt execution method.
- Enhanced clarity in the usage of command files and interactive mode.
- Version updated to 0.3.2 in pyproject.toml.

These changes aim to streamline user interaction with the nano agent and improve overall documentation coherence.
This commit introduces a new shell command evaluation feature in the nano agent, allowing users to execute dynamic shell commands within command files using the `$` `command` syntax. Key updates include:

- Added documentation for shell command evaluation in COMMANDS.md, detailing usage, security notes, and configuration options.
- Updated the CommandLoader to support command evaluation, with security measures to disable it by default.
- Modified the CLI and related modules to utilize the new command evaluation feature based on configuration settings.
- Version updated to 0.4.0 in pyproject.toml to reflect these enhancements.

These changes improve the flexibility and functionality of the nano agent, enabling more dynamic command execution while maintaining security standards.
This commit enhances the documentation for shell command evaluation in the nano agent, clarifying the syntax and providing important usage notes. Key updates include:

- Revised the command syntax in COMMANDS.md to remove backslashes and improve clarity.
- Added explicit instructions on how to write command files correctly.
- Updated the version to 0.4.1 in pyproject.toml to reflect these changes.

These improvements aim to enhance user understanding and ensure proper usage of the command evaluation feature.
…ation

This commit addresses a critical bug in version 0.4.0 where shell command evaluation was not functioning correctly in enhanced interactive mode. Key updates include:

- Fixed the command evaluation process to ensure commands are properly evaluated before being sent to the agent, eliminating unnecessary tool calls.
- Clarified command file syntax in COMMANDS.md to resolve confusion regarding escaping, ensuring users understand the correct usage of the `$` `command` syntax.

These changes enhance the user experience by providing immediate feedback and correct functionality in interactive sessions.
[WIP] Add support for user-defined tools in nano-cli
This commit transforms the CLAUDE.md file into a comprehensive guide for the Nano-agents framework, emphasizing its capabilities and tooling. Key updates include:

- Renamed the file to reflect the new focus on Nano-agents.
- Consolidated project context and tooling information for clarity.
- Introduced structured sections for key commands, project structure, and development guidelines.
- Removed outdated testing and development commands, replacing them with concise instructions.
- Deleted several evaluation result files to streamline the repository and focus on essential documentation.

These changes enhance the clarity and usability of the documentation, providing a better understanding of the Nano-agents framework.
Co-authored-by: meirm <551713+meirm@users.noreply.github.com>
Add documentation for user-defined tools directory and allowlist configuration
Co-authored-by: meirm <551713+meirm@users.noreply.github.com>
…entation

Add documentation for user-defined tools and allowlist
…unning user-defined tools in the CLI. The new commands enhance user interaction by allowing users to manage their custom tools more effectively.
…This update consolidates information across relevant files, ensuring users can easily navigate and understand the configuration and usage of custom tools in the CLI.
This update introduces a new 'skills' command group in the CLI for managing Agent Skills, including listing, showing details, and creating new skills. Additionally, the core functionality of the nano-agent has been enhanced to integrate skills metadata and instructions, allowing for dynamic skill matching based on user prompts. Key functions added include `list_skills`, `get_skill_info`, and `load_skill_instructions`, improving the overall capability and usability of the nano-agent framework.
… Formatting Checker

- Implemented Agent Skills architecture similar to Anthropic's Agent Skills
- Added SkillLoader with progressive disclosure (metadata → instructions → resources)
- Created two built-in skills: README Generator and Code Formatting Checker
- Added CLI commands for skill management (list, show, create, install-builtin)
- Added MCP tools for skill access (list_skills, get_skill_info, load_skill_instructions)
- Skills auto-install on first use and integrate with system prompt
- Full test coverage (14 new tests, all passing)
- Complete documentation in docs/SKILLS.md

No breaking changes - fully backward compatible.
- Updated version number in project files to 0.5.0
- Added documentation for the new 'write release notes' skill in SKILLS.md
- Enhanced version information handling across the codebase
- Included tests to verify the existence of the new skill

No breaking changes introduced.
…kill, and examples directory

- Implement permission validation for Skills based on allowed_tools
- Implement permission validation for Commands with execution-time checks
- Add Security Audit builtin skill for auditing Skills
- Add comprehensive examples directory with agents, commands, and skills
- Update all builtin skills and user commands with tools metadata
- Add 18 new permission validation tests (67 tests total, all passing)
- Update version to 0.5.1
- Add release notes for v0.5.1

Breaking changes: None (fully backward compatible)

Features:
- Skills can be enabled/disabled based on allowed_tools configuration
- Commands validate permissions at execution time
- CLI shows permission status for Skills and Commands
- Comprehensive examples with documentation

Testing:
- All 67 tests passing
- Permission validation fully tested
- Backward compatibility verified
- Added a new section detailing the Agent Skills system, including auto-triggered capabilities and skill structure.
- Included examples of built-in skills and commands for skill management in the CLI.
- Updated existing content to reflect the new skills functionality and its integration with user prompts.

No breaking changes introduced.
- Bumped version to 0.5.3 across relevant files, including pyproject.toml and source code.
- Improved the installation script to better handle local and remote installations, including copying built-in skills, commands, and hooks.
- Added functionality to display and manage Agent Skills within the CLI, enhancing user interaction and usability.
- Updated environment file handling based on installation type for better configuration management.

No breaking changes introduced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants