You can now generate complex, on-chain spending policies for your agents by describing your requirements in natural language.
> impact
We've shipped a major enhancement to the Agentic Wallet CLI, integrating a Large Language Model (LLM) for dynamic policy generation. The `agentic-wallet create` command now includes a `--policy-prompt` flag. When you use this flag, your natural language description of a spending policy is sent to an AI, which translates it directly into the structured JSON format required for a ZeroDev session key. This new workflow abstracts away the complexity of manually crafting policy objects, letting you define an agent's permissions as easily as writing a sentence.
The previous system relied on a small set of hardcoded policy presets like 'permissive-erc20' or 'defi-only'. While useful for basic scenarios, this approach was rigid and couldn't accommodate the diverse and nuanced requirements of sophisticated autonomous agents. If a developer needed a custom policy, they had to dive into the codebase, understand the session key schema, and implement it themselves. This created a significant bottleneck, slowing down development and limiting the potential applications for on-chain agents. We wanted to make policy creation as flexible and intuitive as the agents themselves.
This update dramatically lowers the barrier to creating secure, specialized agents. Developers can now prototype and deploy agents with highly specific operational boundaries in seconds, without writing any policy code. You can define rules based on contract addresses, function selectors, value limits, and time constraints using plain English. This enables the rapid creation of agents tailored for specific tasks, such as a Uniswap arbitrage bot that can only interact with certain pools and has a strict daily spending limit, enhancing both security and developer velocity.
> Try this now
try this
# Create a new agent with a custom, AI-generated policy.
# The prompt asks for a policy that allows the agent to spend up to 0.5 WETH
# on the Uniswap V3 Router, but only for swapping into USDC, and with a limit of one
# such transaction per hour.
agentic-wallet create my-defi-agent \
--policy-prompt "Allow this agent to spend a max of 0.5 WETH on the Uniswap V3 router to swap for USDC. The agent can only perform this action once per hour."
# The CLI will now:
# 1. Connect to an LLM to translate the prompt into a valid ZeroDev session key policy JSON.
# 2. Validate the generated JSON policy.
# 3. Create a new agent controlled by a private key.
# 4. Deploy a smart wallet for the agent and set the AI-generated policy.
# You can now fund your new agent's smart wallet and use it in your application.
# The agent's actions will be automatically restricted by the on-chain policy you defined.