API Reference — Java
Artifact io.github.muthuishere:toolnexus (Java 21). See the combined API Reference
for every symbol shown in six-language synced tabs.
Toolkit
Section titled “Toolkit”Toolkit.create(Toolkit.Options opts)Optionsbuilder:.mcpConfig,.skillsDir,.skills,.skillProvider,.skillsFilter,.skillSampleLimit,.builtins,.agents,.extraTools,.waitFor.- Equivalents:
createToolkit(js) ·create_toolkit(py) ·CreateToolkit(go) ·Toolkit.CreateAsync(c#) ·Toolnexus.create_toolkit(elixir).
Skills
Section titled “Skills”SkillSource.load(String... dirs)— back-compat.SkillSource.loadWith(SkillSource.LoadOptions opts)SkillSource.listSkills(LoadOptions opts) -> SkillInventory—.skills,.skipped(SkillSkip.reason; constantsSkillSkip.MISSING_NAME,MALFORMED,DUPLICATE_NAME,UNREADABLE).new SkillSource.SkillDef(name, description, content[, resources, base])LoadOptionsbuilder:.dirs,.skills,.filter,.sampleLimit.skillProvideris aSupplier<List<SkillDef>>.- Equivalents:
loadSkills/listSkills(js) ·load_skills/list_skills(py) ·LoadSkillsWith/ListSkills(go) ·SkillSource.LoadWith/ListSkills(c#) ·Toolnexus.Skill.load/Toolnexus.Skill.list(elixir).
MCP · Adapters · Client
Section titled “MCP · Adapters · Client”McpSource.load(config)Adapters.toOpenAI(tk)·toAnthropic(tk)·toGemini(tk)Client.create(Client.Options)→client.ask(prompt, tk).
Tools you build — native, HTTP, built-ins
Section titled “Tools you build — native, HTTP, built-ins”NativeTool.of(name, description, schema, fn)— overload takes(args, ToolContext).HttpTool.of(HttpTool.Options)—{ name, description, method, url, headers, query, body, resultMode, timeout };timeoutLongms..builtins(...)toggle → ten built-ins:bash · read · write · edit · grep · glob · webfetch · question · apply_patch · todowrite. (BuiltinTools.create()/.select(cfg).)- Equivalents:
defineTool/httpTool(js) ·define_tool/http_tool(py) ·NativeTool/HTTPTool(go) ·NativeTool.Of/HttpTool.Of(c#) ·Toolnexus.Native.define_tool/Toolnexus.Http.tool(elixir).
Sub-agents & teams
Section titled “Sub-agents & teams”Agents.agent(name, new Agents.AgentSpec().does(...).tools(...).soulFile(...).team(...).budget(...)).Agents.Agent.run(RuntimeOptions, prompt): TaskResult—.status(),.text(),.totalTokens().Agents.Agent.asTool(RuntimeOptions): Tool·Agents.composeSoul(Path): ComposedSoul.- Equivalents:
agents.agent/.run/.asTool/composeSoul(js) ·agent(py) ·agents.New(go) ·new Agent(c#) ·Agents.agent(elixir).
A2A — serve & remote agents
Section titled “A2A — serve & remote agents”tk.serve(addr, new Toolkit.ServeOptions().client(llm).a2a(new A2AServer.A2AConfig()...)).A2A.agent(cardUrl)+Toolkit.Options().agents(List<A2A.Agent>)/tk.addAgent(cardUrl).- Equivalents:
tk.serve/tk.addAgent(js) ·serve/add_agent(py) ·Serve/AddAgent(go) ·ServeAsync/AddAgentAsync(c#) ·Toolkit.serve/Toolkit.add_agent(elixir).
Suspension & the human loop
Section titled “Suspension & the human loop”Options.waitFor(Function<Request, Answer>)(toolkit option).record Request(id, kind, prompt, url, data, expiresAt)·record Answer(id, ok, data, reason).ToolResult.pending(Request)·ToolResult.authRequired(url[, prompt])·ToolResult.pendingOf(result): Request.- Equivalents:
waitFor/pending/authRequired/pendingOf(js) ·wait_for/pending(py) ·WaitFor/Pending(go) ·WithWaitFor/ToolResult.Pending(c#) ·wait_for/ToolResult.pending?(elixir).