{"name":"Otto: Intelligent Automation and LLM Integration for Frappe Framework","description":"Otto is an early-stage Frappe Framework application designed to bring intelligent automation and large language model (LLM) capabilities to the Frappe ecosystem. It serves as both a standalone app for task automation and a library for seamless LLM integration within custom Frappe applications. This project aims to empower Frappe users with advanced AI functionalities for various business processes.","github":"https://github.com/frappe/otto","url":"https://osrepos.com/repo/frappe-otto","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/frappe-otto","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/frappe-otto.md","json":"https://osrepos.com/repo/frappe-otto.json","topics":["Python","Frappe","AI","Automation","LLM","Framework","Open Source"],"keywords":["Python","Frappe","AI","Automation","LLM","Framework","Open Source"],"stars":null,"summary":"Otto is an early-stage Frappe Framework application designed to bring intelligent automation and large language model (LLM) capabilities to the Frappe ecosystem. It serves as both a standalone app for task automation and a library for seamless LLM integration within custom Frappe applications. This project aims to empower Frappe users with advanced AI functionalities for various business processes.","content":"## Introduction\n\nOtto is an innovative application built on the [Frappe Framework](https://github.com/frappe/frappe){:target=\"_blank\"}, designed to introduce intelligent automation and advanced Large Language Model (LLM) capabilities into the Frappe ecosystem. While currently in its early stages of development, Otto aims to provide a robust framework for automating tasks, building custom AI assistants over Frappe apps, and facilitating LLM integrations. It functions both as a Frappe app with defined doctypes for managing tasks, tools, and LLMs, and as a powerful library for developers to embed LLM interactions directly into their custom Frappe solutions.\n\n## Installation\n\nTo install Otto, you will need a Frappe bench directory with a site already set up. Follow these commands in your bench directory:\n\nbash\n# In your bench directory\nbench get-app otto --branch develop\nbench --site site-name install-app otto\n\n\nAfter installation, you can configure API keys in the **Otto Settings** doctype and explore the available models and functionalities.\n\n## Examples\n\nOtto's library provides a straightforward way to integrate LLMs into your Frappe applications. Here's a brief example demonstrating how to fetch a model, create a session, interact with it, and handle tool use:\n\npython\nimport otto.lib as otto\nfrom otto.lib.types import ToolUseUpdate\n\n\n# 1. Fetch model matching some criteria\nmodel = otto.get_model(supports_vision=True, size=\"Small\", provider=\"OpenAI\") # str model id\n\n\n# 2. Create new session\nsession = otto.new(\n    model=model,\n    instruction=\"You are a helpful coding assistant\",\n    tools=[calculator_tool_schema],\n)\n\n# Save id to resume session later\nsession_id = session.id\n\n\n# 3. Interact (streaming)\nstream = session.interact(\"Calculate 15 * 23\", stream=True)\nfor chunk in stream:\n    print(chunk.get(\"text\", \"\"), end=\"\")\nresult = stream.item\n\n\n# 4. Handle tool use\nfor tool in session.get_pending_tool_use():\n    result = execute_tool(tool.name, tool.args) # execute tool\n\n    # update session with tool result\n    session.update_tool_use(\n        ToolUseUpdate(id=tool.id, status=\"success\", result=result)\n    )\n\n# Continue session with tool result\nsession.interact(stream=False)\n\n\n# 5. Load and resume interaction (non-streaming)\nsession = otto.load(session_id)\nresponse, _ = session.interact(\"What was the result?\", stream=False)\nif response:\n    print(response[\"content\"])\n\n\nFor more detailed examples and comprehensive documentation, refer to the [Otto Library Documentation](https://github.com/frappe/otto/blob/develop/otto/lib/docs/README.md){:target=\"_blank\"}.\n\n## Why Use Otto?\n\nOtto offers a compelling solution for organizations looking to enhance their Frappe applications with AI-driven capabilities. Its primary benefits include:\n\n*   **Intelligent Task Automation**: Automate routine tasks within Frappe using defined \"Otto Tasks\" and \"Otto Tools,\" triggered manually or by doctype lifecycle events.\n*   **Custom AI Assistants**: Build tailored assistants that can interact with and leverage data from your Frappe apps, providing intelligent support and insights.\n*   **Seamless LLM Integration**: Developers can easily integrate various Large Language Models into their custom Frappe apps using Otto's flexible library, abstracting away the complexities of LLM interaction.\n*   **Enhanced Business Processes**: By automating responses and providing intelligent insights, Otto can significantly improve efficiency, as demonstrated by its internal use case in handling support tickets for Frappe's Helpdesk.\n*   **Future-Proofing**: As part of Frappe's broader initiative to explore state-of-the-art AI, Otto positions Frappe apps at the forefront of AI innovation.\n\n## Links\n\n*   **GitHub Repository**: [https://github.com/frappe/otto](https://github.com/frappe/otto){:target=\"_blank\"}\n*   **Otto Library Documentation**: [https://github.com/frappe/otto/blob/develop/otto/lib/docs/README.md](https://github.com/frappe/otto/blob/develop/otto/lib/docs/README.md){:target=\"_blank\"}\n*   **Frappe Framework**: [https://github.com/frappe/frappe](https://github.com/frappe/frappe){:target=\"_blank\"}\n*   **Frappe Technologies**: [https://frappe.io](https://frappe.io){:target=\"_blank\"}","metrics":{"detailViews":9,"githubClicks":11},"dates":{"published":null,"modified":"2026-04-16T00:46:27.000Z"}}