{"id":29671410,"url":"https://github.com/tinybirdco/ai","last_synced_at":"2025-07-22T20:07:47.498Z","repository":{"id":287864227,"uuid":"966030110","full_name":"tinybirdco/ai","owner":"tinybirdco","description":"Tinybird utils for your AI based apps","archived":false,"fork":false,"pushed_at":"2025-07-09T08:00:04.000Z","size":490,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-19T07:43:45.089Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinybirdco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-14T09:44:12.000Z","updated_at":"2025-07-18T03:05:29.000Z","dependencies_parsed_at":"2025-04-14T11:25:35.607Z","dependency_job_id":"e7e29e48-152b-483d-aa6d-eb00b1d56adb","html_url":"https://github.com/tinybirdco/ai","commit_stats":null,"previous_names":["tinybirdco/ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tinybirdco/ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinybirdco","download_url":"https://codeload.github.com/tinybirdco/ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinybirdco%2Fai/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266563915,"owners_count":23948689,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-07-22T20:07:46.915Z","updated_at":"2025-07-22T20:07:47.467Z","avatar_url":"https://github.com/tinybirdco.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tinybird AI Utilities\n\nA comprehensive toolkit of AI-powered utilities for Tinybird, enabling intelligent data analysis, monitoring, and integration capabilities.\n\n## 🚀 What's Inside\n\nThis repository contains powerful AI utilities designed to enhance your Tinybird experience:\n\n- **🐦 Birdwatcher**: An intelligent agent for automated data analysis and monitoring\n- **📦 JavaScript SDK**: Seamless integration with Vercel AI SDK for web applications\n\n---\n\n## 🐦 Birdwatcher Agent\n\nBirdwatcher is an open-source AI agent that provides intelligent data analysis capabilities for your Tinybird data. It connects to the [Tinybird MCP server](https://www.tinybird.co/docs/forward/work-with-data/mcp) and enables analytics via natural language.\n\n\u003ca href=\"https://slack.com/oauth/v2/authorize?client_id=1689466861365.9006719895489\u0026scope=app_mentions:read,channels:history,chat:write,im:history,im:read,im:write,groups:history,commands\u0026user_scope=\"\u003e\u003cimg alt=\"Add to Slack\" height=\"40\" width=\"139\" src=\"https://platform.slack-edge.com/img/add_to_slack.png\" srcSet=\"https://platform.slack-edge.com/img/add_to_slack.png 1x, https://platform.slack-edge.com/img/add_to_slack@2x.png 2x\" /\u003e\u003c/a\u003e\n\n### Quick Start\n\n**Local Usage:**\n```sh\ngit clone git@github.com:tinybirdco/ai.git\ncd ai/agents/birdwatcher\ncp .env.example .env  # Configure your environment variables\ncurl -LsSf https://astral.sh/uv/install.sh | sh\nuv sync\nuv run python birdwatcher.py \\\n   --prompt \"analyse website visits and notify me on #tmp-birdwatcher\" \\\n   --mission base\n```\n\n**GitHub Actions:**\n```yaml\nname: Birdwatcher Endpoint Errors Monitor\n\non:\n  schedule:\n    - cron: '0 9 * * *'  # Runs daily at 9:00 UTC\n  workflow_dispatch:\n\njobs:\n  monitor-endpoint-errors:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: tinybirdco/ai@main\n        with:\n          slack_token: ${{ secrets.SLACK_TOKEN }}\n          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}\n          tinybird_token: ${{ secrets.TINYBIRD_TOKEN }}\n          tinybird_host: ${{ secrets.TINYBIRD_HOST }}\n          prompt: 'Report endpoint errors in the last 24 hours. Send a Slack message to #tmp-birdwatcher with the results. No markdown.'\n          mission: base\n          model: 'claude-4-sonnet-20250514'\n```\n\n### Features\n\n- **Natural Language Queries**: Ask questions about your data in plain English\n- **Automated Monitoring**: Set up scheduled analysis and alerts\n- **Slack Integration**: Receive notifications directly in your Slack channels\n- **Mission System**: Predefined analysis templates for common use cases\n- **CLI Mode**: Interactive chat interface for data exploration\n\n### Missions\n\nMissions are predefined instructions that guide Birdwatcher to perform specific analyses. Available missions include:\n- **Base**: General data analysis\n- **CPU Spikes**: Infrastructure monitoring\n- **Daily Summary**: Regular reporting\n- **Explore**: Data discovery\n\n[View all missions →](https://github.com/tinybirdco/ai/tree/main/agents/birdwatcher/missions)\n\n---\n\n## 📦 JavaScript Tools\n\nThe `@tinybirdco/ai` package provides seamless integration between Vercel AI SDK and Tinybird's analytics platform, enabling you to track and analyze AI model performance in your web applications.\n\n### Installation\n\n```bash\nnpm install @tinybirdco/ai\n# or\nyarn add @tinybirdco/ai\n# or\npnpm add @tinybirdco/ai\n```\n\n### Quick Start\n\n**Next.js App Router Example:**\n```typescript\nimport { createOpenAI } from \"@ai-sdk/openai\";\nimport { wrapModel } from \"@tinybirdco/ai/ai-sdk\";\nimport { streamText } from \"ai\";\n\nexport const maxDuration = 30;\n\nexport async function POST(req: Request) {\n  const { messages } = await req.json();\n\n  const openai = createOpenAI({\n    apiKey: process.env.OPENAI_API_KEY,\n  });\n\n  const model = wrapModel(openai(\"chatgpt-4o-latest\"), {\n    host: process.env.TINYBIRD_HOST!,\n    token: process.env.TINYBIRD_TOKEN!,\n  });\n\n  const result = streamText({\n    model: model,\n    messages,\n  });\n\n  return result.toDataStreamResponse();\n}\n```\n\n### Features\n\n- **Vercel AI SDK Integration**: Seamless compatibility with Vercel's AI SDK\n- **Streaming Support**: Real-time response streaming\n- **Performance Tracking**: Monitor AI model performance and usage\n- **TypeScript Support**: Full type safety out of the box\n\n### Environment Variables\n\n```env\nOPENAI_API_KEY=your_openai_api_key\nTINYBIRD_HOST=your_tinybird_host\nTINYBIRD_TOKEN=your_tinybird_token\n```\n\n---\n\n## 🛠️ Getting Started\n\n1. **Choose Your Tool**: \n   - Use Birdwatcher for automated data analysis and monitoring\n   - Use the JavaScript SDK for web application integration\n\n2. **Set Up Your Environment**: Configure your Tinybird credentials and API keys\n\n3. **Start Building**: Follow the quick start guides above to get up and running\n\n## 📚 Documentation\n\n- [Birdwatcher Documentation](agents/birdwatcher/README.md)\n- [JavaScript SDK Documentation](js/README.md)\n- [Tinybird MCP Server](https://www.tinybird.co/docs/forward/work-with-data/mcp)\n- [LLM Performance Tracker Template](https://github.com/tinybirdco/llm-performance-tracker)\n\n## 🤝 Contributing\n\nWe welcome contributions! Please check out our contributing guidelines and feel free to submit pull requests or open issues.\n\n## 📄 License\n\nMIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybirdco%2Fai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinybirdco%2Fai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybirdco%2Fai/lists"}