Skip to content

Add llama-atmosphere-agent: local JVM coding agent with Atmosphere - #444

Merged
bernardladenthin merged 2 commits into
mainfrom
claude/jolly-noether-jlebto
Sep 21, 2026
Merged

bernardladenthin merged 2 commits into
mainfrom
claude/jolly-noether-jlebto

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • New standalone project llama-atmosphere-agent/: a copy-and-run terminal coding agent (Claude Code / OpenCode reduced to essentials) that pairs Atmosphere's built-in OpenAI-compatible agent runtime with java-llama.cpp's OpenAiCompatServer. Supports both external server mode (--base-url) and in-process model loading (--model).
  • Agent capabilities: streaming responses, tool-calling loop, workspace-confined file tools (ls, read_file, write_file, edit_file, glob, grep, delete, rename), and optional shell execution (--allow-shell).
  • Core classes: AgentOptions (command-line parsing), LocalAgent (entry point), AgentRunner (minimal Atmosphere wiring), ConsoleSession (streaming output + file system injection), ShellTool (optional shell tool).
  • Test coverage: model-free wire-contract tests (AtmosphereWireContractTest) verify the real OpenAiCompatServer over loopback with scripted backend; model-backed integration test (AtmosphereToolLoopIntegrationTest) runs the full loop against Qwen2.5-1.5B.
  • CI integration: two new GitHub Actions jobs — model-free tests on every PR (seconds), model-backed validation job (minutes, non-blocking).
  • Minor core changes: made ChunkSink and OpenAiBackend constructor public to support test backends; updated OpenAiCompatServer javadoc.

Test plan

  • Affected unit / integration tests pass locally
    • AgentOptionsTest: command-line parsing (all flags, defaults, validation)
    • LocalAgentTest: end-to-end with scripted backend, workspace file tools
    • AtmosphereWireContractTest: wire contract (tool calls, role=tool, multi-round) over real loopback server
    • AtmosphereToolLoopIntegrationTest: real model loop (Qwen2.5-1.5B, skips if model absent)
    • ShellToolTest: shell execution in workspace
  • CI is green on this branch
    • test-java-llama-atmosphere-agent (model-free, every PR)
    • test-java-llama-atmosphere-agent-integration (model-backed, validation-only)
  • Docs / CHANGELOG updated
    • llama-atmosphere-agent/README.md: quick start, usage, architecture
    • README.md: new "Local coding agent with Atmosphere" section
    • CHANGELOG.md: added entry
    • CLAUDE.md: release process for standalone project
    • TODO.md: follow-up items

Related issues / PRs

Closes the local coding agent feature gap; pairs with Atmosphere's built-in runtime to provide a complete offline JVM agent.

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes

https://claude.ai/code/session_01UVwj2UuMPybiK1bHyG9toH

…enAiCompatServer

A standalone (non-reactor, unpublished) Maven project that drives Atmosphere's
built-in OpenAI-compatible agent runtime headless -- no Spring Boot, no servlet
container -- against java-llama.cpp's OpenAI-compatible server: streaming, the
model->tool->model loop, Atmosphere's workspace-confined file tools and an
opt-in run_command tool. Run with `mvn compile exec:java` against a running
server (--base-url) or with the GGUF hosted in-process (--model).

Verified two ways and wired into CI:
- AtmosphereWireContractTest / LocalAgentTest: the REAL OpenAiCompatServer over
  a loopback socket with a scripted engine replaying llama.cpp-shaped chunks --
  tool_calls deltas by index, a parallel pair with interleaved argument
  fragments, four consecutive rounds with the full history kept, chunked
  streaming + history replay, 401 before the backend, and the one known
  Atmosphere gap (an in-stream `data: {"error":...}` after HTTP 200 is ignored
  by its SSE parser). Model-free, seconds, every PR.
- AtmosphereToolLoopIntegrationTest: the same loop against the cached
  Qwen2.5-1.5B tool model (validation-only CI job, self-skips without the GGUF).

Result: Atmosphere works unchanged (verdict A). The only core change is making
the existing test seam public (OpenAiBackend, ChunkSink and the backend
constructor of OpenAiCompatServer) so a sibling project can drive the real
server without a model.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UVwj2UuMPybiK1bHyG9toH
… pom after it

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UVwj2UuMPybiK1bHyG9toH
@bernardladenthin
bernardladenthin merged commit 590e620 into main Sep 21, 2026
10 of 16 checks passed
@bernardladenthin
bernardladenthin deleted the claude/jolly-noether-jlebto branch September 21, 2026 12:36
@sonarqubecloud

Copy link
Copy Markdown

This branch had an error being deployed

1 failed deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants