{"id":49325531,"url":"https://github.com/11divyansh/OxyJen","last_synced_at":"2026-05-29T21:00:53.598Z","repository":{"id":314581534,"uuid":"1056059927","full_name":"11divyansh/OxyJen","owner":"11divyansh","description":"OxyJen is an open-source Java framework for orchestrating LLM workloads with graph-style execution, context-aware memory, and deterministic retry/fallback. It treats LLMs as native nodes (not helper utilities), allowing developers to build multi-step AI pipelines that integrate cleanly with existing Java code.","archived":false,"fork":false,"pushed_at":"2026-05-22T16:35:35.000Z","size":551,"stargazers_count":32,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-22T20:54:28.322Z","etag":null,"topics":["agents","ai","chatgpt","dag","graph","java","langchain","langchain4j","langgraph","llm","openai","runtime","tools","workflow"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/11divyansh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-13T09:59:43.000Z","updated_at":"2026-05-22T16:35:39.000Z","dependencies_parsed_at":"2026-02-17T20:01:49.769Z","dependency_job_id":null,"html_url":"https://github.com/11divyansh/OxyJen","commit_stats":null,"previous_names":["11divyansh/oxyjen"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/11divyansh/OxyJen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11divyansh%2FOxyJen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11divyansh%2FOxyJen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11divyansh%2FOxyJen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11divyansh%2FOxyJen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/11divyansh","download_url":"https://codeload.github.com/11divyansh/OxyJen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11divyansh%2FOxyJen/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":["agents","ai","chatgpt","dag","graph","java","langchain","langchain4j","langgraph","llm","openai","runtime","tools","workflow"],"created_at":"2026-04-26T20:00:31.588Z","updated_at":"2026-05-29T21:00:53.588Z","avatar_url":"https://github.com/11divyansh.png","language":"Java","funding_links":[],"categories":["人工智能"],"sub_categories":["LLM框架"],"readme":"# OxyJen🫧\n\n**OxyJen** is the missing deterministic AI Runtime for Java \u0026 JVM enterprises.  \n\n**Deterministic AI Workflow Runtime for the JVM** - Build complex AI pipelines with simplicity and power.\n\n---\n\n## What is Oxyjen?\n\nOxyjen is a **graph-based orchestration framework** for building AI applications in Java. It provides a clean, extensible architecture for connecting LLMs, data processors, and custom logic into powerful workflows.\n\nThink of it as **the plumbing for your AI pipelines**, you focus on what each step does, Oxyjen handles the execution flow.\n\n## \"Why Oxyjen When LangChain4j Exists?\"\n\n**I get it, this is the first question you're thinking.** Let me be completely honest.\n\n### The Story\n\nI started building Oxyjen without knowing LangChain4j existed. When I discovered it halfway through, I had a choice:\n1. Abandon the project\n2. Find a way to differentiate\n\n**I chose to differentiate.**\n**I wanted to learn how OSS works.**\n**I wanted to build this in public.**\n\n### How Oxyjen Will Be Different\n\nLangChain4j is a solid framework focused on **feature breadth**, lots of integrations, lots of tools. That's great for many use cases.\n\nOxyjen is taking a different path, focused on **developer experience and production readiness**\n\nOxyjen is meant for runtime reliability, your graphs will be self-aware and will make sure to provide less failure, even if a node fails, Oxyjen will learn from it and improve.\n\nFeatures like, async, project loom, parallel processing, java concurrency will lay down the foundation of fail-safe graph structure for Oxyjen.\n\nI'm not here to compete with Langchain4j, I'm here to create a reliable execution engine for devs.\n\n\n### Why Oxyjen?\n\nModern AI applications need more than just API calls. They need:\n- **Complex workflows** with multiple steps\n- **Type safety** to catch errors at compile time\n- **Observability** to debug what's happening\n- **Testability** to ensure reliability\n- **Extensibility** to add custom logic\n\nOxyjen provides all of this with a simple, intuitive API.\n\n---\n\n## Quick Example\n```java\n// Build a 3-step text processing pipeline\nGraph pipeline = GraphBuilder.named(\"text-processor\")\n    .addNode(new UppercaseNode())\n    .addNode(new ReverseNode())\n    .addNode(new PrefixNode(\"OUTPUT: \"))\n    .build();\n\n// Execute with context\nNodeContext context = new NodeContext();\nExecutor executor = new Executor();\n\nString result = executor.run(pipeline, \"hello world\", context);\nSystem.out.println(result);\n// Output: OUTPUT: DLROW OLLEH\n```\n\nThat's it! Clean, simple, powerful.\n\n---\n\n## Architecture\n\nOxyjen is built around four core concepts:\n\n### 1️**Graph** - The Pipeline Blueprint\nA `Graph` defines the structure of your pipeline - which nodes run in what order.\n```java\npublic class Graph {\n    private final String name;\n    private final List\u003cNodePlugin\u003c?, ?\u003e\u003e nodes;\n    \n    // Add nodes to your pipeline\n    public Graph addNode(NodePlugin\u003c?, ?\u003e node);\n    \n    // Get all nodes in execution order\n    public List\u003cNodePlugin\u003c?, ?\u003e\u003e getNodes();\n}\n```\n\n**Think of it as:** Your pipeline's DNA - it knows what needs to happen, but doesn't execute anything.\n\n### 2️**NodePlugin** - The Processing Unit\nA `NodePlugin` is a single step in your pipeline. Each node transforms input into output.\n```java\npublic interface NodePlugin\u003cI, O\u003e {\n    // Core processing logic\n    O process(I input, NodeContext context);\n    \n    // Unique identifier for this node\n    default String getName() { \n        return this.getClass().getSimpleName(); \n    }\n    \n    // Lifecycle hooks for setup/cleanup\n    default void onStart(NodeContext context) {}\n    default void onFinish(NodeContext context) {}\n    default void onError(Exception e, NodeContext context) {}\n}\n```\n\n**Think of it as:** A Lego brick - small, focused, composable.\n\n**Example node:**\n```java\npublic class SummarizerNode implements NodePlugin\u003cString, String\u003e {\n    @Override\n    public String process(String input, NodeContext context) {\n        context.getLogger().info(\"Summarizing text...\");\n        // Your logic here (will be LLM call in v0.2)\n        return \"Summary: \" + input.substring(0, 100);\n    }\n    \n    @Override\n    public void onStart(NodeContext context) {\n        context.getLogger().info(\"Summarizer node starting\");\n    }\n}\n```\n\n### 3️**Executor** - The Runtime Engine\nThe `Executor` runs your graph, calling each node in sequence and passing outputs to inputs.\n```java\npublic class Executor {\n    public \u003cI, O\u003e O run(Graph graph, I input, NodeContext context) {\n        // Validates graph structure\n        // Executes nodes sequentially\n        // Handles errors and lifecycle hooks\n        // Returns final output\n    }\n}\n```\n\n**Think of it as:** The conductor of an orchestra - coordinates everything.\n\n**How it works:**\n1. Takes your `Graph` and initial `input`\n2. For each node:\n   - Calls `onStart()` lifecycle hook\n   - Executes `process()` with current data\n   - Calls `onFinish()` lifecycle hook\n   - Passes output to next node\n3. Returns final result\n\n### 4️**NodeContext** - Shared Memory \u0026 State\nThe `NodeContext` is shared across all nodes, providing logging and state management.\n```java\npublic class NodeContext {\n    // Store/retrieve shared data\n    public void set(String key, Object value);\n    public \u003cT\u003e T get(String key);\n    \n    // Logging\n    public Logger getLogger();\n    public OxyLogger getOxyjenLogger();\n    \n    // Metadata (e.g., graph name, execution ID)\n    public void setMetadata(String key, Object value);\n    public \u003cT\u003e T getMetadata(String key);\n    \n    // Error handling\n    public ExceptionHandler getExceptionHandler();\n}\n```\n\n**Think of it as:** A shared notebook that all nodes can read/write to.\n\n**Example usage:**\n```java\npublic String process(String input, NodeContext ctx) {\n    // Log what's happening\n    ctx.getLogger().info(\"Processing: \" + input);\n    \n    // Store intermediate results\n    ctx.set(\"word_count\", input.split(\" \").length);\n    \n    // Share data between nodes\n    String previousResult = ctx.get(\"previous_output\");\n    \n    return processedOutput;\n}\n```\n\n---\n\n## Complete Working Example\n```java\npackage examples;\n\nimport io.oxyjen.core.*;\n\npublic class ContentPipeline {\n    \n    public static void main(String[] args) {\n        // Step 1: Define your nodes\n        NodePlugin\u003cString, String\u003e validator = new ValidationNode();\n        NodePlugin\u003cString, String\u003e processor = new ProcessingNode();\n        NodePlugin\u003cString, String\u003e formatter = new FormatterNode();\n        \n        // Step 2: Build your graph\n        Graph pipeline = GraphBuilder.named(\"content-pipeline\")\n            .addNode(validator)\n            .addNode(processor)\n            .addNode(formatter)\n            .build();\n        \n        // Step 3: Create execution context\n        NodeContext context = new NodeContext();\n        context.set(\"max_length\", 100);\n        \n        // Step 4: Execute\n        Executor executor = new Executor();\n        String result = executor.run(pipeline, \"Raw input text\", context);\n        \n        System.out.println(\"Final output: \" + result);\n        System.out.println(\"Word count: \" + context.get(\"word_count\"));\n    }\n}\n\n// Example node implementations\nclass ValidationNode implements NodePlugin\u003cString, String\u003e {\n    @Override\n    public String process(String input, NodeContext ctx) {\n        if (input == null || input.isEmpty()) {\n            throw new IllegalArgumentException(\"Input cannot be empty\");\n        }\n        ctx.getLogger().info(\"✓ Input validated\");\n        return input;\n    }\n}\n\nclass ProcessingNode implements NodePlugin\u003cString, String\u003e {\n    @Override\n    public String process(String input, NodeContext ctx) {\n        String processed = input.toUpperCase().trim();\n        ctx.set(\"word_count\", processed.split(\" \").length);\n        ctx.getLogger().info(\"✓ Text processed\");\n        return processed;\n    }\n}\n\nclass FormatterNode implements NodePlugin\u003cString, String\u003e {\n    @Override\n    public String process(String input, NodeContext ctx) {\n        Integer maxLength = ctx.get(\"max_length\");\n        String formatted = input.length() \u003e maxLength \n            ? input.substring(0, maxLength) + \"...\" \n            : input;\n        ctx.getLogger().info(\"✓ Text formatted\");\n        return formatted;\n    }\n}\n```\n\n---\n\n## My Vision for Oxyjen\n\n## Vision\n- Bring AI orchestration (LangChain/LangGraph style) to Java.  \n- Build enterprise-first modules: LLM agents, Audit tools, Secure complex Workflow Engine.  \n- Focus on **performance, security, and observability**.\n- I'm building this to learn java in a much deeper way.\n\n### **Phase 5 in progress**\n- **RAG support** - Vector databases, embeddings, document loaders\n- **Cost management** - Budgets, limits, usage tracking\n- **Enterprise features** - Audit logs, RBAC, compliance\n- **Multi-tenancy** - Isolate data between users/orgs\n- **Async execution** - Run nodes in parallel\n- **DAG support** - Complex branching workflows\n- **Circuit breakers** - Fail fast when services are down\n- **Streaming responses**\n- **Token counting \u0026 cost tracking**\n\n---\n\n## Documentation\n\n- [Oxyjen v0.2](docs/v0.2.md)\n- [Oxyjen v0.3](docs/v0.3.md)\n- [Oxyjen v0.4](docs/v0.4.md)\n\n---\n\n## Installation\n\n[![](https://jitpack.io/v/11divyansh/Oxyjen.svg)](https://jitpack.io/#11divyansh/Oxyjen/v0.2.0)\n\n\n### Maven\n\n**Add JitPack repository:**\n```xml\n\u003crepositories\u003e\n  \u003crepository\u003e\n    \u003cid\u003ejitpack.io\u003c/id\u003e\n    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n  \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\n**Add dependency:**\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.11divyansh\u003c/groupId\u003e\n  \u003cartifactId\u003eOxyjen\u003c/artifactId\u003e\n  \u003cversion\u003ev0.4.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n```gradle\nrepositories {\n  maven { url 'https://jitpack.io' }\n}\n\ndependencies {\n  implementation 'com.github.11divyansh:Oxyjen:v0.4.0'\n}\n```\n\n### Build from Source\n```bash\ngit clone https://github.com/11divyansh/OxyJen.git\ncd OxyJen\nmvn clean install\n```\n\nAfter installation, verify by importing:\n\n```java\nimport io.oxyjen.core.*;\nimport io.oxyjen.llm.*;\nimport io.oxyjen.tools.*;\n```\n---\n\n## About\n\nBuilt with ❤️ by [Divyansh Bhatt](https://github.com/11divyansh) - a BTech CS student who believes Java deserves world-class AI tooling.\n\n**This started as a learning project, but I'm committed to making it production-ready. I know this is not big yet, but lets make it valuable.**\n\n### Get Involved\n\n- **Star this repo** to follow the journey and be a part of it\n- **Report bugs** via [Issues](../../issues)\n- **Suggest features** via [Discussions](../../discussions)\n- **Contribute** code or documentation\n- **Share** on Twitter/LinkedIn if you find it useful\n\n---\n\n** Watch for updates on v0.5 progress!**\n\n## License\n[Apache 2.0](LICENSE) (open-source, enterprise-friendly) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F11divyansh%2FOxyJen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F11divyansh%2FOxyJen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F11divyansh%2FOxyJen/lists"}