Inference Logoinference.sh

Internal Tools

Built-in tools for planning, memory, widgets, and sub-agent completion.


Overview

Internal tools are enabled by default. Configure them with internalTools:

1from inferencesh import inference, internal_tools2 3client = inference(api_key="inf_...")4agent = client.agent({5    "core_app_ref": "infsh/claude-sonnet-4@latest",6    "internal_tools": internal_tools()7        .plan(True)8        .memory(True)9        .widget(True)10        .build()11})

Available Internal Tools

CategoryToolsScope
Planplan_create, plan_update, plan_loadAll agents
Memorymemory_set, memory_get, memory_getallAll agents
WidgetwidgetTop-level only
FinishfinishSub-agents only

Plan Tools

Help agents organize multi-step tasks:

plan_create

Create a new plan with steps:

code
1Agent creates: ["Research topic", "Write outline", "Draft content"]

plan_update

Update step status (pending, in_progress, completed, failed):

code
1Agent marks step 1 as completed

plan_load

Load the current plan to see progress.

Example conversation:

code
1User: "Write me a blog post about AI"2 3Agent: [calls plan_create with steps]4> Plan created:5> [ ] Research AI trends6> [ ] Create outline  7> [ ] Write draft8> [ ] Review and polish9 10Agent: [calls plan_update to mark step 1 in progress]11> Plan updated:12> [/] Research AI trends  in progress13> [ ] Create outline14> ...

Memory Tools

Persist data across messages in a chat session:

memory_set

Store a key-value pair:

code
1Agent calls: memory_set(key="user_preference", value="dark mode")

memory_get

Retrieve a value:

code
1Agent calls: memory_get(key="user_preference")2Returns: "dark mode"

memory_getall

Get all stored memories:

code
1Returns: {"user_preference": "dark mode", "last_topic": "AI"}

Use cases:

  • Remember user preferences
  • Store intermediate results
  • Track conversation context

Widget Tool

Render interactive UI elements (top-level agents only):

widget

Create UI components:

  • Forms with inputs
  • Buttons and actions
  • Cards and layouts
  • Status displays

Example widget call:

json
1{2  "type": "ui",3  "title": "Order Confirmation",4  "children": [5    {"type": "text", "value": "Your order is ready"},6    {"type": "badge", "label": "confirmed", "variant": "secondary"},7    {"type": "row", "children": [8      {"type": "button", "label": "Track Order", "action": "track"},9      {"type": "button", "label": "Cancel", "action": "cancel", "variant": "destructive"}10    ]}11  ]12}

See the Widget System documentation for full component reference.


Finish Tool

For sub-agents to report completion (sub-agents only):

finish

Report status and result back to parent agent:

json
1{2  "status": "succeeded",  // or "failed", "cancelled"3  "result": "Research complete. Found 5 key trends..."4}

With custom output schema:

1# Sub-agent configured with output_schema2agent = client.agent({3    "core_app_ref": "...",4    "output_schema": {5        "type": "object",6        "properties": {7            "summary": {"type": "string"},8            "confidence": {"type": "number"}9        }10    }11})

Configuration Examples

1# Disable all internal tools2internal_tools().none().build()3 4# Enable only memory5internal_tools().plan(False).memory(True).widget(False).build()6 7# Enable all8internal_tools().all().build()

Scope Rules

Tool CategoryTop-level AgentSub-agent
Plan
Memory
Widget
Finish

we use cookies

we use cookies to ensure you get the best experience on our website. for more information on how we use cookies, please see our cookie policy.

by clicking "accept", you agree to our use of cookies.
learn more.