Skip to content

feat(llamadrome): Multi-backend LLM agent with requestEvaluation#3077

Merged
kriskowal merged 2 commits intoendojs:llmfrom
zmanian:llm
Feb 7, 2026
Merged

feat(llamadrome): Multi-backend LLM agent with requestEvaluation#3077
kriskowal merged 2 commits intoendojs:llmfrom
zmanian:llm

Conversation

@zmanian
Copy link

@zmanian zmanian commented Feb 7, 2026

Summary

  • Bring Llamadrome package from kriskowal-llm branch to llm branch
  • Refactor into modular architecture with pluggable LLM backends (Ollama and Anthropic Claude), selected via LLM_BACKEND env var
  • Wire requestEvaluation() so the agent can propose code for sandboxed evaluation with host approval
  • Add project CLAUDE.md capturing Endo coding conventions (harden exports, @ts-check, JSDoc types, error handling patterns)

Architecture

llm-agent.js (thin orchestrator)
  +-- ollama-backend.js   (transcript + best-effort code extraction)
  +-- anthropic-backend.js (tool calling loop: request_evaluation, list_names, lookup_value)
  +-- system-prompt.js    (shared prompt describing ocap environment)

New dependency

  • @anthropic-ai/sdk ^0.39.0 (MIT, ~4M weekly downloads, minimal transitive deps)

Test plan

  • node --check passes on all new JS files
  • yarn install resolves cleanly
  • Existing daemon tests unaffected (pre-existing failures remain unchanged)
  • Ollama backend: LLM_BACKEND=ollama endo run --UNCONFINED packages/llamadrome/setup.js --powers AGENT
  • Anthropic backend: LLM_BACKEND=anthropic ANTHROPIC_API_KEY=... endo run --UNCONFINED packages/llamadrome/setup.js --powers AGENT

Generated with Claude Code

zmanian and others added 2 commits February 6, 2026 14:53
Guests can now propose JavaScript code for evaluation via
requestEvaluation(), which sends an eval-request message to the host.
The host reviews the source code and endowment mappings, then approves
(approveEvaluation) or rejects. On approval, code executes in a
sandboxed Compartment using only the guest's own namespace, ensuring
namespace isolation from the host.

Also fixes pre-existing daemon startup failures: renames nodeNumber to
nodeId in the endo bootstrap exo and completes the least-authority exo
to match GuestInterface.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bring the Llamadrome package from kriskowal-llm branch and refactor it
into a modular architecture with pluggable LLM backends. The agent can
now use either Ollama or Anthropic Claude (selected via LLM_BACKEND env
var) and proposes code for sandboxed evaluation via requestEvaluation().

- Add system-prompt.js with shared prompt describing ocap environment
- Add ollama-backend.js with transcript management and best-effort
  code extraction from fenced blocks
- Add anthropic-backend.js with tool calling loop (request_evaluation,
  list_names, lookup_value)
- Refactor llm-agent.js into thin orchestrator delegating to backends
- Add @anthropic-ai/sdk dependency
- Add project CLAUDE.md with Endo coding conventions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 7, 2026

⚠️ No Changeset found

Latest commit: 45b6a3d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kriskowal kriskowal merged commit 80322c3 into endojs:llm Feb 7, 2026
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