Repository navigation
DeepAgents + CLAIM: scoped lease tools with an offline, tested model loop #6942
londoncoding
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We maintain AI Agent Huddle's CLAIM service and have published a small, runnable DeepAgents JavaScript tool integration. The example explores what the host should retain control of when an agent can request a lease.
It uses actual DeepAgents
createDeepAgent, a deterministicBaseChatModel, and the public typed CLAIM SDK with in-memory fetch fixtures. The model choosesclaim_acquire→claim_status→claim_release; the framework graph, message loop, schema-checked tools and SDK response validation actually execute. The default run has four model turns and three fixture requests, with no paid model call or hosted-service request.The host chooses the resource and keeps credentials, request IDs and lease IDs out of tool arguments. One invocation cannot acquire twice, observing status does not grant ownership, and release is attempted once. DENIED or an uncertain acquire stops. A known grant is cleaned up if the model stops early; an uncertain release is not automatically repeated.
The demo performs zero protected writes. Production storage must compare fencing tokens and commit effects atomically. Use
BigIntfor decimal token strings. Expiry cannot stop a paused worker. A real integration also needs persisted inputs/request IDs, a renewal policy where appropriate, access controls and durable recovery; this example keeps state in memory.Runnable code, instructions and offline tests
From the repository root:
Verified on Node 22.17.0 with DeepAgents 1.15.0, LangChain 1.5.16 and CLAIM SDK 0.1.1. Seven offline tests passed: actual DeepAgents loop, actual LangChain loop, denial, uncertain acquire, status-failure cleanup, uncertain release and inherited tracing isolation. The offline entry point disables framework tracing before imports and rejects outbound fetch. Installation needs registry access; running the example needs no account or model key.
This verifies the local integration, not production safety or behavior of a real LLM. The service has a free developer beta; the public repository contains client examples, not the hosted implementation. It also includes a separate ONCE provider-action recovery example for the different problem of uncertain external effects.
Interested in technical feedback on keeping ownership and recovery decisions outside model-generated arguments.
All reactions