AI Agent Architecture
Why Python Agents?
Traditional Smart Contracts are passive; they cannot execute themselves or "think." While tools like Chainlink Automation trigger actions based on simple time/logic checks, they lack the ability to process complex data like Market Sentiment or News Analysis.
AUREO solves this by utilizing an off-chain Python Agent (main.py) that acts as the "brain," while the Smart Contract (AureoRWAPool) acts as the "muscle".
The Loop Architecture
The Monitoring Phase (Read)
The Agent runs an infinite loop (e.g., every 60 seconds) to fetch data from two sources:
On-Chain Data: Calls
getGoldPrice18Decimals()from the contract to get the true execution price.Off-Chain Data: (Planned) Calls Google Gemini API to analyze market sentiment text or chart patterns.
The Decision Phase (Think)
Instead of a simple "Limit Order," the Agent uses a composite score logic.
# Pseudo-code logic for Agent Decision
def analyze_market(price, sentiment_score):
is_dip = price < TARGET_PRICE
is_safe = sentiment_score > 0.5 # Positive news environment
if is_dip and is_safe:
return "BUY"
return "WAIT"