OpenGPA is an Open-source General Purpose Agent. A self-hosted solution supporting smart AI agent developments with chain of thought, tool use and memory access through RAG.
OpenGPA is much more than a UI on top of a LLM. It implements an agentic workflow, where a LLM is used as the brain of an agent to reason through multiple steps of planning, reasoning, and tool use. In particular, OpenGpa is using the ReAct approach to verbally reason on the next step, decide on the action to execute, and observe the outcome.
{
"reasoning": "The user wants to know the current weather in Liege, Belgium.
The best action to get this information is to perform a web search with
the query 'current weather in Liege, Belgium'. The result of this action
will then be used to respond to the user's request.
This is not the final action as we have to get the results from the web
search first."
"action": {
"name": "webSearch",
"arguments": {
"query": "current weather in Liege, Belgium"
}
},
"is_final": false
}
Action selection is based on a catalog of action that can easily be extended through code. You could add an action to tap into an internal service to fetch some data, or a workflow engine to trigger a next step, etc.
The current version already packs a few interesting pieces:
Improve the Agentic capabilities:
Make OpenGPA enterprise ready:
In case of trouble, please reach out on Discord for help!
The docker-compose.quickstart.yml
makes it easy to launch the latest stable version with
a postgresql database (with pg_vector extension), the opengpa backend and the frontend, on the same
host.
curl -O https://raw.githubusercontent.com/eschnou/OpenGPA/main/docker-compose.quickstart.yml
echo "OPENAI_API_KEY=your-key-here" > .env
docker compose -f docker-compose.quickstart.yml up -d
The simplest way to build and launch OpenGPA is using the provided Docker compose file:
export OPENAI_API_KEY=sk-***
docker compose up --build
This will build the opengpa image from source with all required dependencies (in particular the Playwright dependencies for web browsing) and launch the service on port 3000. Opening http://localhost:3000 will lead you to the OpenAPI documentation.
If you are on a Mac, the following should be enough to get you started and running this locally.
[!WARNING] Building requires Java 21. If you are on a Mac, you can easily install it with
brew install openjdk@21
By default, opengpa is using OpenAI gpt-4o as its LLM. Check the application.properties
file
for configuration options and the spring-ai documentation to configure support for other LLMs.
mvn clean package -Pproduction
docker compose up -d db
OPENAI_API_KEY=sk-*** java -jar opengpa-server/target/opengpa-server-0.2.0.jar
The docker compose up -d db
lauches the database part from the docker compose as opengpa requires
a postgres database with pg_vector for the RAG feature.
The User Interface is available in the OpenGPA Frontend repository and can be launched with docker.
git clone https://github.com/eschnou/opengpa-frontend
cd opengpa-frontend
docker build -t opengpa-frontend:latest .
docker run -p 8000:8000 opengpa-frontend
For debugging purposes you can log all interactions and prompts using the following config:
opengpa.server.log-prompt=true
opengpa.server.log-folder=/tmp/opengpa/logs
You can interact with your agent programatically through the REST API. The up-to-date API Documentation is available on the backend server at http://localhost:3000/swagger-ui.html with Swagger. You can also download the yml or json version of the API Documentation.
OpenGPA can leverage MCP to connect to third party services and use their tools. You can look at the maintained list of servers on the official repository or on marketplaces like mcp.so.
MCP cannot be used with the starter Docker image. You need to rebuild your own docker image or run the java server directly from CLI. In order to use MCP, you should:
spring.ai.mcp.client.stdio.servers-configuration=/path/to/mcp-servers.json
{
"mcpServers": {
"time": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp/time"]
}
}
}
OpenGPA is designed as a modular system with reusable libraries. You can integrate these libraries into your own Java applications.
Our libraries are hosted at https://dist.opengpa.org/packages
. To use them, add the repository to your pom.xml:
<repositories>
<repository>
<id>opengpa-repository</id>
<name>OpenGPA Repository</name>
<url>https://dist.opengpa.org/packages</url>
</repository>
</repositories>
The core module provides the foundational components for building agentic applications:
<dependency>
<groupId>org.opengpa</groupId>
<artifactId>opengpa-core</artifactId>
<version>0.4.0</version>
</dependency>
For integrating with the extended action catalog:
<dependency>
<groupId>org.opengpa</groupId>
<artifactId>opengpa-actions</artifactId>
<version>0.4.0</version>
</dependency>
For retrieval-augmented generation capabilities:
<dependency>
<groupId>org.opengpa</groupId>
<artifactId>opengpa-rag</artifactId>
<version>0.4.0</version>
</dependency>
For Model Context Protocol integration:
<dependency>
<groupId>org.opengpa</groupId>
<artifactId>opengpa-mcp</artifactId>
<version>0.4.0</version>
</dependency>
MIT License
Copyright (c) 2024-2025 Laurent Eschenauer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "mcpServers": { "opengpa": { "command": "docker", "args": [ "run", "-i", "--rm", "mcp/time" ] } } }
Related projects feature coming soon
Will recommend related projects based on sub-categories