{"id":28930758,"url":"https://github.com/fiddler-labs/fiddlebot","last_synced_at":"2025-08-27T05:14:55.288Z","repository":{"id":299798225,"uuid":"1004209097","full_name":"fiddler-labs/FiddleBot","owner":"fiddler-labs","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-18T10:13:50.000Z","size":142,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-18T11:25:29.275Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fiddler-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-18T09:27:17.000Z","updated_at":"2025-06-18T10:13:53.000Z","dependencies_parsed_at":"2025-06-18T11:36:12.180Z","dependency_job_id":null,"html_url":"https://github.com/fiddler-labs/FiddleBot","commit_stats":null,"previous_names":["fiddler-labs/fiddlebot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fiddler-labs/FiddleBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiddler-labs%2FFiddleBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiddler-labs%2FFiddleBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiddler-labs%2FFiddleBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiddler-labs%2FFiddleBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fiddler-labs","download_url":"https://codeload.github.com/fiddler-labs/FiddleBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiddler-labs%2FFiddleBot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261316387,"owners_count":23140450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-22T15:38:02.295Z","updated_at":"2025-08-27T05:14:55.274Z","avatar_url":"https://github.com/fiddler-labs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FiddleBot\n\nFiddleBot is an interactive CLI chatbot powered by OpenAI's GPT-4.1-mini model, specifically designed to provide information and assistance about Fiddler - the pioneer in AI Observability and Security.\n\n## Features\n\n- Interactive command-line interface for chatting with the AI\n- Powered by OpenAI's GPT-4.1-mini model\n- Maintains conversation history for context-aware responses\n- Focused on providing information about Fiddler's AI Observability and Security platform\n- Asynchronous operation for better performance\n\n## Prerequisites\n\n- Python 3.12 or higher\n- Fiddler Access Details\n- OpenAI API key\n- UV (recommended for package management and running)\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone \u003crepository-url\u003e\ncd FiddleBot\n```\n\n2. Create a `.env` file in the project root and add your OpenAI API key:\n```\nFIDDLER_BASE_URL=\u003cyour fiddler url\u003e\nFIDDLER_ACCESS_TOKEN=\u003cyour fiddler access token\u003e\nOPENAI_API_KEY=\u003cyour_api_key_here\u003e\n```\n\n## Installing UV\n\nIf you haven't installed UV yet, you can install it by following the instructions in the following link\n\n[UV Installation Guide](https://docs.astral.sh/uv/getting-started/installation/)\n\n## Setting up the project with UV\n\n```bash\n# Create a new virtual environment and install dependencies\nuv venv\nsource .venv/bin/activate  # On Unix/macOS\n# or\n.venv\\Scripts\\activate  # On Windows\n\n# Install dependencies from pyproject.toml\nuv pip install .\n```\n\n## Usage\n\nRun the chatbot using UV:\n```bash\nuv run src/fdl_chat.py src/fdl_mcp_server.py\n```\n\n- Type your message and press Enter to chat with the AI\n- Type `q`, `quit`, or `exit` to end the conversation\n- Press Ctrl+C to exit at any time\n\nRun the streamlit chatbot with\n```bash\nuv run streamlit run src/app.py\n```\n\n### Usage with OpenTelemetry \n\n#### Console Export of OTEL Spans to Console\n```bash\nuv run opentelemetry-instrument --traces_exporter console --service_name fiddlebot_local python src/fdl_chat.py src/fdl_mcp_server.py\n```\n\n#### Usage with Fiddler OTEL Collector\n\n1. Login to dev VPN\n2. Setup port forwarding to Fiddler's current OTEL Endpoint\n   ```fkube fdl-newdev -n leeannotel port-forward svc/otel-to-kafka-collector 4318:4318```\n3. Run Fiddlebot as below\n```bash\nuv run src/fdl_chat.py src/fdl_mcp_server.py\n```\n\n## About Fiddler\n\nFiddler is the pioneer in AI Observability and Security, enabling organizations to build trustworthy and responsible AI systems. The platform helps:\n\n- Monitor performance of ML models and generative AI applications\n- Protect LLM and GenAI applications with Guardrails\n- Analyze model behavior to identify issues and opportunities\n- Improve AI systems through actionable insights\n\n## Architecture and Technical Details\n\nFiddleBot is built with a modular architecture that combines several key components:\n\n### Core Components\n\n1. **Chat Interface (`fdl_chat.py`)**\n   - Implements an asynchronous chatbot using OpenAI's GPT-4.1-mini model\n   - Maintains conversation history for context-aware responses\n   - Handles user input/output through a CLI interface\n   - Integrates with the planning and execution system\n\n2. **Planning and Execution System (`fdl_plan_n_solve.py`)**\n   - Implements a multi-step planning and execution framework\n   - Uses GPT-4.1-mini for task decomposition and planning\n   - Manages tool execution through an MCP (Model Context Protocol) server\n   - Handles conversation state and tool call results\n\n3. **MCP Server (`fdl_mcp_server.py`)**\n   - Implements a FastMCP server for tool execution\n   - Provides a set of tools for interacting with the Fiddler platform\n   - Handles authentication and API communication with Fiddler\n   - Exposes tools for project, model, and alert management\n\n### Key Features\n\n1. **Asynchronous Operation**\n   - Uses Python's `asyncio` for non-blocking I/O operations\n   - Enables concurrent handling of multiple operations\n   - Improves performance and responsiveness\n\n2. **Tool Integration**\n   - Implements a flexible tool system through MCP\n   - Supports dynamic tool discovery and execution\n   - Enables extensibility through custom tool definitions\n\n3. **Conversation Management**\n   - Maintains conversation history for context\n   - Handles system prompts and user interactions\n   - Manages tool call results and responses\n\n4. **Error Handling**\n   - Implements robust error handling for API calls\n   - Manages connection issues and timeouts\n   - Provides graceful cleanup of resources\n\n### Data Flow\n\n1. User input is received through the chat interface\n2. The input is processed by the planning system\n3. The planning system generates a sequence of steps\n4. Each step is executed through the MCP server\n5. Results are collected and formatted into a response\n6. The response is returned to the user\n\n### Security\n\n- API keys and sensitive information are managed through environment variables\n- Authentication is handled through Fiddler's token-based system\n- All API communications are secured through HTTPS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiddler-labs%2Ffiddlebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiddler-labs%2Ffiddlebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiddler-labs%2Ffiddlebot/lists"}