ChatRequest / ChatResponse / Message / streaming callbacks
Intelligence that goes beyond answers
and takes real action.
From unified LLM abstractions to ReAct / Harness Runtime and HITL approval and recovery, AgentForge gives Java developers a transparent, controllable, and extensible foundation for intelligent agents.
Inspect the project and propose the next implementation plan.
- 01THINKdone
Identify the goal and current context
- 02TOOLdone
repository.inspect()
- 03ACTrunning
Generate an executable task plan
A clear path from intent to action
Every layer has a clear boundary. Every step can be observed, replaced and extended.
Built for agent engineering
Eight core capabilities cover model access, tool calling, HITL approval, Harness runtime and a ready-to-use workbench.
Unified LLM
OpenAI, Anthropic and other models share one interface, keeping upper layers free from vendor lock-in.
Agent Runtime
A ReAct loop coordinates reasoning, action, observation and stopping in a transparent runtime.
Tool Calling
Local Java methods, HTTP plugins and MCP services all become Function Calls with one unified pipeline for schema, argument binding, execution and result write-back.
Middleware
Attach logging, tracing, auditing and masking to model calls, tool execution and the Agent loop, keeping cross-cutting logic out of the main loop.
Messages & Events
Unified messages and streaming events bring synchronous results, reasoning deltas, tool calls and frontend SSE onto the same semantics.
Human-in-the-Loop
Permission ALLOW / DENY / ASK and AskUser share one interrupt kernel: freeze the tool batch, suspend normally as SUSPENDED, then resume with a structured response from the business layer.
Harness Agent
Initial local runtime: HarnessAgent binds a Workspace and LocalRuntime to provide file, search and command tools, prompt rendering and resource lifecycle.
Service Workbench
Model configuration, Agent debugging, version publishing, session replay and tracing out of the box — experience the full Agent workbench.
A bottom-up Agent stack
Compose upward from protocol contracts; every layer can be replaced independently.
Local / HTTP / MCP unified ToolSpecification and executors
Think → Act → memory write-back, sync, streaming, cancel and retry
Composable cross-cutting logic across loop, model, tool and stop stages
Initial local Harness runtime, HITL approval and recovery, and a ready-to-use Agent workbench
Bring only what you need
Manage versions with one BOM and compose from model contracts to the Agent runtime.
agentforge-model-apiProvider-neutral model contracts and unified req/vo
agentforge-model-coreDefault parameter merge, JDK HTTP transport and Tool engine
agentforge-model-openaiOpenAI / OpenAI-compatible Provider
agentforge-model-anthropicAnthropic Messages Provider
agentforge-model-registryOut-of-the-box ChatModel factory assembled from config
agentforge-agent-coreReAct Agent, Middleware, Memory and Tool extensions
<dependency>
<groupId>cloud.changlu.agentforge</groupId>
<artifactId>agentforge-agent-core</artifactId>
<version>1.0.2-SNAPSHOT</version>
</dependency>Your first Agent in a few dozen lines
Inject models, memory and tools, then run synchronously or with streaming. The same ReActAgent instance switches freely between both modes.
ReActAgent agent = ReActAgent.builder()
.chatModel(chatModel)
.streamingChatModel(streamingChatModel)
.chatMemoryProvider(new MessageWindowChatMemoryProvider(50))
.toolService(toolService)
.middleware(new LoggingIAgentMiddleware())
.build();
ChatResult result = agent.run(AgentRequest.builder()
.memoryId("user-1")
.question("北京今天天气怎么样?")
.build());Skip the frontend work and start the workbench
AgentForge Service provides model configuration, Agent debugging, version publishing, session replay and tracing. One Docker command gives you the full loop.