feat(starknet): session-key spending policies for AI agents
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- blockchain
Research direction
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.
Written by the indexing model from the issue text.
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).
- Dominant language
- Python
- Stars
- 2
- Forks
- 4
- Avg merge
- 6h 54m
- Merged PRs (30d)
- 7
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QMeshPy/distributed-quantum
-
enhancement good first issue helia storage tier-1
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QMeshPy/distributed-quantum#53 ·
Maintainers usually reply within 1 day
-
chain-integration enhancement payments research-spike tier-2
Difficulty 4/5 3-5 days Newbie friendliness 55/100
QMeshPy/distributed-quantum#78 ·
Maintainers usually reply within 1 day
-
chain-integration enhancement payments research-spike tier-2
Difficulty 3/5 1-2 days Newbie friendliness 66/100
QMeshPy/distributed-quantum#77 ·
Maintainers usually reply within 1 day
-
chain-integration enhancement payments tier-2
Difficulty 5/5 Over a week Newbie friendliness 35/100
QMeshPy/distributed-quantum#76 ·
Maintainers usually reply within 1 day
-
documentation good first issue kubo storage tier-1
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
QMeshPy/distributed-quantum#75 ·
Maintainers usually reply within 1 day
All issues in QMeshPy/distributed-quantum
Similar issues
-
comp/tools P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#142908 · 1 comment ·
-
[oblt-aw][autodoc] Fix malformed headings in new Buildkite docs pagesPossibly taken @github-actions claimed this today. Opendocumentation
Difficulty 1/5 Under an hour Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offlinePossibly taken @r2jaff claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ComposioHQ/composio#5054 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
pytorch/tensordict#3286 ·
Maintainers usually reply within 1 day