This project is a Java/Spring implementation inspired by Pi, built to serve business delivery. Its core value is lowering adoption friction for Java teams that want Pi-style agent workflows but are not TypeScript-first.
When contributing, anchor to outcomes first:
- Define target business/usage impact.
- Implement toward that target.
- Verify with executable evidence.
- Reflect on gaps/risks.
- Optimize and close the loop with code + tests + docs.
This is a multi-module Maven repo:
pi-core: shared contracts and models.pi-llm: provider implementations and routing.pi-session: session tree and persistence.pi-tools: tool execution and permissions.pi-cli: CLI entrypoint.pi-starter: Spring Boot auto-configuration.spring-test-example/,example-project/: runnable integration examples.docs/: quickstart and capability notes.
mvn clean compile: compile all modules.mvn test: run full test suite.mvn -pl <module> -am test: run module-focused tests.printf "help\nexit\n" | mvn -pl pi-cli -DskipTests exec:java: CLI smoke.mvn -f spring-test-example/pom.xml spring-boot:run: Spring integration smoke../scripts/benchmark_smoke.sh: canonical open-source smoke benchmark (logs + report).
Use Java 17+ and Maven 3.8+. Build artifacts target Java 17 bytecode and remain compatible with later LTS JDKs.
- Java style: 4-space indentation, no tabs.
PascalCaseclasses,camelCasemethods/fields,UPPER_SNAKE_CASEconstants.- Existing Java APIs remain under
com.pi.mono.*for source compatibility; published Maven coordinates usecom.pi:*. - Prefer small, cohesive classes and explicit method names.
- Frameworks: JUnit 5, Spring Boot Test, Mockito.
- Add/adjust tests for behavior changes in session flow, provider routing, and starter auto-configuration.
- PRs should include: purpose, impacted modules, verification commands/results, and user/business impact for Java/Spring adopters.
- Never commit real keys (for example
pi.llm.openai.api-key). - Validate both starter config and runtime behavior when changing properties.