agent-sdk-macros
Ergonomic derive and declarative macros for the Agent SDK:
#[derive(Tool)]— derive a tool'sname/description/input_schema/tierfrom a#[tool(...)]attribute; you implement onlyToolLogic.#[derive(TypedTool)]— typed-Inputvalidation with optionalschemarsschema 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.
[]
= "0.9"
See examples/derive_tool.rs in the repository for all four macros in one agent.
Documentation
- API reference: https://docs.rs/agent-sdk-macros
- Repository, README, and cookbook: https://github.com/bipa-app/agent-sdk
License
MIT. See LICENSE.