API Reference — Python
Package toolnexus (PyPI, Python ≥ 3.11). See the combined API Reference for every
symbol shown in six-language synced tabs.
Toolkit
Section titled “Toolkit”create_toolkit(...) -> Toolkit(async)- Keyword args:
mcp_config,skills_dir,skills,skill_provider,skills_filter,skill_sample_limit,builtins,agents,extra_tools,wait_for. - Equivalents:
createToolkit(js) ·CreateToolkit(go) ·Toolkit.create(java) ·Toolkit.CreateAsync(c#) ·Toolnexus.create_toolkit(elixir).
Skills
Section titled “Skills”load_skills(dirs=None, *, skills=None, filter=None, sample_limit=0) -> SkillSourcelist_skills(dirs=None, *, skills=None) -> SkillInventory—.skills,.skipped(SkillSkip.reason:missing-name·malformed-frontmatter·duplicate-name·unreadable).SkillDef(name, content, description=None, resources=None, base=None)skill_providermay be sync or async.- Equivalents:
loadSkills/listSkills(js) ·LoadSkillsWith/ListSkills(go) ·SkillSource.loadWith/listSkills(java) ·SkillSource.LoadWith/ListSkills(c#) ·Toolnexus.Skill.load/Toolnexus.Skill.list(elixir).
MCP · Adapters · Client
Section titled “MCP · Adapters · Client”load_mcp(config) -> McpSource(async)to_openai(tk)·to_anthropic(tk)·to_gemini(tk)create_client(...) -> Client→await client.ask(prompt, tk).
Tools you build — native, HTTP, built-ins
Section titled “Tools you build — native, HTTP, built-ins”@tool/define_tool(fn, *, name?, description?, input_schema?)— schema inferred from type hints + docstring.http_tool(*, name, description, method, url, headers?, query?, body?, result_mode?, timeout?)—timeoutin seconds.builtinstoggle → ten built-ins:bash · read · write · edit · grep · glob · webfetch · question · apply_patch · todowrite.- Equivalents:
defineTool/httpTool(js) ·NativeTool/HTTPTool(go) ·NativeTool.of/HttpTool.of(java) ·NativeTool.Of/HttpTool.Of(c#) ·Toolnexus.Native.define_tool/Toolnexus.Http.tool(elixir).
Sub-agents & teams
Section titled “Sub-agents & teams”agent(name, *, does, uses?, soul?, soul_file?, team?, budget?, model?, wait_for?) -> Agent.await agent.run(prompt, *, llm={...}, ...) -> TaskResult—.status,.text,.total_tokens,.runtime.agent.as_tool(**rt_opts) -> Tool·compose_soul(dir) -> (soul, found)·Budget(...).- Equivalents:
agents.agent/.run/.asTool/composeSoul(js) ·agents.New(go) ·Agents.agent(java/elixir) ·new Agent(c#).
A2A — serve & remote agents
Section titled “A2A — serve & remote agents”await tk.serve(addr, *, client, a2a: A2AConfig, on_task?, mcp?, on_call?) -> ServeHandle.agent(card, *, headers?, timeout?, poll_every?)+create_toolkit(agents=[...])/await tk.add_agent(card_url).- Equivalents:
tk.serve/tk.addAgent(js) ·Serve/AddAgent(go) ·serve/addAgent(java) ·ServeAsync/AddAgentAsync(c#) ·Toolkit.serve/Toolkit.add_agent(elixir).
Suspension & the human loop
Section titled “Suspension & the human loop”wait_for(toolkit option; callable(Request) -> Answer).Request(id, kind, prompt, url?, data?, expiresAt?)·Answer(id, ok, data?, reason?).pending(*, kind, prompt, url?, data?)·auth_required(url, prompt?)·pending_of(result).- Equivalents:
waitFor/pending/authRequired/pendingOf(js) ·WaitFor/Pending(go) ·waitFor/ToolResult.pending(java) ·WithWaitFor/ToolResult.Pending(c#) ·wait_for/ToolResult.pending?(elixir).