Skip to content

feat: agents add + templates show - #106

Merged
PaulAsjes merged 2 commits into
nextfrom
feat/agents-add
Jul 23, 2026
Merged

feat: agents add + templates show#106
PaulAsjes merged 2 commits into
nextfrom
feat/agents-add

Conversation

@PaulAsjes

Copy link
Copy Markdown
Collaborator

What

Continues the v0 → v1 agents-as-code port (follows #105).

  • agents add — create an agent from a template (--template) or an existing config file (--from-file), upload it to ElevenLabs via the lossless raw-JSON API, write the config to agent_configs/, and register it in agents.json. Ports v0's add.ts including --output-path, --from-file/--template mutual exclusion, and name resolution (explicit name overrides the file's name).
  • agents templates show <template> — print a template's full configuration.
  • Full template catalog — all 6 template bodies ported from v0 (default, minimal, voice-only, text-only, customer-service, assistant) + template_by_name(), so add/templates produce byte-for-byte the same configs as v0.

Implementation note

The large default template is parsed from a raw JSON string rather than the json! macro — the macro exceeds its recursion limit on a structure this deep, and #![recursion_limit] can only live in the (generated) crate root.

Verified

cargo build green; 11 unit tests pass (project + api + templates). Smoke-tested: templates show <name> renders each template; add validation paths (mutual exclusion, missing name) error correctly. (The add create call itself needs a live API key/account to exercise end-to-end.)

Not yet included (follow-ups)

agents push/pull/test + verify, the tools/tests command groups, residency and components add.

🤖 Generated with Claude Code

PaulAsjes and others added 2 commits July 23, 2026 10:31
- templates.rs: port all 6 agent template bodies from v0
  (default/minimal/voice-only/text-only/customer-service/assistant) and
  template_by_name(). The large default template is parsed from a raw
  JSON string rather than the json! macro (the macro's recursion limit is
  exceeded and #![recursion_limit] can only live in the generated crate
  root). Add `agents templates show <template>`.
- agents add: create an agent from a template or --from-file, upload it
  via the raw-JSON API (lossless), write the config to agent_configs/,
  and register it in agents.json. Ports v0's add.ts (incl. --output-path,
  --from-file/--template mutual exclusion, name resolution).
- README: document `agents add` and `templates show`.
- Unit tests for every template + template_by_name.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Switch the default TTS model in all agent templates from the deprecated
eleven_turbo_v2 to eleven_flash_v2_5. No template references a turbo
model anymore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@PaulAsjes
PaulAsjes merged commit 36e0c93 into next Jul 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant