feat: Agent Logic Contract Examples with IAgentLogic Interface#30
Open
saiboyizhan wants to merge 1 commit intoChatAndBuild:mainfrom
Open
feat: Agent Logic Contract Examples with IAgentLogic Interface#30saiboyizhan wants to merge 1 commit intoChatAndBuild:mainfrom
saiboyizhan wants to merge 1 commit intoChatAndBuild:mainfrom
Conversation
Add three example logic contracts demonstrating how to extend BAP-578 agents with custom on-chain capabilities via the logicAddress field: - IAgentLogic: standard interface for agent logic contracts - SimpleTrader: token swap executor with per-trade and daily limits - PriceAlert: price monitoring with Binance Oracle and keeper support - AutoFunder: automatic agent balance top-up with pre-funded reserve Includes IBAP578 minimal interface, full README with quick-start guides, and a "Building Your Own" tutorial section.
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
Adds three example logic contracts demonstrating how to extend BAP-578 agents with custom on-chain capabilities via the
logicAddressfield.Currently there are no examples showing developers how to build logic contracts for their agents. This PR fills that gap with practical, well-documented examples.
What's Included
Standard Interface
IAgentLogic— A common interface (execute+description) that all logic contracts implementIBAP578— Minimal read-only interface for verifying agent ownership and stateExample Contracts
Documentation
File Structure
Key Design Decisions
bap578.ownerOf(tokenId) == msg.senderbefore executionTest Plan