Skip to content

AdamBien/zsmith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zsmith

zsmith

AI agent framework for Claude with tool execution support.

Usage

var agent = new Agent("You are a helpful assistant.")
        .withTool(new CalculatorTool())
        .withTool(new CurrentTimeTool());

var response = agent.chat("What is 42 * 17?");

Custom Tools

Implement the Tool interface:

public class MyTool implements Tool {

    public String name() {
        return "my_tool";
    }

    public String description() {
        return "Does something useful";
    }

    public String inputSchema() {
        return """
            {
                "type": "object",
                "properties": {
                    "param": { "type": "string", "description": "Parameter description" }
                },
                "required": ["param"]
            }
            """;
    }

    public String execute(JSONObject input) {
        return "Result: " + input.getString("param");
    }
}

About

Plain Java Agent with Claude LLM

Topics

Resources

License

Stars

Watchers

Forks

Languages