Agent Tools
Using web search as an AI agent tool with auto-registration and multi-tool workflows
The BoxLang AI module auto-registers webSearch@bxai at startup, so agents can use web search without custom tool boilerplate.
Auto-Registered Tool
// Add the built-in web search tool by key
agent = aiAgent(
name: "ResearchAgent",
instructions: "Use web search when you need current information.",
tools: [ "webSearch@bxai" ]
)Basic Agent Search
response = agent.run(
"Find the latest BoxLang AI release details and summarize key updates."
)Combine with Other Built-in Tools
agent = aiAgent(
name: "MultimodalResearcher",
instructions: "Research, summarize, and if needed produce audio and image assets.",
tools: [
"webSearch@bxai",
"speak@bxai",
"transcribe@bxai",
"translate@bxai",
"generateImage@bxai"
]
)Research + Memory Pattern
Explicit Provider Hints in Prompts
You can guide the agent by giving provider constraints in instructions.
Safety Practices
Keep strict system instructions about source quality.
Ask the agent to cite URLs in final answers.
Validate tool output before storing into long-term memory.
Filter untrusted domains in high-risk workloads.
Inspecting Tool Availability
Related
Last updated