feat(starknet): session-key spending policies for AI agents
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- python
- Domaine
- blockchain
Piste de recherche
Start by reading issue #2 and the agent configuration and funding paths named here: ai_agent_service._execute_funding and agent/cost_guard.py. Verify the current session-key standard, maintained Python client API, and testnet paymaster availability before choosing an account implementation. Done means policy limits are enforced on-chain, session keys can be revoked and expire, and policy parameters map to existing agent config fields, with tests and documentation.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
Enforce AI agent spending limits in a Starknet smart account via session keys, so caps hold even if the backend is compromised, and offer gasless onboarding through a paymaster.
Motivation
Agent budgets (max_per_proposal, daily_budget) are enforced only in application code. On-chain policy is a stronger guarantee and a good showcase of account abstraction.
Current state in this repo
- Limits live in agent config documents and
ai_agent_service._execute_funding;agent/cost_guard.pyenforces a separate set of budgets for the workspace agent.
Proposal
- Register Starknet testnet in the registry (#2) with a minimal adapter.
- Select an account implementation supporting session keys and define a policy (allowed targets/tokens, per-call and per-day limits, expiry).
- Create the session key for an agent and use it for agent-initiated funding calls; revoke on demand from the UI.
- Optionally sponsor fees with a paymaster for new users.
- Document the toolchain (Cairo, Python client) and its cost for contributors.
Acceptance criteria
- An agent can transact within policy and is rejected on-chain beyond it.
- Session keys can be revoked and expire automatically.
- Policy parameters map to the existing agent config fields.
Out of scope
- Proving the quantum simulation with STARKs (research-grade).
- Mainnet.
Technical notes and risks
- Session-key standards are still a draft and wallet implementations are not mutually compatible. Pick one implementation and document the lock-in.
Dependencies
- #2
Verify before implementing
- Current session-key standard status and the maintained Python client API.
- Paymaster availability on testnet.
Part of ##1. Ground rules for all issues in this roadmap are listed there (testnet-first, no secrets in the repo, chain logic behind the registry, tests and docs with every PR).
- Langage dominant
- Python
- Étoiles
- 2
- Forks
- 4
- Merge moyen
- 6 h 13 min
- PR mergées (30 j)
- 20
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de QMeshPy/distributed-quantum
-
enhancement good first issue helia storage tier-1
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
QMeshPy/distributed-quantum#53 ·
Les mainteneurs répondent en général sous 1 jour
-
chain-integration enhancement payments research-spike tier-2
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
QMeshPy/distributed-quantum#78 ·
Les mainteneurs répondent en général sous 1 jour
-
chain-integration enhancement payments research-spike tier-2
Difficulté 3/5 1-2 jours Accessibilité débutants 66/100
QMeshPy/distributed-quantum#77 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation good first issue kubo storage tier-1
Difficulté 2/5 1-3 heures Accessibilité débutants 42/100
QMeshPy/distributed-quantum#75 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement kubo storage tier-2
Difficulté 4/5 3-5 jours Accessibilité débutants 56/100
QMeshPy/distributed-quantum#74 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de QMeshPy/distributed-quantum
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
conda-forge/conda-forge-bot#7025 ·
Les mainteneurs répondent en général sous 1 jour
-
chore(ci): publish.yml's release-job comment counts the hand-created Releases as all of themOuvertearea:ci
Difficulté 1/5 Moins d'une heure Accessibilité débutants 74/100
catincloud-labs/dagster-dex#149 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
home-assistant/core#188424 ·
Les mainteneurs répondent en général sous 1 jour
-
Review backlog (docs-currency): README 'CI run' link lands on a run whose overall badge is cancelledOuverteagent/reviewer needs-kind needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 63/100
projectbluefin/utah#880 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
redis/memtier_benchmark#850 ·
Les mainteneurs répondent en général sous 1 jour