agents-macros 0.0.30

Procedural macros for Rust Deep Agents SDK
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use agents_macros::tool;

// Test basic string parameter
#[tool("Test tool with string param")]
fn test_string(name: String) -> String {
    format!("Hello, {}!", name)
}

#[tokio::test]
async fn test_string_tool() {
    let tool_instance = TestStringTool::as_tool();
    let schema = tool_instance.schema();
    assert_eq!(schema.name, "test_string");
}