agent-sdk-macros 0.10.0

Ergonomic derive/declarative macros for the Agent SDK (#[derive(Tool)], #[derive(TypedTool)], tool!, #[derive(ToolName)])
Documentation

agent-sdk-macros

crates.io docs.rs MIT

Ergonomic derive and declarative macros for the Agent SDK:

  • #[derive(Tool)] — derive a tool's name / description / input_schema / tier from a #[tool(...)] attribute; you implement only ToolLogic.
  • #[derive(TypedTool)] — typed-Input validation with optional schemars schema derivation (#[tool(schema = "derive")]).
  • tool! { ... } — define an inline, one-off tool without a named struct.
  • #[derive(ToolName)] — collapse the strongly-typed tool-name enum boilerplate.

Do not depend on this crate directly

These macros are re-exported from the agent-sdk façade (importing the Tool / TypedTool / ToolName traits also brings in the matching derive). The generated code refers to ::agent_sdk::… paths, so it only compiles when used through the façade.

[dependencies]
agent-sdk = "0.9"

See examples/derive_tool.rs in the repository for all four macros in one agent.

Documentation

License

MIT. See LICENSE.