Standalone agentic framework for Apache Flink with LangChain4J integration. Java 17 target, Flink 2.2.1, LangChain4J 1.16.3.
src/main/java/org/agentic/flink/-- main source rootconfig/-- AgenticFlinkConfig, ConfigKeys (env-var-based configuration)core/-- ToolDefinition, shared model classesdsl/-- AgentBuilder fluent DSL for defining agentstools/-- ToolExecutor interface, AbstractToolExecutor, built-in toolstool/-- ToolRegistry (central tool registry with builder)langchain/-- ToolAnnotationRegistry, LangChainToolAdapter (@Tool bridge)storage/-- Multi-tier storage: StorageProvider, StorageFactory, ShortTermMemoryStore, LongTermMemoryStorestorage/memory/-- InMemoryShortTermStore, InMemoryLongTermStore (reference implementations)storage/redis/-- Redis-backed storagestorage/postgres/-- PostgreSQL-backed storagecontext/-- Context management (ContextItem, ContextWindowManager)statemachine/-- AgentStateMachine for workflow state transitionscep/-- Flink CEP integration for event-driven patternscompensation/-- Saga compensation/rollback supportexample/-- Working examples (SimpleCalculatorTool, ToolAnnotationExample)plugins/flintagents/-- Optional Apache Flink Agents integration (excluded from default build)
mvn clean test # unit tests
mvn test -P integration-tests # integration tests (requires containers)
mvn clean package -P flink-agents # build with optional Flink Agents plugin
The plugins/flintagents/ directory is excluded from the default Maven compiler configuration.
Enable it with -P flink-agents after building Flink Agents from source.
- AgentBuilder DSL:
Agent.builder().withId(...).withSystemPrompt(...).withTools(...).build() - StorageFactory:
StorageFactory.createShortTermStore("redis", config)-- factory for pluggable storage backends - ToolExecutor interface: Async tool execution via
CompletableFuture<Object> execute(Map<String, Object>) - @Tool annotations: LangChain4J annotation-based tool discovery via ToolAnnotationRegistry
- ToolRegistry:
ToolRegistry.builder().registerTool(name, executor).build()-- central tool registration
Config resolution order: explicit properties > environment variables (AGENTIC_FLINK_ prefix) > system properties (agentic.flink. prefix) > defaults.
See docs/configuration.md for the full reference.
- No TODOs, no placeholders -- implement working code or a working subset
- Uses Podman, not Docker
- All storage providers must be Serializable (Flink distributes across cluster)
- Mark non-serializable fields as transient and reinitialize in initialize()
- Tests use JUnit 5 with randomized data, not hardcoded values