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

StepWhat happens
1. IntakeA message arrives from the dashboard, WhatsApp via Baileys, Telegram polling, a group, cron, Tide, or internal delegation.
2. RoutePasture chooses the selected or assigned agent. Groups use group configuration; internal delegation uses agent-send allow lists.
3. BootstrapThe runtime loads identity Markdown, channel context, recent chat, active mission/project context, memory, and runtime grounding.
4. PlanPrompt-based classifiers decide work mode, turn intent, likely skills, and whether delegation is appropriate.
5. ActThe LLM calls only the skills loaded for that turn. JavaScript executors handle files, network calls, browser automation, cron, and integrations.
6. ReplyPasture records useful activity, indexes memory when configured, and sends one user-facing answer back to the originating channel.

Decision rules

SituationHandling rule
Simple questionAnswer directly from current context. No tool call is needed unless the user asks for live, private, or stored information.
Live informationUse search, http, or browser. Pasture should not rely on stale model knowledge for weather, news, websites, or current project state.
Past conversationUse memory/chat search only when the user explicitly asks about earlier conversations, logs, yesterday, or previous decisions.
Project workUse the project workflow: catalog check, health check, proposed mission/tasks, explicit approval, progress updates.
Specialist workUse agent-send when another linked agent owns the skills, persona, or context. The target gets a complete task brief.
External writeFor GitHub, Google, project mission creation, and similar writes, preview the proposed change and wait for confirmation when the skill requires it.

Scenario walkthroughs

User asksPasture handles it by
Remind me every weekday at 8Create a recurring cron job with the user's timezone and attach the reply channel to the originating chat.
Open this site and find pricingNavigate 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 NextPostAILook 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 planMain sends the plan to the linked backend agent, receives its reply, and synthesizes it for the user.
Turn off the bedroom lightHome 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.