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_tools23client = 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
| Category | Tools | Scope |
|---|---|---|
| Plan | plan_create, plan_update, plan_load | All agents |
| Memory | memory_set, memory_get, memory_getall | All agents |
| Widget | widget | Top-level only |
| Finish | finish | All agents |
| Skills | skill_get | All agents |
Plan Tools
Help agents organize multi-step tasks:
plan_create
Create a new plan with steps:
1Agent creates: ["Research topic", "Write outline", "Draft content"]plan_update
Update step status (pending, in_progress, completed, failed):
1Agent marks step 1 as completedplan_load
Load the current plan to see progress.
Example conversation:
1User: "Write me a blog post about AI"23Agent: [calls plan_create with steps]4> Plan created:5> [ ] Research AI trends6> [ ] Create outline 7> [ ] Write draft8> [ ] Review and polish910Agent: [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:
1Agent calls: memory_set(key="user_preference", value="dark mode")memory_get
Retrieve a value:
1Agent calls: memory_get(key="user_preference")2Returns: "dark mode"memory_getall
Get all stored memories:
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:
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
Report completion with structured output. Works on all agents. When called, the output is stored on chat.output.
finish
Report status and result:
1{2 "status": "succeeded", // or "failed", "cancelled"3 "result": "Research complete. Found 5 key trends..."4}The finish output is stored on the chat and accessible after completion. Use run() to get it directly:
1output = agent.run("Research AI trends")2print(output) # {"status": "succeeded", "result": "Research complete. Found 5 key trends..."}With output_schema for structured output:
When output_schema is set on the agent config, the finish tool requires the result to match the schema. This gives you typed, predictable JSON output from your agent. See Structured Output for details.
1agent = client.agent({2 "core_app": { "ref": "infsh/claude-sonnet-4@latest" },3 "system_prompt": "Analyze the input text.",4 "output_schema": {5 "type": "object",6 "properties": {7 "summary": {"type": "string", "description": "Brief summary"},8 "confidence": {"type": "number", "description": "Confidence 0-1"}9 },10 "required": ["summary", "confidence"]11 },12 "internal_tools": { "finish": True }13})1415output = agent.run("The weather is great today!")16print(output) # {"summary": "Positive weather comment", "confidence": 0.95}Configuration Examples
1# Disable all internal tools2internal_tools().none().build()34# Enable only memory5internal_tools().plan(False).memory(True).widget(False).build()67# Enable all8internal_tools().all().build()Skills Tool
Load skill content on-demand instead of embedding everything in the system prompt.
Overview
Skills are reusable packages of instructions and context that agents can retrieve when needed. This follows the progressive disclosure pattern—agents see available skills in the tool description and load full content only when required.
skill_get
Retrieve a skill's full content:
1Agent calls: skill_get(skill="code-review")2Returns: "# Code Review Guidelines\n\nWhen reviewing code..."Defining Skills
Skills are defined in the agent config, not in internal_tools:
1agent = client.agent({2 "core_app": { "ref": "infsh/claude-sonnet-4@latest" },3 "system_prompt": "You are a helpful assistant.",4 "skills": [5 {6 "name": "code-review",7 "description": "Guidelines for reviewing pull requests",8 "content": "# Code Review\n\nWhen reviewing code, check for..."9 },10 {11 "name": "api-docs",12 "description": "API documentation for the project",13 "url": "https://example.com/skills/api-docs.md"14 }15 ]16})Skill Sources
| Source | Description |
|---|---|
content | Inline text/markdown content |
url | URL to fetch skill content from (cached per session) |
How the Agent Sees Skills
The skill_get tool description includes all available skills:
1skill_get: Retrieves the full content of a skill.23Available skills:4- code-review: Guidelines for reviewing pull requests5- api-docs: API documentation for the project67Parameters:8- skill: The name of the skill to retrieveExample Conversation
1User: "Review this pull request"23Agent: [calls skill_get(skill="code-review")]4> # Code Review Guidelines5> When reviewing code, check for:6> 1. Security vulnerabilities7> 2. Performance issues8> ...910Agent: "Based on the code review guidelines, here's my review..."Use cases:
- Documentation and guidelines
- Domain-specific knowledge
- Multi-step procedures
- Context that's only needed sometimes
Scope Rules
| Tool Category | Top-level Agent | Sub-agent |
|---|---|---|
| Plan | ✓ | ✓ |
| Memory | ✓ | ✓ |
| Widget | ✓ | ✗ |
| Finish | ✓ | ✓ |
| Skills | ✓ | ✓ |