Status: Draft v1 (2026-02-13)
Starkclaw is a mobile personal agent that can execute Starknet transactions through on-chain enforced safety policies (session keys, spend caps, and allow/deny rules) so users can safely delegate financial actions.
Deliver a fully working MVP that demonstrates, end-to-end, that:
- A user can chat with an agent to perform real on-chain actions on Starknet.
- The agent operates with a constrained credential (session key), not the master key.
- On-chain account logic enforces the safety policy even if the agent is manipulated.
- The mobile UX feels premium, fast, and trustworthy.
- User creates a Starkclaw wallet on Starknet Sepolia (default) and funds it.
- User configures a session key policy:
- Spend cap for a chosen ERC-20 (example: USDC) per 24h.
- Allowed targets for the session key (initially minimal, expanded later).
- Expiry window.
- User asks: "Send 2 USDC to 0xABC..."
- Agent:
- Checks balance.
- Builds a transfer transaction.
- Previews exactly what will happen.
- Executes using the session key.
- User asks: "Send 2000 USDC to 0xABC..." (over the cap).
- Transaction fails on-chain with a policy error; app shows a clear denial reason and offers to adjust policy (requires owner approval).
- No TEE runtime or remote attestation.
- No ZK proofs.
- No full DeFi coverage (swaps/lending/LP) in the first MVP cut.
- No production-grade on-device LLM (cloud model API is acceptable).
- No multi-device sync.
- No app store submission hardening beyond basic security hygiene.
- Crypto-native users who want to delegate small, bounded actions to an agent.
- Builders evaluating Starknet AA as a safety control plane for agent commerce.
- On-chain policy enforcement is the source of truth.
- Session keys are the default execution credential.
- Owner key is for policy changes and emergency actions, not routine execution.
- Secrets never enter the LLM context.
- Every transaction is previewed with a deterministic, human-readable summary.
- Local-first by default: store chats, policies, and audit logs on device.
Starkclaw is three tightly scoped systems:
- Mobile app (Expo) with:
- Wallet and policy management UI
- Agent chat UI
- Activity log and safety controls
- On-chain contracts (Starknet AA):
- Agent account contract enforcing policies for session-key-signed txs
- Optional factory contract for deployment and identity registration
- Agent runtime:
- Tool-based execution (balances, transfers, simulation, submit)
- Strict validation, tool allowlists, and safe defaults
- iOS-first "liquid glass" aesthetic: layered translucency, blur surfaces, crisp typography, subtle depth.
- Premium, calm, confident. No "terminal app" vibes.
- Obsessive consistency in spacing, typographic rhythm, and motion.
- Onboarding
- Create wallet
- Fund wallet (faucet instructions for Sepolia)
- Create session key + policy
- Home
- Portfolio overview (balances for a small token set)
- Primary CTA: "Ask Starkclaw"
- Chat
- Streaming assistant responses
- Action cards for proposed transactions
- Explicit "Execute" button for session-key actions
- Policies
- List session keys (active/expired)
- Create/revoke session key
- Spend caps per token
- Emergency revoke all
- Activity
- Transaction history
- Status tracking (pending, accepted, rejected)
- Copy explorer link
- Settings
- Network (Sepolia/Mainnet)
- RPC endpoint
- LLM provider configuration
- Export logs
- Owner key:
- Used to deploy the account and manage policies (register/revoke session keys, emergency revoke).
- Stored in OS secure storage with biometric gating for signing operations.
- Session key(s):
- Used by the agent to sign transactions within policy bounds.
- Stored in OS secure storage without biometric gating (agent must function without constant prompts).
- Designed to be disposable, revocable, and time-bounded.
- The wallet is a Starknet AA account contract that supports:
- Standard owner signature validation
- Session-key signature validation for constrained autonomy
- Policy enforcement during execution for session-key transactions
Implementation baseline: fork/derive from keep-starknet-strange/starknet-agentic contracts/agent-account.
- Prevent unlimited approvals or uncontrolled transfers.
- Restrict where the agent can send calls (contract allowlist).
- Ensure policies are enforceable on-chain, not just "best effort" in prompts.
- Time bounds:
valid_after,valid_until
- Spend cap per 24h period for a single token:
spending_token,spending_limit
- Allowed targets:
- v1 supports a minimal allowlist strategy sufficient for transfers.
Note: The upstream agent-account policy shape includes a single allowed_contract. That is sufficient for single-call token transfers, but insufficient for multi-call DeFi flows that require touching token and router contracts in one transaction. This informs milestone ordering.
- Multi-target allowlist:
- Allow a bounded set of contract addresses per session key.
- Optional function selector allowlist:
- Allow specific selectors per contract for higher precision.
- Denylist:
- Global blocked targets that always fail for session keys.
- Approval safety:
- Optional cap on
approveamounts and/or allowlist of approved spenders.
- Optional cap on
- The LLM produces tool calls, not raw transaction calldata.
- Tools are deterministic, schema-validated functions implemented locally in the app.
- The app, not the model, constructs and signs the transaction.
- The model never sees private keys or raw secrets.
Read tools:
starknet_get_balances(address, tokens[])starknet_get_nonce(address)starknet_estimate_fee(calls[])starknet_simulate(calls[])policy_get_session_keys()policy_get_limits()
Write tools:
policy_register_session_key(policy)policy_revoke_session_key(keyId)policy_emergency_revoke_all()starknet_transfer(token, to, amount)
The agent can propose policy changes, but execution requires owner-gated confirmation.
- Strict tool allowlist and input schema validation.
- Endpoint allowlist for any HTTP calls (RPC, token metadata, swap quote APIs).
- Never render untrusted external content as authoritative instructions.
- Separate system prompt for "planner" vs "executor" modes:
- Planner: propose steps and ask for missing data.
- Executor: only emit tool calls against whitelisted tools and validated params.
- Intent capture: user request in chat.
- Plan: agent proposes a concrete action (transfer) with parameters.
- Preflight:
- Resolve token metadata (address, decimals).
- Check local policy intent (fast fail if obviously impossible).
- Build calls array.
- Simulate and estimate fees.
- Preview:
- Show: token, amount, recipient, max fee, policy used, why allowed.
- Execute:
- Sign with session key.
- Submit to RPC.
- Track:
- Poll for status.
- Persist activity + receipt locally.
Secrets:
- Owner private key (secure storage, biometric gated)
- Session private keys (secure storage)
- LLM API key (if user-provided, secure storage)
Non-secrets:
- Wallet metadata: network, account address, class hash
- Session key metadata: policy, createdAt, expiresAt, revokedAt
- Chat history
- Tool execution audit log
- Tx history (hash, calls summary, status)
RPC:
- Starknet JSON-RPC provider URL is configurable per network.
- Default to a reputable provider; allow user override.
- Validate chain id at startup and on each tx submission.
Token metadata:
- Start with a minimal static set (ETH, STRK, USDC, USDT).
- Expand via AVNU token list/SDK in later milestones.
LLM:
- MVP supports direct-to-provider calls with a user-provided key, or a hosted proxy API route.
- Provider must be pluggable behind a simple interface.
- No private keys in logs, crash reports, or LLM prompts.
- Owner actions must require explicit confirmation and biometric auth.
- Session key policy must be shown clearly at creation time and when used.
- Emergency revoke is always accessible within 2 taps from the main UI.
- All external requests must have timeouts, retries, and clear error messages.
- Starknet signing stack inside Expo Hermes:
- Validate whether
starknet.jsworks directly, or adopt a RN-focused signing implementation. - Evaluate
@starknet/react-native-sdk(and confirm signature scheme compatibility with the chosen account contract).
- Validate whether
- Best on-chain design for multi-target allowlists that stays cheap and simple.
- Best default RPC provider for Sepolia + Mainnet with predictable rate limits.
See IMPLEMENTATION_PLAN.md for the agentic-native implementation plan and milestone acceptance criteria.