Quickstart
Three steps to a working agent. Pick your language once — the tabs stay in sync across the page.
-
Install the package.
Terminal window npm install toolnexusTerminal window pip install toolnexusTerminal window go get github.com/muthuishere/toolnexus/golang<!-- Maven --><dependency><groupId>io.github.muthuishere</groupId><artifactId>toolnexus</artifactId><version>0.6.0</version></dependency>Terminal window dotnet add package Toolnexus -
Create a toolkit and a client. The toolkit starts with 10 built-in tools (bash / read / write / edit / grep / glob / …). Point the client at any OpenAI- or Anthropic-style endpoint.
import { createToolkit, createClient } from "toolnexus"const tk = await createToolkit()const agent = createClient({baseUrl: "https://openrouter.ai/api/v1",style: "openai",model: "openai/gpt-4o-mini",})from toolnexus import create_toolkit, create_clienttk = await create_toolkit()agent = create_client(base_url="https://openrouter.ai/api/v1", style="openai",model="deepseek/deepseek-chat",)tk, _ := toolnexus.CreateToolkit(ctx, toolnexus.Options{})defer tk.Close()agent := toolnexus.CreateClient(toolnexus.ClientOptions{BaseURL: "https://openrouter.ai/api/v1",Style: "openai",Model: "openai/gpt-4o-mini",})Toolkit tk = Toolkit.create(new Toolkit.Options());LlmClient agent = LlmClient.create(new LlmClient.Options().baseUrl("https://openrouter.ai/api/v1").style("openai").model("openai/gpt-4o-mini"));await using var tk = await Toolkit.CreateAsync(new Toolkit.Options());var agent = LlmClient.Create(new LlmClient.Options{BaseUrl = "https://openrouter.ai/api/v1",Style = "openai",Model = "anthropic/claude-3.5-sonnet",}); -
Run. Tools are called for you and the loop runs to a final answer.
const { text } = await agent.run("What files are in this folder?", { toolkit: tk })console.log(text)res = await agent.run("List the files here, then count them.", tk)print(res.text)res, _ := agent.Run(ctx, "List the Go files here and count them.", tk)fmt.Println(res.Text)System.out.println(agent.run("List the files here, then read the largest one.", tk).text);var res = await agent.RunAsync("List the files here, then summarise the README.", tk);Console.WriteLine(res.Text);
Add MCP servers and agent skills
Section titled “Add MCP servers and agent skills”Give the toolkit an mcp.json and a skills/ folder and
every server tool + a skill tool appear in the same registry:
const tk = await createToolkit({ mcpConfig: "./mcp.json", // local stdio + remote streamable-HTTP servers skillsDir: "./skills", // every SKILL.md becomes loadable via one `skill` tool})tk = await create_toolkit(mcp_config="./mcp.json", skills_dir="./skills")tk, _ := toolnexus.CreateToolkit(ctx, toolnexus.Options{ MCPConfig: "./mcp.json", SkillsDir: "./skills",})Toolkit tk = Toolkit.create(new Toolkit.Options() .mcpConfig("./mcp.json").skillsDir("./skills"));await using var tk = await Toolkit.CreateAsync(new Toolkit.Options{ McpConfig = "./mcp.json", SkillsDir = "./skills",});Go deeper on each source: MCP servers · Agent skills.