{"id":16254608,"url":"https://github.com/eschnou/opengpa","last_synced_at":"2025-10-12T04:43:48.132Z","repository":{"id":246368545,"uuid":"810398183","full_name":"eschnou/OpenGPA","owner":"eschnou","description":"Free and open General Purpose Agent","archived":false,"fork":false,"pushed_at":"2025-05-10T14:50:45.000Z","size":1798,"stargazers_count":52,"open_issues_count":2,"forks_count":3,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-10T15:38:11.826Z","etag":null,"topics":["agent","agent-sdk","agentic","ai","llm","mcp","ollama","openai","rag","self-hosted"],"latest_commit_sha":null,"homepage":"https://opengpa.org","language":"Java","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/eschnou.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":"2024-06-04T16:05:11.000Z","updated_at":"2025-05-10T05:19:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"82e9be33-3915-4660-a5e5-34b82500a87e","html_url":"https://github.com/eschnou/OpenGPA","commit_stats":null,"previous_names":["eschnou/opengpa"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/eschnou/OpenGPA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eschnou%2FOpenGPA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eschnou%2FOpenGPA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eschnou%2FOpenGPA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eschnou%2FOpenGPA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eschnou","download_url":"https://codeload.github.com/eschnou/OpenGPA/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eschnou%2FOpenGPA/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010285,"owners_count":26084720,"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-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["agent","agent-sdk","agentic","ai","llm","mcp","ollama","openai","rag","self-hosted"],"created_at":"2024-10-10T15:23:09.429Z","updated_at":"2025-10-12T04:43:48.124Z","avatar_url":"https://github.com/eschnou.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenGPA - Self-hosted General Purpose Agent\n\n[![Twitter Follow](https://img.shields.io/twitter/follow/opengpa?style=social)](https://twitter.com/opengpa) \u0026ensp;\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n**OpenGPA** is an Open-source General Purpose Agent. A self-hosted solution supporting smart AI agent developments\nwith chain of thought, tool use and memory access through RAG.\n\n- Agentic system with multi-step-reasoning, chain-of-thought, ReAct, tool use etc\n- Support for [all major LLMs](https://docs.spring.io/spring-ai/reference/api/chatmodel.html) such as LLama, Mistral, Anthropic, OpenAI, etc.\n- Off-line first. You can run on your own box with a local LLM. Data won't leave the server. All the power of GPT without the data privacy nightmare.\n- Extensible framework allows to plug your own actions, such as calling into internal services and APIs\n- Simple UI exposing insight on the GPA internal reasoning and actions\n- Built-in RAG to search internal document stores\n- Free and open source, deploy anywhere, customize to your needs\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"/assets/opengpa_ui.png\" width=\"640\" /\u003e\n\u003c/p\u003e\n\n## :pencil2: Design principles\n\nOpenGPA is much more than a UI on top of a LLM. It implements an agentic workflow, where a LLM is used as the \n*brain* of an agent to reason through multiple steps of planning, reasoning, and tool use.  In particular, OpenGpa \nis using the [ReAct](https://arxiv.org/abs/2210.03629) approach to verbally reason on the next step, decide on the action to execute, \nand observe the outcome.\n\n```\n{\n  \"reasoning\": \"The user wants to know the current weather in Liege, Belgium. \n                The best action to get this information is to perform a web search with \n                the query 'current weather in Liege, Belgium'. The result of this action \n                will then be used to respond to the user's request. \n                This is not the final action as we have to get the results from the web \n                search first.\"\n  \"action\": {\n    \"name\": \"webSearch\",\n    \"arguments\": {\n      \"query\": \"current weather in Liege, Belgium\"\n    }\n  },\n  \"is_final\": false\n}\n```\n\nAction selection is based on a catalog of action that can easily be extended through code. You could add an action\nto tap into an internal service to fetch some data, or a workflow engine to trigger a next step, etc.\n\n## 🛠️️ Key Features\n\nThe current version already packs a few interesting pieces:\n- Works with all LLM supported by [spring-ai](https://spring.io/projects/spring-ai), including running **LLama** locally\n- Multi-step task processing with **chain-of-thought** approach\n- Action model with easy to extend **actions** for use by the agent\n- Upload of **artifacts** to process by the agent\n- Download of **artifacts** generated by the agent\n- Import documents in knowledge base to support **Retrieval Augmented Generation** search\n- Web browsing and web search\n- Model Context Protocol [MCP](https://modelcontextprotocol.io/introduction) tap into existing enterprise APIs\n\n## 🚧 Roadmap\n\nImprove the Agentic capabilities:\n- **Memory** enabling the agent to remember key facts and use them later\n- **code generation** and **execution** within the agent (using Groovy scripts?)\n- **scheduled** jobs for automating workflow\n- **triggers** to create complete end-to-end workflows\n\nMake OpenGPA enterprise ready:\n- Persistence of tasks/steps\n- Auditing of task processing costs (token usage)\n- Instrumentation and observability\n\n# 🚀 Getting started\n\nIn case of trouble, please reach out on [Discord](https://discord.gg/3XPsmCRNE2) for help!\n\n## Quickstart (no need to clone this repo)\n\nThe `docker-compose.quickstart.yml` makes it easy to launch the latest stable version with \na postgresql database (with pg_vector extension), the opengpa backend and the frontend, on the same\nhost.\n\n```\ncurl -O https://raw.githubusercontent.com/eschnou/OpenGPA/main/docker-compose.quickstart.yml\necho \"OPENAI_API_KEY=your-key-here\" \u003e .env\ndocker compose -f docker-compose.quickstart.yml up -d\n```\n\n## Build and run with Docker\n\nThe simplest way to build and launch OpenGPA is using the provided Docker compose file:\n\n```bash\nexport OPENAI_API_KEY=sk-*** \ndocker compose up --build\n```\n\nThis will build the opengpa image from source with all required dependencies (in particular the Playwright\ndependencies for web browsing) and launch the service on port 3000. Opening http://localhost:3000 will lead you\nto the OpenAPI documentation.\n\n## Build and run the server\n\nIf you are on a Mac, the following should be enough to get you started and running this\nlocally.  \n\n\u003e [!WARNING]\n\u003e Building requires __Java 21__. If you are on a Mac, you can easily install it\n\u003e with `brew install openjdk@21`\n\nBy default, opengpa is using OpenAI gpt-4o as its LLM. Check the `application.properties` file \nfor configuration options and the spring-ai documentation to configure support for other LLMs.\n\n\n```bash\nmvn clean package -Pproduction\ndocker compose up -d db\nOPENAI_API_KEY=sk-*** java -jar opengpa-server/target/opengpa-server-0.2.0.jar\n```\n\nThe `docker compose up -d db` lauches the database part from the docker compose as opengpa requires\na postgres database with pg_vector for the RAG feature. \n\n# 🖥️ User Interface\n\nThe User Interface is available in the [OpenGPA Frontend repository](https://github.com/eschnou/opengpa-frontend) and\ncan be launched with docker.\n\n```\ngit clone https://github.com/eschnou/opengpa-frontend\ncd opengpa-frontend\ndocker build -t opengpa-frontend:latest .\ndocker run -p 8000:8000 opengpa-frontend\n```\n\n# 🐛 Debugging\n\nFor debugging purposes you can log all interactions and prompts using the following config:\n```\nopengpa.server.log-prompt=true\nopengpa.server.log-folder=/tmp/opengpa/logs\n```\n\n# 🤖 REST API\n\nYou can interact with your agent programatically through the [REST API](documentation/api.md). The up-to-date API Documentation\nis available on the backend server at [http://localhost:3000/swagger-ui.html](http://localhost:3000/swagger-ui.html)\nwith Swagger. You can also download the [yml](http://localhost:3000/api-docs.yml) or [json](http://localhost:3000/api-docs)\nversion of the API Documentation.\n\n# Using MCP with OpenGPA\n\nOpenGPA can leverage [MCP](https://modelcontextprotocol.io/introduction) to connect to third party services and use\ntheir tools. You can look at the maintained list of servers on the [official repository](https://github.com/modelcontextprotocol/servers) or\non marketplaces like [mcp.so](https://mcp.so/).\n\nMCP cannot be used with the starter Docker image. You need to rebuild your own docker image or run the java server\ndirectly from CLI. In order to use MCP, you should:\n\n1. Configure the path to your MCP server configuration in application.properties\n```\nspring.ai.mcp.client.stdio.servers-configuration=/path/to/mcp-servers.json\n```\n\n2. Configure your mcp-servers.json\n```\n{\n  \"mcpServers\": {\n      \"time\": {\n        \"command\": \"docker\",\n        \"args\": [\"run\", \"-i\", \"--rm\", \"mcp/time\"]\n      }\n  }\n}\n```\n\n# 📚 Using OpenGPA Libraries\n\nOpenGPA is designed as a modular system with reusable libraries. You can integrate these libraries into your own Java applications.\n\n## Maven Repository\n\nOur libraries are hosted at `https://dist.opengpa.org/packages`. To use them, add the repository to your pom.xml:\n\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003eopengpa-repository\u003c/id\u003e\n        \u003cname\u003eOpenGPA Repository\u003c/name\u003e\n        \u003curl\u003ehttps://dist.opengpa.org/packages\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\n## Available Modules\n\n### Core Module\n\nThe core module provides the foundational components for building agentic applications:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.opengpa\u003c/groupId\u003e\n    \u003cartifactId\u003eopengpa-core\u003c/artifactId\u003e\n    \u003cversion\u003e0.4.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Actions Module\n\nFor integrating with the extended action catalog:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.opengpa\u003c/groupId\u003e\n    \u003cartifactId\u003eopengpa-actions\u003c/artifactId\u003e\n    \u003cversion\u003e0.4.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### RAG Module\n\nFor retrieval-augmented generation capabilities:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.opengpa\u003c/groupId\u003e\n    \u003cartifactId\u003eopengpa-rag\u003c/artifactId\u003e\n    \u003cversion\u003e0.4.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### MCP Module\n\nFor Model Context Protocol integration:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.opengpa\u003c/groupId\u003e\n    \u003cartifactId\u003eopengpa-mcp\u003c/artifactId\u003e\n    \u003cversion\u003e0.4.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# Documentation\n- [Using local open-source LLM](documentation/offline.md)\n- [Creating a custom Action](documentation/actions.md)\n\n# Support\n- Join us on [Discord](https://discord.gg/3XPsmCRNE2)\n- Reach out on [X](https://x.com/opengpa)\n- File an [issue](https://github.com/eschnou/OpenGPA/issues) \n\n# License\n\nMIT License\n\nCopyright (c) 2024-2025 Laurent Eschenauer\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feschnou%2Fopengpa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feschnou%2Fopengpa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feschnou%2Fopengpa/lists"}