explaingit

lily-protocol/agentlily-runtime

14TypeScriptAudience · developerComplexity · 4/5ActiveSetup · moderate

TLDR

TypeScript scaffold for the AgentLily runtime in Lily Protocol, with one working happy-path flow (runtime, tools, tasks, events) and many extension points left open.

Mindmap

mindmap
  root((agentlily-runtime))
    Inputs
      Registered tools
      Task definitions
      Runtime context
    Outputs
      Tool call results
      Task history
      Structured events
    Use Cases
      Build a tool registry
      Prototype an agent runtime
      Contribute a memory backend
    Tech Stack
      TypeScript
      Node
      Vitest

Things people build with this

USE CASE 1

Register typed tools and execute a task end-to-end through the runtime

USE CASE 2

Implement a custom MemoryStore backend against the provided interface

USE CASE 3

Build a tracing or event-sink adapter to plug into the runtime event stream

Tech stack

TypeScriptNodeVitestnpm

Getting it running

Difficulty · moderate Time to first run · 30min

Many subsystems (wallet actions, persistent memory, model providers, policies) are scaffolded interfaces only, so anything beyond the happy path requires writing real implementations.

In plain English

agentlily-runtime is a TypeScript codebase that provides the execution layer for AgentLily instances in Lily Protocol, a project the README describes as autonomous agent finance infrastructure being built on the Stellar blockchain. The repository is explicitly framed as an open-source-ready foundation rather than a finished runtime, with one working code path and many deliberately unfinished extension points. What exists today is a narrow happy-path flow. You create an AgentRuntime, start it, register tools, build a runtime context for a task, send the task through a task runner and action executor, invoke a typed tool, store lightweight task history in memory, and emit runtime events and structured log entries. The README says this is intended to give contributors a working reference path without locking the project into premature architecture. The unfinished areas are listed openly. Wallet-aware and payment-aware actions, persistent memory and state backends, model provider integrations, policy engines and approval flows, long-running orchestration and scheduling, distributed and durable coordination, identity-aware execution, and richer tracing and metrics are all scaffolded with interfaces, types, or placeholders and are described as future contributor work. The source tree groups code into folders such as actions, agents, errors, events, guards, logger, memory, providers, runtime, state, tasks, and tools, with a tests folder for foundation and happy-path tests. To try it locally, the quick start is npm install, npm run build, and npm run test. A short usage example creates a runtime, registers an echo tool that returns the input message, calls executeTask with an agentId, taskId, and tool name, then logs the output. Helper scripts include npm run lint, npm run typecheck, npm run verify, and a Vitest coverage run. Contributor guidance suggests adding depth without collapsing the extension points, with example tasks such as implementing a new memory backend against the MemoryStore interface, adding tool allowlist policies, writing an event sink or tracing adapter, building a model provider adapter, or extending the task lifecycle. The README also notes that maintainers can immediately open issues around provider adapters, persistent storage, wallet-aware execution boundaries, observability, documentation, and test matrix expansion, drawing on a backlog list produced by the initial setup.

Copy-paste prompts

Prompt 1
Walk me through the executeTask happy path with an echo tool in agentlily-runtime
Prompt 2
Show how to implement a new memory backend against the MemoryStore interface
Prompt 3
Help me add a tool allowlist policy to the action executor
Prompt 4
Sketch a model provider adapter that fits the runtime's provider interface
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.