PydanticAI Agent Slice: LLM Scheduling Agents on FABRIC ( public )

An educational weave in two parts, built for the FABRIC Tips & Tricks webinar When the Scheduler Becomes a Swarm.

1 · This weave builds the agent slice. AGENT_COUNT small Ubuntu VMs (default 3), co-located, each on FABNetv4. On every VM it installs PydanticAI, uploads the agent (tools/bid_agent.py) and its endpoint settings, verifies the FABNetv4 address and route on the VM, checks the LLM endpoint answers, and proves the path with one self-test bid. It then monitors the slice. With KEEP_SLICE on, Stop leaves the slice running; with REUSE_EXISTING on, a later Run adopts that slice (re-install only) instead of provisioning.

2 · The notebook runs the agents. pydantic_agents.ipynb finds the slice, hands every agent the same pool of jobs, collects their structured bids in parallel, and shows the bid matrix, who wins which job type, LLM-vs-fallback counts and reasoning time. Run more rounds with your own jobs or another gateway model, and delete the slice when done.

What an agent is: each VM advertises a resource profile (CPU-heavy, memory-heavy, GPU, DTN-attached — like SWARM's agent_profiles.json). For every job it asks the model for a structured bid, a Pydantic model Bid(score 0..100, explanation), through a PydanticAI Agent on an OpenAI-compatible endpoint (the FABRIC LLM gateway by default). If the call fails it falls back to an analytic cost, as SWARM does (LLM_COST_FALLBACK). In SWARM the bid becomes the scheduling cost: cost = 100 − score.

Prerequisites: a FABRIC LLM gateway API key (LoomAI Settings → AI, or the FABRIC Credential Manager) as LLM_API_KEY, or via the FABRIC_LLM_API_KEY / OPENAI_API_KEY environment variable. Runtime: 5–8 minutes to build; a bidding round takes ~20–60 s.

Learn more: weave.md (spec + webinar walkthrough) and swarm-workflows.org.

Views
10
Downloads
2 active (0 retired)
Versions
1
Last Updated
Sept. 7, 2026, 6:58 p.m.
Version Created URN Downloads Actions
2026-09-07 Sept. 7, 2026, 6:58 p.m. urn:fabric:contents:renci:6ccc16af-4984-4aa5-9364-ee3b11055c4f 2 download
University of North Carolina at Chapel Hill — kthare10@email.unc.edu