AI & agents
Patties includes optional AI primitives for projects that need agents, tools, jobs, and generated AGENTS.md metadata.
Definitions
Patties exposes:
- agent and tool config types
- job config types
defineAgent()defineTool()defineJob()generateAgentsMd- AI runtime helpers under
patties/ai
App layout
The current repository fixtures show the intended layout:
app/agents/for agent definitionsapp/tools/for callable toolsapp/jobs/for scheduled jobs
Core types
AgentConfigdefines the model, tools, triggers, and token settingsToolConfigdefines description, Zod input schema, and handlerJobConfigdefines the cron schedule, timezone, and handlerAiContextprovides request identity, optional user state, variables, and an Anthropic-like client
Discovery
Build-time scanning collects modules from agents, tools, and jobs directories. Missing directories are allowed, and test files are ignored.
During patties build and patties dev, Patties attempts to regenerate the root AGENTS.md file from the app definition so downstream tools can inspect routes, agents, tools, jobs, and middleware.