Empowering with traits
Use this when a session needs more tools than it starts with, for one session or for every session your identity starts.
A trait is a named grant of tools, and it can also mount skills and point the agent at instructions. For the full definition, see traits. Traits only add access: a bound only takes it away, and any bound a trait carries joins the session’s other bounds.
Before you begin
Section titled “Before you begin”- Build a Barry. These commands act as the
bonanzaidentity from that guide; use your own identity’s command in its place. - The example is the
memorytrait. The memory bag ships with Barry, and every bag gets an automatic trait with the bag’s own name. For a bag of your own, pack it first.
Find a trait
Section titled “Find a trait”To see every trait on your machine, run:
barry trait listEach entry names the trait and lists the namespaces it grants, the skills it mounts, its access level, and any restrictions it carries.
Choose traits for one session
Section titled “Choose traits for one session”Every session starts with the identity’s default traits. The traits you choose add to those.
Give every session a trait
Section titled “Give every session a trait”Your identity’s default traits join every session it starts, whatever you choose in the picker.
To remove every default trait at once, run bonanza identity traits clear.
Each of these commands acts on the identity whose command you run. To change a
different identity, run the same command through that identity’s own command
in place of bonanza.
Grant packed bags without a trait
Section titled “Grant packed bags without a trait”Packing a bag loads its hooks, instructions, and actions, but its tools reach a
session only when a trait selects them. That is bag_grant: session, the
default.
If you want every packed bag’s tools in every session, set this line in your
identity’s identity.yaml:
bag_grant: identityEach packed bag then grants its automatic trait to every session. Any other
value reads as session.
Verify
Section titled “Verify”To confirm your identity’s default traits, run:
bonanza identity showThe Traits: line lists the traits every session starts with, and
Optional traits: lists the ones a session adds only when you choose them.
To see what a trait grants, find it in barry trait list: its Namespaces:
line names the tool namespaces a session gets.
If it fails
Section titled “If it fails”- A trait you named does not appear. Check the spelling against
barry trait list, and install and pack the bag that provides it. - The session still lacks a tool. Confirm the trait grants the tool’s namespace. See A tool the agent should have is missing.
What’s next
Section titled “What’s next”- Restricting with bounds to take access away from a session.
- Run sessions for the other ways to shape a session.
- Policy resolution for how traits and bounds combine.