VellichorDocs
Reference

AI Agent Architecture

Skeleton only, not live. The permission contract described below is written and tested locally, not audited, not connected to any collateral contract, and not exposed anywhere in the app.

Vellichor's AI agent concept operates on the buyer's side of a collateral position, not Vellichor's. When a Vault Unit holder uses their units as DeFi collateral, they can grant an agent a scoped, revocable permission over that specific position — nothing more. Two permission levels exist: Monitor Only, where the agent watches the position and can alert the holder, and Repay Up To Limit, where the agent can execute a capped repayment on the holder's behalf to help avoid liquidation.

The boundary is structural, not a policy promise

VellichorAgentPermission.solonly allows a position's owner to grant permission over their own position, to one named agent address, with an explicit cap. There's no code path for an agent to touch Vellichor's treasury or call any team-controlled function on VellichorVault.sol, VellichorMarket.sol, or VellichorGovernance.sol. Revocation is immediate and controlled solely by the buyer who granted it.

This permission layer is built and tested (contracts/VellichorAgentPermission.sol, scripts/simulate-agent-permission.js). It sits on top of the DeFi collateral infrastructure (VellichorVaultUnitWrapper.sol, VellichorVaultUnitOracle.sol). The agent itself — the off-chain logic that actually reads this permission and acts on it — is the next piece to build, and hasn't been started.

Still open: whether the agent, once built, should be alert-only or allowed to execute RepayUpToLimit at all. See contracts/AGENT_STATUS.md in the repo for the full honest breakdown.