feat: add Hermes child agent factory and paid agent metadata#506
Open
bussyjd wants to merge 3 commits into
Open
feat: add Hermes child agent factory and paid agent metadata#506bussyjd wants to merge 3 commits into
bussyjd wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the durable Hermes child-agent path we need for a permissioned “mother agent” to spawn sellable child agents, then tightens the discovery surfaces so buyers and indexers can see what they are paying for.
What Changed
agent-factoryskill that can create childAgentCRDs from inside the stack, including profile archive seeding, optional child env Secret injection, optional remote-signer wallet creation, and optionalServiceOffercreation.SOUL.md, including legacy lowercasesoul.mdmigration and safer exact skill syncing.ServiceOffer.status.agentResolution: model, runtime, skills, endpoint402 accepts[].extra:agentModel,agentRuntime,agentSkills/api/services.json:type: agent, resolved model,10 OBOL/requeststyle pricingruntime,model,pricingUnit,x402Price,x402Asset,x402Networktype: "agent", which the controller already emits for agent-backed offers.Why
The MVP product primitive is: “I run Hermes on this model, with these skills, and you can pay me for an agent turn.” Previously, the runtime/model signal existed in parts of the controller and x402 route path, but it was not consistently published into the catalog and ERC-8004 metadata. That made decentralized discovery/indexing weaker than the actual runtime state.
This PR makes the child-agent creation path and the paid-offer advertising path line up: a provider can spawn a child Hermes profile, wrap it as a
ServiceOffer, and buyers/indexers can inspect the model/runtime/skills/price before paying.Validation
Focused branch coverage:
go test -covermode=atomic -coverprofile=.workspace/coverage/branch.out \ ./cmd/obol \ ./internal/agentcrd \ ./internal/agentruntime \ ./internal/embed \ ./internal/serviceoffercontroller \ ./internal/x402 \ ./internal/monetizeapi \ ./internal/schemas \ -count=1Coverage highlights from the branch profile:
Additional targeted flake check:
Focused metadata/skill checks:
Whitespace/conflict check:
Live smoke performed locally with rebuilt dev images:
OBOL_DEVELOPMENT=true .workspace/bin/obol stack init --backend k3d OBOL_DEVELOPMENT=true OBOL_FORCE_REBUILD_LOCAL_DEV_IMAGES=serviceoffer-controller,x402-verifier \ .workspace/bin/obol stack up OBOL_DEVELOPMENT=true .workspace/bin/obol agent new demo-quant \ --model qwen3.5:9b \ --skills ethereum-networks,addresses \ --objective 'Agent-backed quant analyst for on-chain OBOL payment tests.' \ --create-wallet OBOL_DEVELOPMENT=true .workspace/bin/obol sell agent demo-quant \ --price 10 \ --token OBOL \ --chain ethereumLive assertions passed:
agentModel=qwen3.5:9b,agentRuntime=hermes, andagentSkills=[ethereum-networks, addresses].10 OBOLoneip155:1with atomic amount10000000000000000000./.well-known/agent-registration.jsoncarried runtime/model/pricing metadata./api/services.jsonexposedtype: "agent", modelqwen3.5:9b, and10 OBOL/request.Known Notes
ServiceOffer.status.ReadyremainsFalsewhile external ERC-8004 registration is pending. The operational conditions are green (UpstreamHealthy,PaymentGateReady,RoutePublished), and/api/services.jsonmarks the offer withregistrationPending: true.go test ./... -short -count=1run still has unrelated failures outside this PR:internal/openclawhit a Go linker SIGSEGV locally, andinternal/stackhas an existing warning-format assertion mismatch. The changed package set and targeted coverage runs are green.