Design
Parts: import or draw
Search and import KiCad symbols and footprints, fix what the fab rejects, and build a part from its datasheet when KiCad does not have it.
Every part on a board is two files: a symbol for the schematic and a footprint for the layout, joined by pin number. Import them from KiCad whenever KiCad has the part, and draw them from the datasheet when it does not.
Start from your library
The parts library is your own set of parts, kept in ~/.config/agentee/library/ and shared by every project: the connectors, regulators and passives you want each design to reuse. Each part holds its symbol, footprint, 3D model, pinned datasheet and last checked stock. For each part a design needs, the steps are find, add, use:
agentee library find 3.3V buck --role regulator
agentee library add S2B-PH-K-S --name JST-PH-2 --role connector \
--symbol Connector_Generic:Conn_01x02 \
--footprint Connector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_Horizontal --preferred
agentee library use JST-PH-2find lists the library parts that match every word. When none does, it searches the distributors you have keys for and lists active parts in stock. add copies the symbol, footprint and model in, fetches and pins the datasheet, and records stock and price. use copies the files into the project and prints the agentee edit sch command that places the part with its mpn.
agentee library verify checks each part's symbol against its footprint and datasheet, and refresh updates stock and price. Once the library holds a role, check warns when a design uses a part from outside it for that role and names the library part to use. A project can add its own parts in .agentee/library/.
Search
agentee search symbol lm358
agentee search footprint soic 3.9x4.9Every word must appear in Library:Name, so add words to narrow a search: soic 3.9x4.9 finds the narrow SOIC-8 bodies and skips the wide ones.
Import
agentee import symbol Amplifier_Operational:LM358 --with-footprint
agentee import symbol Device:R --footprint Resistor_SMD:R_0402_1005Metric
agentee import footprint Package_TO_SOT_SMD:SOT-89-3--with-footprint brings the symbol's default footprint along; --footprint picks another one and links it. Symbols land in symbols/, footprints in footprints/. --force overwrites a file you already have. A path to a .kicad_sym (with :Name) or a .kicad_mod works in place of Library:Name for vendor libraries.
Run check straight after. The usual finding is silk:
warning: ./footprints/R_0603_1608Metric.fp.toml: R_0603_1608Metric silk: silk lines under the fab minimum width 0.15mm: 2, thinnest 0.12mmKiCad draws silk at 0.12 mm and JLCPCB prints 0.15 mm. Widen the width of the footprint's silk graphics. The other common one is courtyard or pad spacing against a coarse fab; fix it in the footprint, where it belongs, not with a rule override.
Generic parts are shared
One R symbol serves every resistor and one C symbol every capacitor. The value and footprint go on the part in the schematic:
agentee edit sch NAME add R1 R 10k --footprint R_0402_1005Metric
agentee edit sch NAME add C1 C 100n --footprint C_0402_1005MetricIf a schematic names a symbol the project lacks but gives a footprint some symbol already uses, add takes that symbol, so an agent that writes --footprint C_0402_1005Metric for a capacitor gets the right one.
Drawing a symbol
agentee new symbol STM32F103C8For a box symbol, list the pins per side and let agentee place them on the grid and size the body. This is the example from the reference, cut down:
name = "STM32F103C8"
reference = "U"
[[bodies]]
left = [
{ number = "7", name = "NRST", type = "input" },
{ gap = 1 },
{ number = "10", name = "PA0", type = "bidirectional" },
]
right = [ { number = "30", name = "PA9", type = "bidirectional" } ]
top = [ { number = "1", name = "VBAT", type = "power_in" } ]
bottom = [ { number = "8", name = "VSS", type = "power_in" } ]{ gap = N } leaves N empty slots. Pins can also be placed by hand with [[pins]] (number, name, type, at, side), and the two can be mixed. Keep connection points on the 1.27 mm grid; off-grid pins are flagged. Multi-unit symbols give pins and graphics a unit.
Pin types matter: check uses them for the net checks, and open_collector outputs and input pins take part in the signal level check.
Logic levels
For logic and MCU parts, copy the thresholds from the datasheet into a [levels] table. Check then works out the voltage every input sees across its rails, resistors and switches, and reports an input that can sit between VIL and VIH, float, or go past its limits:
[levels]
supply = "VDD"
vih = "70%"
vil = "30%"
min = "-0.3V"
max = "100%+0.3V"
leakage = "1uA"A pin's own levels table overrides the symbol's, for a reset pin with an internal pull-up, say. The schematics guide shows the other half, the rails table.
Drawing a footprint
agentee new footprint SOIC-8_3.9x4.9mm_P1.27mmWrite pads as rows rather than one entry each. The SOIC-8 from the reference:
[[pads]]
number = "1"
kind = "smd"
shape = "roundrect"
at = [-2.475, -1.905]
size = [1.95, 0.6]
count = 4
pitch = [0, 1.27]
[[pads]]
number = "5"
kind = "smd"
shape = "roundrect"
at = [2.475, 1.905]
size = [1.95, 0.6]
count = 4
pitch = [0, -1.27]The second row counts 5 to 8 back up the other side. Rows count up the trailing digits, so BGA balls work the same way (A1, A2, ...), and number_step = 2 counts by two.
Draw the courtyard on F.CrtYd and the body outline on F.Fab: check needs a courtyard that encloses the pads, the placer keeps courtyards apart, and the edge and assembly rules measure from the body. Set height so the 3D view and the tall-part rule have a height without a model.
Useful footprint keys:
edge = trueon a pad whose copper is meant to reach the board edge (edge-launch connectors, castellations).overhang = trueon a connector meant to hang over the edge.mask_web = falsewhen the fab opens the mask over all pads of a fine pitch part as one window.zone_connect = "solid"or"relief"on a pad, over the zone's own setting.modelnaming a STEP or VRML file, a KiCad path, or anhttps://URL pinned to a commit.
Every pin needs a pad
Pad nets come from the schematic by number: pin 3 of the symbol is pad 3 of the footprint. Check reports any pin without a pad. A symbol pin named EP or numbered 17 for an exposed pad needs that pad number in the footprint too.
Datasheets
agentee datasheet fetch NAME
agentee datasheet text TMC2209-LA --find VS
agentee datasheet add XYZ123 ~/Downloads/xyz123.pdf --manufacturer Acmefetch downloads the datasheet of every part in a layout or schematic into a cache in ~/.cache/agentee/datasheets/ that every project shares, and records what it used in datasheets.toml. It looks at the part's datasheet field, then the symbol's URL, then what each distributor lists for the mpn. text reads a cached copy back with page numbers, or only the passages that hold a word, so an agent can take a threshold or a pinout from the source instead of from memory. A part behind a login goes in with add.
Check warns when a part with an mpn has no datasheet anywhere.
Part numbers
Give each part in the schematic mfr and mpn fields, and an lcsc field for JLCPCB assembly:
agentee edit sch NAME set U1 --field mfr=Qorvo
agentee edit sch NAME set U1 --field mpn=SPF5189ZEach set adds to the part's fields table and keeps what is there. In the file it reads fields = { mfr = "Qorvo", mpn = "SPF5189Z" }.
The BOM groups by them, and agentee parts looks up stock, price and cheaper equivalents by mpn. See Fab package, BOM and pricing.