{"id":49325537,"url":"https://github.com/The-Pocket/PocketFlow-Java","last_synced_at":"2026-05-29T21:00:53.975Z","repository":{"id":287471931,"uuid":"964771065","full_name":"The-Pocket/PocketFlow-Java","owner":"The-Pocket","description":"Pocket Flow: A minimalist LLM framework. Let Agents build Agents!","archived":false,"fork":false,"pushed_at":"2025-04-11T22:36:18.000Z","size":919,"stargazers_count":23,"open_issues_count":2,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T21:55:48.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/The-Pocket.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":"2025-04-11T18:58:28.000Z","updated_at":"2025-09-23T06:11:47.000Z","dependencies_parsed_at":"2025-04-11T23:40:58.037Z","dependency_job_id":null,"html_url":"https://github.com/The-Pocket/PocketFlow-Java","commit_stats":null,"previous_names":["the-pocket/pocketflow-java"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/The-Pocket/PocketFlow-Java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Pocket%2FPocketFlow-Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Pocket%2FPocketFlow-Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Pocket%2FPocketFlow-Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Pocket%2FPocketFlow-Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/The-Pocket","download_url":"https://codeload.github.com/The-Pocket/PocketFlow-Java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Pocket%2FPocketFlow-Java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33670211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":[],"created_at":"2026-04-26T20:00:31.588Z","updated_at":"2026-05-29T21:00:53.969Z","avatar_url":"https://github.com/The-Pocket.png","language":"Java","funding_links":[],"categories":["人工智能"],"sub_categories":["LLM框架"],"readme":"# PocketFlow Java\n\nA minimalist LLM framework, ported from Python to Java.\n\n## Overview\n\nPocketFlow Java is a direct port of the original [Python PocketFlow](https://github.com/The-Pocket/PocketFlow) framework. It provides a lightweight, flexible system for building and executing LLM-based workflows through a simple node-based architecture.\n\n\u003e **Note:** This is an initial implementation that currently does not support asynchronous operations. Community contributors are welcome to help enhance and maintain this project.\n\n## Installation\n\n### Maven\n\nAdd the following dependency to your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.the-pocket\u003c/groupId\u003e\n    \u003cartifactId\u003ePocketFlow\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n\n**Groovy DSL (`build.gradle`):**\n```groovy\ndependencies {\n    implementation 'io.github.the-pocket:PocketFlow:1.0.0'\n}\n```\n\n**Kotlin DSL (`build.gradle.kts`):**\n```kotlin\ndependencies {\n    implementation(\"io.github.the-pocket:PocketFlow:1.0.0\")\n}\n```\n\n## Usage\n\nHere's a simple example of how to use PocketFlow Java in your application:\n\n```java\nimport io.github.the_pocket.PocketFlow;\nimport io.github.the_pocket.PocketFlow.*;\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class MyWorkflowApp {\n\n    // Define a custom start node\n    static class MyStartNode extends Node\u003cVoid, String, String\u003e {\n        @Override\n        public String exec(Void prepResult) {\n            System.out.println(\"Starting workflow...\");\n            return \"started\";\n        }\n    }\n\n    // Define a custom end node\n    static class MyEndNode extends Node\u003cString, Void, Void\u003e {\n        @Override\n        public String prep(Map\u003cString, Object\u003e ctx) {\n            return \"Preparing to end workflow\"; \n        }\n        \n        @Override\n        public Void exec(String prepResult) {\n            System.out.println(\"Ending workflow with: \" + prepResult);\n            return null;\n        }\n    }\n\n    public static void main(String[] args) {\n        // Create instances of your nodes\n        MyStartNode startNode = new MyStartNode();\n        MyEndNode endNode = new MyEndNode();\n\n        // Connect the nodes\n        startNode.next(endNode, \"started\");\n\n        // Create a flow with the start node\n        Flow\u003cString\u003e flow = new Flow\u003c\u003e(startNode);\n\n        // Create a context and run the flow\n        Map\u003cString, Object\u003e context = new HashMap\u003c\u003e();\n        System.out.println(\"Executing workflow...\");\n        flow.run(context);\n        System.out.println(\"Workflow completed successfully.\");\n    }\n}\n```\n\n## Development\n\n### Building the Project\n\n```bash\nmvn compile\n```\n\n### Running Tests\n\n```bash\nmvn test\n```\n\n## Contributing\n\nContributions are welcome! We're particularly looking for volunteers to:\n\n1. Implement asynchronous operation support\n2. Add comprehensive test coverage\n3. Improve documentation and provide examples\n\n\nPlease feel free to submit pull requests or open issues for discussion.\n\n## License\n\n[MIT License](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThe-Pocket%2FPocketFlow-Java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThe-Pocket%2FPocketFlow-Java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThe-Pocket%2FPocketFlow-Java/lists"}