Skip to main content

Trace Python SDK — programmatic client for the Trace AI EDA backend.

Project description

buildwithtrace-sdk

Python SDK for Trace — programmatic access to the Trace AI EDA backend (symbol/footprint generation, semantic component search, and chat/agent over your KiCad designs).

pip install buildwithtrace-sdk
from buildwithtrace_sdk import Trace

client = Trace(api_key="...")  # or TRACE_API_KEY env var

sym = client.generate_symbol("LM7805 5V voltage regulator")
sym.save("./symbols/")                      # writes LM7805.kicad_sym

fp = client.generate_footprint("SOIC-8 3.9x4.9mm")
fp.save("./footprints/")                    # writes SOIC-8.kicad_mod

for r in client.search("3.3V LDO", type="symbol", limit=5):
    print(r.name, r.library)

# Read-only Q&A about a design:
ans = client.ask("What ERC violations exist?", project_dir="./my-board/")
print(ans.text)

# Agent mode — the SDK runs the client-side tool loop locally (sandboxed):
res = client.chat("Add a 100nF decoupling cap on VCC", mode="agent", project_dir="./my-board/")
print(res.text)

Get an API key: buildwithtrace auth token (CLI) or buildwithtrace.com/dashboard/settings > Developer.

Notes

  • chat(mode="agent") / "plan" produce file-editing tool calls. The SDK runs a standalone, client-side tool-execution loop: when you pass project_dir, file ops (read/write/search_replace/list_dir/grep/delete) and local ERC/DRC/export run on your machine with the SAME safety as the desktop/CLI (extension allowlist, project-dir sandbox, symlink-safe path resolution), looping until the turn completes. Writes are auto-approved (programmatic agent). Without a project_dir, an emitted tool call raises TraceToolExecutionError (file ops can't be sandboxed); GUI-only tools (canvas snapshots, layer toggles) are always reported as unsupported.
  • .trace_sch/.trace_pcb writes are converted to KiCad format via the bundled converter when available; if the converter isn't importable the file is still written and the turn continues (conversion is reported as failed, not fatal).
  • BYOK supported via chat(..., llm_provider=, llm_api_key=, llm_model_id=).

Extracted from the buildwithtrace CLI repo. The CLI re-exports Trace for backward compatibility (from buildwithtrace import Trace).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buildwithtrace_sdk-0.1.0.tar.gz (65.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

buildwithtrace_sdk-0.1.0-py3-none-any.whl (49.9 kB view details)

Uploaded Python 3

File details

Details for the file buildwithtrace_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: buildwithtrace_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 65.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for buildwithtrace_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3769b37ea87cdf6adb9b2db7919c4a6c2852d8528b678650bd0b6a151feeb357
MD5 6ce9290aec3ea11334bdf69b74a36e2a
BLAKE2b-256 ba58be8a40834b4049b9ada55258d78e8c6493456cf50b3fa369d8e82d16d5f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for buildwithtrace_sdk-0.1.0.tar.gz:

Publisher: release.yml on elcruzo/trace-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file buildwithtrace_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for buildwithtrace_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee6f1ad28a2f800abcdcc8d162f9e2f108b044715981eec3ccabd6f32ff7c7fa
MD5 60359236681390f5e705f036ddcb1080
BLAKE2b-256 d2edadaaa04510a1a8abf5dd20e73ae31527e292959df7c7906d387bb0d0689d

See more details on using hashes here.

Provenance

The following attestation bundles were made for buildwithtrace_sdk-0.1.0-py3-none-any.whl:

Publisher: release.yml on elcruzo/trace-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page