Browse topics
Agent Tools
Expose applet methods to agents with tools[] and agent_instruction - the same typed methods your UI calls.
Agents call the same typed methods your UI does. There is no separate agent API. A method becomes an agent tool when you list it in tools[] and give the agent enough context to use it.
tools[]
tools[] in applet.json is the subset of methods[] that agents may call. A method must be in both arrays.
{
"methods": [
{ "name": "@my-org/notes.add", "permission": "projectDb:write", "handler": "backend" },
{ "name": "@my-org/notes.list", "permission": "projectDb:read", "handler": "backend" },
{ "name": "@my-org/notes.purge","permission": "projectDb:write", "handler": "backend" }
],
"tools": ["@my-org/notes.add", "@my-org/notes.list"]
}
Here add and list are agent-callable; purge is not. Keep destructive or sensitive operations out of tools[], or gate them behind defaultEnabled: false.
agent_instruction
The optional agent_instruction field on the applet (and per method) is the LLM-facing capability statement. Where description is for users, agent_instruction answers “what can this tool do, and when should I reach for it.” It can be longer and more direct than the user description.
{
"id": "@my-org/notes",
"description": "Capture and organize notes.",
"agent_instruction": "Store, list, and retrieve the user's notes. Use add to capture a new note, list to read existing notes before answering questions about saved content."
}
Typed params are the contract
Because every method declares Zod params and returns, the agent receives a typed schema for each tool. It calls with structured arguments and gets a validated result. The same validation that protects your UI protects the agent path.
Calling from the CLI
Any tool is callable from the terminal, which is the fastest way to verify the agent-facing surface:
rprp call '@my-org/notes.list' --args '{}'
Use the dotted applet-method name from rprp tool ls, not a guessed alias.
Pair tools with skills
tools[] makes a method reachable; a skill tells the agent when and how to use it. Ship both: the tool is the capability, the skill is the workflow.