English
Package an agent
This guide walks through a real agent chart: a morning brief that writes to its owner on Telegram every day at the hour they choose. The whole folder is in the repository's examples.
text
morning-brief/
chart.json what the chart is and what it needs (the schedule too)
README.md what the owner reads first
agents/brief/SOUL.md who the agent is
agents/brief/IDENTITY.md its name and voice
agents/brief/AGENTS.md what it does
automations/morning-brief.message.md what it is asked each morning1. Start from the skeleton
Terminal
sh
alta chart new morning-brief --kind agent2. What it needs
A mind to think with, and a channel that can write first (push). You do not name Claude or Telegram: the owner's own choices are reused, and the game adds the accounts to connect. See Needs.
chart.json: needs
json
{ "mind": {}, "channel": { "features": ["push"] } }examples/chart-agent/morning-brief/chart.json#/needs
3. The choices
The owner picks an hour. A value is for what is the chart's own, never to pick a provider.
chart.json: values
json
{
"hour": {
"kind": "text",
"label": { "en": "At what time?", "fr": "À quelle heure ?" },
"default": "07:30",
"pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
}
}examples/chart-agent/morning-brief/chart.json#/values
4. The agent and what it may do
chart.json: agents
json
[
{
"id": "brief",
"name": { "en": "Brief", "fr": "Brief" },
"files": ["SOUL.md", "IDENTITY.md", "AGENTS.md"],
"model": "need:mind",
"channel": "need:channel",
"permissions": {
"tools": {
"allow": ["message", "gbrain__recall"],
"deny": ["write", "edit", "exec", "browser"]
},
"channels": ["need:channel"]
},
"wake": ["morning-brief"]
}
]examples/chart-agent/morning-brief/chart.json#/agents
"need:mind" gives the agent the mind bound to that need, "need:channel" its channel. Its tools are listed: everything else is denied.
5. The schedule
chart.json: automations
json
[
{
"key": "morning-brief",
"title": { "en": "Morning brief", "fr": "Point du matin" },
"agent": "brief",
"schedule": { "daily": "$hour" },
"message": "automations/morning-brief.message.md",
"spends": "model"
}
]examples/chart-agent/morning-brief/chart.json#/automations
An automation is created off. A part turns it on, after the owner's yes.
6. The parts, in order
chart.json: parts
json
[
{
"id": "agent",
"do": "agent.create",
"args": { "agent": "brief" },
"requires": ["need:mind", "need:channel"],
"undo": "archive",
"proof": [{ "type": "agent", "id": "brief" }]
},
{
"id": "schedule",
"do": "automation.enable",
"args": { "key": "morning-brief" },
"requires": ["agent"],
"undo": "auto",
"proof": [
{
"type": "automation",
"key": "morning-brief",
"enabled": true
}
]
}
]examples/chart-agent/morning-brief/chart.json#/parts
7. The proofs and a repair
ready says the channel works ({ "type": "need", "id": "channel" }, the proof of whichever provider is bound) and the schedule is on; alive checks every hour that the brief ran in the last 26 hours, and offers a repair. See let the owner allow a repair.
chart.json: proofs
json
{
"installed": [{ "type": "agent", "id": "brief" }],
"ready": [
{ "type": "need", "id": "channel" },
{ "type": "automation", "key": "morning-brief", "enabled": true }
],
"alive": [
{
"id": "ran",
"check": {
"type": "automation",
"key": "morning-brief",
"ranWithinHours": 26
},
"every": "1h",
"repair": ["rerun"]
}
]
}examples/chart-agent/morning-brief/chart.json#/proofs
8. Lint, look, install
Terminal
sh
alta lint morning-brief
alta template morning-brief --values values.json --bind mind=local
alta install morning-brief --values values.jsonvalues.json holds the owner's answers, for example { "hour": "06:45" }; --bind picks a provider for a need, as the owner's "change" does. alta install prints the plan; add --yes to run it.