[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72550":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":16,"starSnapshotCount":16,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},72550,"datapizza-ai","datapizza-labs\u002Fdatapizza-ai","datapizza-labs","Build reliable Gen AI solutions without overhead 🍕","http:\u002F\u002Fdocs.datapizza.ai\u002F",null,"Python",2214,135,17,13,0,3,6,15,9,28.4,"MIT License",false,"main",true,[27,28,29,30,31],"agent","ai","genai","llm","python","2026-06-12 02:03:04","\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"docs\u002Fassets\u002Flogo_bg_dark.png\" alt=\"Datapizza AI Logo\" width=\"200\" height=\"200\">\n\n**Build reliable Gen AI solutions without overhead**\n\n*Written in Python. Designed for speed. A no-fluff GenAI framework that gets your agents from dev to prod, fast*\n\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![PyPI version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fdatapizza-ai.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fdatapizza-ai\u002F)\n[![Python 3.10+](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.10+-blue.svg)](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F)\n[![Downloads](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fdatapizza-ai.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fdatapizza-ai\u002F)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fdatapizza-labs\u002Fdatapizza-ai.svg?style=social&label=Star)](https:\u002F\u002Fgithub.com\u002Fdatapizza-labs\u002Fdatapizza-ai)\n\n[🏠Homepage](https:\u002F\u002Fdatapizza.tech\u002Fen\u002Fai-framework\u002F) • [🚀 Quick Start](#-quick-start) • [📖 Documentation](https:\u002F\u002Fdocs.datapizza.ai) • [🎯 Examples](#-examples) • [🤝 Community](#-community)\n\n\u003C\u002Fdiv>\n\n---\n\n## 🌟 Why Datapizza AI?\n\nA framework that keeps your agents predictable, your debugging fast, and your code trusted in production. Built by Engineers, trusted by Engineers.\n\n\u003Cdiv align=\"center\">\n\n### ⚡ **Less abstraction, more control** | 🚀 **API-first design** | 🔧 **Observable by design**\n\n\u003C\u002Fdiv>\n\n## How to install\n```sh\npip install datapizza-ai\n```\n\n## Client invoke\n\n```python\nfrom datapizza.clients.openai import OpenAIClient\n\nclient = OpenAIClient(api_key=\"YOUR_API_KEY\")\nresult = client.invoke(\"Hi, how are u?\")\nprint(result.text)\n```\n\n## ✨ Key Features\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd width=\"50%\" valign=\"top\">\n\n### 🎯 **API-first**\n- **Multi-Provider Support**: OpenAI, Google Gemini, Anthropic, Mistral, Azure\n- **Tool Integration**: Built-in web search, document processing, custom tools\n- **Memory Management**: Persistent conversations and context awareness\n\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\" valign=\"top\">\n\n### 🔍 **Composable**\n- **Reusable blocks**: Declarative configuration, easy overrides\n- **Document Processing**: PDF, DOCX, images with Azure AI & Docling\n- **Smart Chunking**: Context-aware text splitting and embedding\n- **Built-in reranking**: Add a reranker (e.g., Cohere) to boost relevance\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd width=\"50%\" valign=\"top\">\n\n### 🔧 **Observable**\n- **OpenTelemetry tracing**: Standards-based instrumentation\n- **Client I\u002FO tracing**: Optional toggle to log inputs, outputs, and in-memory context\n- **Custom spans**: Trace fine-grained phases and sub-steps to pinpoint bottlenecks\n\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\" valign=\"top\">\n\n### 🚀 **Vendor-Agnostic**\n- **Swap models**: Change providers without rewiring business logic\n- **Clear Interfaces**: Predictable APIs across all components\n- **Rich Ecosystem**: Modular design with optional components\n- **Migration-friendly**: Quick migration from other frameworks\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\n# Core framework\npip install datapizza-ai\n\n# With specific providers (optional)\npip install datapizza-ai-clients-openai\npip install datapizza-ai-clients-google\npip install datapizza-ai-clients-anthropic\n```\n\n### Start with Agent\n\n```python\nfrom datapizza.agents import Agent\nfrom datapizza.clients.openai import OpenAIClient\nfrom datapizza.tools import tool\n\n@tool\ndef get_weather(city: str) -> str:\n    return f\"The weather in {city} is sunny\"\n\nclient = OpenAIClient(api_key=\"YOUR_API_KEY\")\nagent = Agent(name=\"assistant\", client=client, tools = [get_weather])\n\nresponse = agent.run(\"What is the weather in Rome?\")\n# output: The weather in Rome is sunny\n```\n\n\n## 📊 Detailed Tracing\n\n\nA key requirement for principled development of LLM applications over your data (RAG systems, agents) is being able to observe and debug.\n\nDatapizza-ai provides built-in observability with OpenTelemetry tracing to help you monitor performance and understand execution flow.\n\n\u003Csummary>\u003Cb>🔍 Trace Your AI Operations\u003C\u002Fb>\u003C\u002Fsummary>\n\n```sh\npip install datapizza-ai-tools-duckduckgo\n```\n\n```python\nfrom datapizza.agents import Agent\nfrom datapizza.clients.openai import OpenAIClient\nfrom datapizza.tools.duckduckgo import DuckDuckGoSearchTool\nfrom datapizza.tracing import ContextTracing\n\nclient = OpenAIClient(api_key=\"OPENAI_API_KEY\")\nagent = Agent(name=\"assistant\", client=client, tools = [DuckDuckGoSearchTool()])\n\nwith ContextTracing().trace(\"my_ai_operation\"):\n    response = agent.run(\"Tell me some news about Bitcoin\")\n\n# Output shows:\n# ╭─ Trace Summary of my_ai_operation ──────────────────────────────────╮\n# │ Total Spans: 3                                                      │\n# │ Duration: 2.45s                                                     │\n# │ ┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓ |\n# │ ┃ Model       ┃ Prompt Tokens ┃ Completion Tokens ┃ Cached Tokens ┃ |\n# │ ┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩ |\n# │ │ gpt-4o-mini │ 31            │ 27                │ 0             │ |\n# │ └─────────────┴───────────────┴───────────────────┴───────────────┘ |\n# ╰─────────────────────────────────────────────────────────────────────╯\n```\n\n\n![Demo](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F02742e87-aa48-4308-94c8-6f362e3218b4)\n\n\n## 🎯 Examples\n\n### 🌐 Multi-Agent System\n\nBuild sophisticated AI systems where multiple specialized agents collaborate to solve complex tasks. This example shows how to create a trip planning system with dedicated agents for weather information, web search, and planning coordination.\n\n```sh\n# Install DuckDuckGo tool\npip install datapizza-ai-tools-duckduckgo\n```\n\n\n```python\nfrom datapizza.agents.agent import Agent\nfrom datapizza.clients.openai import OpenAIClient\nfrom datapizza.tools import tool\nfrom datapizza.tools.duckduckgo import DuckDuckGoSearchTool\n\nclient = OpenAIClient(api_key=\"YOUR_API_KEY\", model=\"gpt-4.1\")\n\n@tool\ndef get_weather(city: str) -> str:\n    return f\"\"\" it's sunny all the week in {city}\"\"\"\n\nweather_agent = Agent(\n    name=\"weather_expert\",\n    client=client,\n    system_prompt=\"You are a weather expert. Provide detailed weather information and forecasts.\",\n    tools=[get_weather]\n)\n\nweb_search_agent = Agent(\n    name=\"web_search_expert\",\n    client=client,\n    system_prompt=\"You are a web search expert. You can search the web for information.\",\n    tools=[DuckDuckGoSearchTool()]\n)\n\nplanner_agent = Agent(\n    name=\"planner\",\n    client=client,\n    system_prompt=\"You are a trip planner. You should provide a plan for the user. Make sure to provide a detailed plan with the best places to visit and the best time to visit them.\"\n)\n\nplanner_agent.can_call([weather_agent, web_search_agent])\n\nresponse = planner_agent.run(\n    \"I need to plan a hiking trip in Seattle next week. I want to see some waterfalls and a forest.\"\n)\nprint(response.text)\n\n```\n\n\n### 📊 Document Ingestion\n\nProcess and index documents for retrieval-augmented generation (RAG). This pipeline automatically parses PDFs, splits them into chunks, generates embeddings, and stores them in a vector database for efficient similarity search.\n\n```sh\npip install datapizza-ai-parsers-docling\n```\n\n```python\nfrom datapizza.core.vectorstore import VectorConfig\nfrom datapizza.embedders import ChunkEmbedder\nfrom datapizza.embedders.openai import OpenAIEmbedder\nfrom datapizza.modules.parsers.docling import DoclingParser\nfrom datapizza.modules.splitters import NodeSplitter\nfrom datapizza.pipeline import IngestionPipeline\nfrom datapizza.vectorstores.qdrant import QdrantVectorstore\n\nvectorstore = QdrantVectorstore(location=\":memory:\")\nembedder = ChunkEmbedder(client=OpenAIEmbedder(api_key=\"YOUR_API_KEY\", model_name=\"text-embedding-3-small\"))\nvectorstore.create_collection(\"my_documents\",vector_config=[VectorConfig(name=\"embedding\", dimensions=1536)])\n\npipeline = IngestionPipeline(\n    modules=[\n        DoclingParser(),\n        NodeSplitter(max_char=1024),\n        embedder,\n    ],\n    vector_store=vectorstore,\n    collection_name=\"my_documents\"\n)\n\npipeline.run(\"sample.pdf\")\n\nresults = vectorstore.search(query_vector = [0.0] * 1536, collection_name=\"my_documents\", k=5)\nprint(results)\n```\n\n\n### 📊 RAG (Retrieval-Augmented Generation)\n\nCreate a complete RAG pipeline that enhances AI responses with relevant document context. This example demonstrates query rewriting, embedding generation, document retrieval, and response generation in a connected workflow.\n\n```python\nfrom datapizza.clients.openai import OpenAIClient\nfrom datapizza.embedders.openai import OpenAIEmbedder\nfrom datapizza.modules.prompt import ChatPromptTemplate\nfrom datapizza.modules.rewriters import ToolRewriter\nfrom datapizza.pipeline import DagPipeline\nfrom datapizza.vectorstores.qdrant import QdrantVectorstore\n\nopenai_client = OpenAIClient(\n    model=\"gpt-4o-mini\",\n    api_key=\"YOUR_API_KEY\"\n)\n\ndag_pipeline = DagPipeline()\ndag_pipeline.add_module(\"rewriter\", ToolRewriter(client=openai_client, system_prompt=\"Rewrite user queries to improve retrieval accuracy.\"))\ndag_pipeline.add_module(\"embedder\", OpenAIEmbedder(api_key= \"YOUR_API_KEY\", model_name=\"text-embedding-3-small\"))\ndag_pipeline.add_module(\"retriever\", QdrantVectorstore(host=\"localhost\", port=6333).as_retriever(collection_name=\"my_documents\", k=5))\ndag_pipeline.add_module(\"prompt\", ChatPromptTemplate(user_prompt_template=\"User question: {{user_prompt}}\\n:\", retrieval_prompt_template=\"Retrieved content:\\n{% for chunk in chunks %}{{ chunk.text }}\\n{% endfor %}\"))\ndag_pipeline.add_module(\"generator\", openai_client)\n\ndag_pipeline.connect(\"rewriter\", \"embedder\", target_key=\"text\")\ndag_pipeline.connect(\"embedder\", \"retriever\", target_key=\"query_vector\")\ndag_pipeline.connect(\"retriever\", \"prompt\", target_key=\"chunks\")\ndag_pipeline.connect(\"prompt\", \"generator\", target_key=\"memory\")\n\nquery = \"tell me something about this document\"\nresult = dag_pipeline.run({\n    \"rewriter\": {\"user_prompt\": query},\n    \"prompt\": {\"user_prompt\": query},\n    \"retriever\": {\"collection_name\": \"my_documents\", \"k\": 3},\n    \"generator\":{\"input\": query}\n})\n\nprint(f\"Generated response: {result['generator']}\")\n```\n\n\n## 🌐 Ecosystem\n\n### 🤖 Supported AI Providers\n\n\u003Ctable >\n\u003Ctr>\n\u003Ctd align=\"center\">\u003Cimg src=\"https:\u002F\u002Flogosandtypes.com\u002Fwp-content\u002Fuploads\u002F2022\u002F07\u002FOpenAI.png\" width=\"32\" style=\"border-radius: 50%\">\u003Cbr>\u003Cb>OpenAI\u003C\u002Fb>\u003C\u002Ftd>\n\u003Ctd align=\"center\">\u003Cimg src=\"https:\u002F\u002Fwww.google.com\u002Ffavicon.ico\" width=\"32\">\u003Cbr>\u003Cb>Google Gemini\u003C\u002Fb>\u003C\u002Ftd>\n\u003Ctd align=\"center\">\u003Cimg src=\"https:\u002F\u002Fanthropic.com\u002Ffavicon.ico\" width=\"32\">\u003Cbr>\u003Cb>Anthropic\u003C\u002Fb>\u003C\u002Ftd>\n\u003Ctd align=\"center\">\u003Cimg src=\"https:\u002F\u002Fmistral.ai\u002Ffavicon.ico\" width=\"32\">\u003Cbr>\u003Cb>Mistral\u003C\u002Fb>\u003C\u002Ftd>\n\u003Ctd align=\"center\">\u003Cimg src=\"https:\u002F\u002Fazure.microsoft.com\u002Ffavicon.ico\" width=\"32\">\u003Cbr>\u003Cb>Azure OpenAI\u003C\u002Fb>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n### 🔧 Tools & Integrations\n\n| Category | Components |\n|----------|------------|\n| **📄 Document Parsers** | Azure AI Document Intelligence, Docling |\n| **🔍 Vector Stores** | Qdrant |\n| **🎯 Rerankers** | Cohere, Together AI |\n| **🌐 Tools** | DuckDuckGo Search, Custom Tools |\n| **💾 Caching** | Redis integration for performance optimization |\n| **📊 Embedders** | OpenAI, Google, Cohere, FastEmbed |\n\n## 🎓 Learning Resources\n\n- 📖 **[Complete Documentation](https:\u002F\u002Fdocs.datapizza.ai)** - Comprehensive guides and API reference\n- 🎯 **[RAG Tutorial](https:\u002F\u002Fdocs.datapizza.ai\u002Flatest\u002FGuides\u002FRAG\u002Frag\u002F)** - Build production RAG systems\n- 🤖 **[Agent Examples](https:\u002F\u002Fdocs.datapizza.ai\u002Flatest\u002FGuides\u002FAgents\u002Fagent\u002F)** - Real-world agent implementations\n\n## 🤝 Community\n\n\n- 💬 **[Discord Community](https:\u002F\u002Fdiscord.gg\u002Fs5sJNHz2C8)**\n- 📚 **[Documentation](https:\u002F\u002Fdocs.datapizza.ai)**\n- 📧 **[GitHub Issues](https:\u002F\u002Fgithub.com\u002Fdatapizza-labs\u002Fdatapizza-ai\u002Fissues)**\n- 🐦 **[Twitter](https:\u002F\u002Fx.com\u002Fdatapizza_ai)**\n\n### 🌟 Contributing\n\nWe love contributions! Whether it's:\n\n- 🐛 **Bug Reports** - Help us improve\n- 💡 **Feature Requests** - Share your ideas\n- 📝 **Documentation** - Make it better for everyone\n- 🔧 **Code Contributions** - Build the future together\n\nCheck out our [Contributing Guide](CONTRIBUTING.md) to get started.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003Cdiv align=\"center\">\n\n**Built by Datapizza, the AI native company**\n\n*A framework made to be easy to learn, easy to maintain and ready for production* 🍕\n\n[⭐ Star us on GitHub](https:\u002F\u002Fgithub.com\u002Fdatapizza-labs\u002Fdatapizza-ai) • [🚀 Get Started](https:\u002F\u002Fdocs.datapizza.ai) • [💬 Join Discord](https:\u002F\u002Fdiscord.gg\u002Fs5sJNHz2C8)\n\n## Star History\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=datapizza-labs\u002Fdatapizza-ai&type=Date)](https:\u002F\u002Fwww.star-history.com\u002F#datapizza-labs\u002Fdatapizza-ai&Date)\n\n\u003C\u002Fdiv>\n","Datapizza AI 是一个用于构建可靠的生成式人工智能解决方案的框架，旨在减少开发过程中的冗余工作。它采用 Python 编写，强调速度与简洁性，支持多供应商（如 OpenAI、Google Gemini 等）API 的集成，并提供内存管理、文档处理等功能，帮助开发者快速从开发过渡到生产环境。其核心特性包括API优先设计、可组合性强、可观测性良好以及对不同AI模型的无缝切换能力。适用于需要高效开发并部署生成式AI应用的场景，如客服聊天机器人、内容生成工具等。",2,"2026-06-11 03:42:31","high_star"]