How requests are handled
A Pasture turn is a routing decision plus a reasoning loop. The important part is not only what it can do, but when it chooses a tool, asks for approval, or stays conversational.
Request lifecycle
| Step | What happens |
|---|---|
| 1. Intake | A message arrives from the dashboard, WhatsApp via Baileys, Telegram polling, a group, cron, Tide, or internal delegation. |
| 2. Route | Pasture chooses the selected or assigned agent. Groups use group configuration; internal delegation uses agent-send allow lists. |
| 3. Bootstrap | The runtime loads identity Markdown, channel context, recent chat, active mission/project context, memory, and runtime grounding. |
| 4. Plan | Prompt-based classifiers decide work mode, turn intent, likely skills, and whether delegation is appropriate. |
| 5. Act | The LLM calls only the skills loaded for that turn. JavaScript executors handle files, network calls, browser automation, cron, and integrations. |
| 6. Reply | Pasture records useful activity, indexes memory when configured, and sends one user-facing answer back to the originating channel. |
Decision rules
| Situation | Handling rule |
|---|---|
| Simple question | Answer directly from current context. No tool call is needed unless the user asks for live, private, or stored information. |
| Live information | Use search, http, or browser. Pasture should not rely on stale model knowledge for weather, news, websites, or current project state. |
| Past conversation | Use memory/chat search only when the user explicitly asks about earlier conversations, logs, yesterday, or previous decisions. |
| Project work | Use the project workflow: catalog check, health check, proposed mission/tasks, explicit approval, progress updates. |
| Specialist work | Use agent-send when another linked agent owns the skills, persona, or context. The target gets a complete task brief. |
| External write | For GitHub, Google, project mission creation, and similar writes, preview the proposed change and wait for confirmation when the skill requires it. |
Scenario walkthroughs
| User asks | Pasture handles it by |
|---|---|
| Remind me every weekday at 8 | Create a recurring cron job with the user's timezone and attach the reply channel to the originating chat. |
| Open this site and find pricing | Navigate in the local browser, extract visible content, scroll or screenshot if needed, then summarize with evidence. |
| What did we decide yesterday? | Search chat/memory by date, read the matching snippet, and answer from that result instead of guessing. |
| Work on NextPostAI | Look up the project catalog. If missing, ask for name/description/setup notes. If ready, propose a mission and task list. |
| Ask backend to review this plan | Main sends the plan to the linked backend agent, receives its reply, and synthesizes it for the user. |
| Turn off the bedroom light | Home Assistant searches or resolves the friendly device name, calls the local Home Assistant instance, and replies without raw entity IDs. |
Important boundaries
- Pasture is prompt-driven: Markdown templates and skill docs shape decisions; JavaScript is the router and executor.
- Internal agent messages never go to WhatsApp or Telegram; only the final synthesized answer is sent back.
- Group chats can be restricted with skill deny lists, and agent-send is disabled in groups.
- Memory and chat indexing are local features, but what leaves the machine depends on the LLM provider and skills you configure.
- Dashboard Projects are catalog entries; ongoing work belongs in Missions with Tasks, progress, evidence, and activity.
For channel-specific routing, continue to Channels.