Skip to main content

What Are Tools in Junis?

Tools are specialized functions that agents can call to perform specific actions or access external data. They extend your agentโ€™s capabilities beyond text generation, enabling real-world interactions. Think of tools as skills your agents can learn:
  • ๐Ÿ” Search tools: Find information from web, databases, or documents
  • ๐Ÿ“„ Document tools: Process PDF, Excel, Word, PowerPoint files
  • ๐Ÿ”Œ External connectors: Access Salesforce, DataLab, GitHub, Firecrawl
  • ๐Ÿง  RAG tools: Search uploaded documents with AI-powered retrieval
Agent Intelligence: Agents automatically decide when and how to use tools based on user requests. You donโ€™t need to manually trigger them.

Tool Types

Junis supports four types of tools, each designed for specific use cases:

Regular Tools

Python FunctionsCustom async functions you build for your specific needs.Examples: Search databases, call APIs, process data

Claude Skills

Official Anthropic ToolsPrebuilt document processors powered by Claude.Examples: PDF extraction, Excel analysis, PPTX creation

External Connectors

Third-Party IntegrationsConnect to external systems and services.Examples: Salesforce, DataLab, GitHub, Firecrawl (via MCP)

RAG Tools

Document RetrievalAuto-generated search tools for uploaded documents.Examples: Company policies, employee handbooks, product specs

How Agents Use Tools

๐Ÿค– Automatic Tool Selection

Agents use tools intelligently based on:
  1. User Request: What the user is asking for
  2. Tool Descriptions: What each tool can do (from docstrings)
  3. Conversation Context: Previous messages and results
Example Workflow:
User: "Find the latest news about artificial intelligence"
  โ†“
Agent thinks:
  - User wants to search the web for current information
  - I have a tool called "google_search"
  - Its description says it searches the web for real-time information
  - I should use this tool with query="latest artificial intelligence news"
  โ†“
Agent calls: google_search("latest artificial intelligence news")
  โ†“
Tool returns: {
  "results": [
    {
      "title": "AI Breakthrough in 2025",
      "url": "https://example.com/ai-news",
      "snippet": "Recent developments in AI technology..."
    }
  ]
}
  โ†“
Agent responds: "I found recent AI news. Here are the latest developments: AI Breakthrough in 2025..."
No Manual Intervention: Once tools are configured, agents use them automatically without user or admin prompting.

๐Ÿ“Š Tool Execution Flow


Available Built-in Tools

Junis provides a comprehensive set of prebuilt tools ready to use:

Document Processing (Claude Skills)

claude_pdf_processor
  • Extract text from PDFs
  • Extract tables and data
  • Create new PDFs
  • Merge multiple PDFs
  • Convert to images
Use Case: โ€œExtract all customer information from this invoice PDFโ€

Search Tools

Web Search

google_searchSearch the web for real-time information using Google.Parameters:
  • query (str): Search query
Returns: Search results with titles, URLs, and snippetsUse Case: โ€œFind the latest AI newsโ€ or โ€œSearch for Python tutorialsโ€

Built-in Web Search (LLM Feature)

NEW: Agents can now perform web searches automatically during response generation without explicitly calling a tool.
Enable Web Search in Admin > Agents > Edit Agent:
Agent Configuration:
  Enable Web Search: โœ… ON
How It Works:
  • When enabled, the LLM can automatically search the web during response generation
  • No explicit tool call required - the model decides when to search
  • Uses LiteLLMโ€™s web_search_options with search_context_size: "medium"
Difference from google_search Tool:
FeatureBuilt-in Web Searchgoogle_search Tool
ActivationAutomatic (LLM decides)Explicit tool call
ConfigurationToggle in Agent settingsAssign tool to agent
Best ForGeneral knowledge queriesTargeted searches
When to Use: Enable for agents that need to answer questions about current events, recent news, or real-time information without explicit search requests.

Payment Tools (AP2/x402 Protocol)

Premium Feature: Payment tools enable USDC-based agent usage fees with 80/20 revenue split (Agent Owner 80%, Platform 20%).
require_payment(agent_id, network?)Request payment before agent execution.When to Use:
  • Premium agents that charge per use
  • Computationally expensive operations
  • Third-party API costs
Returns:
  • Payment requirements (amount, wallet, network)
  • EIP-3009 nonce for signature
  • 80/20 split details

When to Use Tools

โœ… Use Tools When You Need To:

  • Access External Data: Databases, APIs, file storage
  • Perform Complex Operations: File processing, calculations, analysis
  • Integrate Third-Party Services: Salesforce, GitHub, Firecrawl
  • Retrieve Uploaded Documents: RAG search through company docs

โŒ Donโ€™t Build Tools For:

  • Simple Text Generation: Agents already excel at this
  • One-Time Tasks: Better to do manually
  • Highly Variable Logic: Better in agent instructions
  • Duplicate Functionality: Use existing tools or MCP platforms

Getting Started with Tools

Step 1: Choose Your Approach

Fastest: Junis provides 15+ prebuilt tools.
  1. Go to Admin > Agents
  2. Edit your agent
  3. Select tools from the Tools section
  4. Save
Done! Your agent can now use those tools.

Step 2: Configure Agent Tools

Admin Dashboard โ†’ Agents โ†’ Edit Agent
Agent Configuration:
  Name: Customer Support Agent
  Type: LLM_AGENT
  Tools:
    Regular Tools:
      - claude_pdf_processor
      - google_search
    RAG Tools:
      - rag_company-policies_1234567890
  MCP Platforms:
    - GitHub (for repository management)
    - Firecrawl (for web scraping)

Step 3: Test with Chat

You: "Search for recent AI trends and create a GitHub issue to track them"

Agent:
1. Uses google_search("recent AI trends 2025")
2. Formats the results
3. Uses GitHub MCP to create issue

Response: "I found the latest AI trends and created a tracking issue in your repository."

Tool Best Practices

โœ… DO:
  • Choose specific tools for specific tasks
  • Write clear tool descriptions (docstrings)
  • Test tools individually before assigning to agents
  • Monitor tool usage in logs
  • Handle errors gracefully
  • Use RAG for frequently accessed documents
โŒ DONโ€™T:
  • Add too many tools (max 10 per agent recommended)
  • Use tools with unclear purposes
  • Forget to update tool descriptions
  • Ignore tool errors in production
  • Hard-code sensitive data in tools

Real-World Examples

1. Customer Support Agent

Tools:
  • claude_pdf_processor: Extract info from uploaded docs
  • GitHub MCP: Create support tickets as issues
  • rag_faq_documents: Search company FAQ
User: โ€œA customer asked about our return policyโ€ Agent Flow:
  1. Search rag_faq_documents for โ€œreturn policyโ€
  2. Extract relevant sections
  3. Format a friendly response
  4. Optionally create GitHub issue for tracking

2. Data Analysis Agent

Tools:
  • claude_xlsx_processor: Analyze Excel files
  • google_search: Find market trends and research
  • claude_pptx_creator: Generate presentation
User: โ€œAnalyze Q4 sales and create a presentationโ€ Agent Flow:
  1. Use claude_xlsx_processor to analyze sales spreadsheet
  2. Use google_search for market research and context
  3. Use claude_pptx_creator to generate slides

3. Premium Agent with Payments

Tools:
  • require_payment: Gate agent access with USDC payment
  • claude_pdf_processor: Document processing
  • google_search: Research capabilities
User: โ€œRun premium analysis workflowโ€ Agent Flow:
  1. Call require_payment(agent_id="premium_agent")
  2. Wait for user payment (MetaMask)
  3. Verify payment signatures
  4. Proceed with premium analysis using available tools

Tool Categories Reference

CategoryToolsPrimary Use
Document Processingclaude_pdf_processor, claude_xlsx_processor, claude_pptx_creator, claude_docx_processorFile analysis, creation, extraction
Web Searchgoogle_searchReal-time web information retrieval
Paymentrequire_payment, verify_paymentPremium agent gating
RAGrag_ (auto-generated)Document knowledge retrieval
ExternalMCP platform toolsThird-party service integration

Performance Considerations

โšก Tool Execution Speed

Tool TypeTypical LatencyNotes
Database Query100-500msDepends on query complexity
External API1-5 secondsNetwork dependent
Claude Skills2-10 secondsFile processing time
RAG Search1-3 secondsVertex AI Search latency
Payment5-30 secondsUser signature + on-chain settlement
Optimization Tip: Group multiple simple queries into batch tools rather than making agents call tools repeatedly.

Troubleshooting

Symptom: Tool is configured but agent doesnโ€™t call itPossible Causes:
  • Tool description (docstring) unclear
  • Agent instruction doesnโ€™t mention tool usage
  • Tool name not intuitive
Solution:
  1. Review tool docstring for clarity
  2. Add tool usage examples to agent instruction
  3. Test with explicit request: โ€œUse [tool_name] toโ€ฆโ€
Symptom: Tool called but no result returnedPossible Causes:
  • Tool has unhandled exception
  • Missing required parameters
  • External service down
Solution:
  1. Check agent session logs for errors
  2. Test tool directly via API
  3. Verify all environment variables set
  4. Check external service status
Symptom: RAG search completes but finds nothingPossible Causes:
  • Documents not indexed yet (still processing)
  • Search query too specific
  • DataStore not created properly
Solution:
  1. Go to Team > RAG Knowledge and check indexing status
  2. Wait for โ€œCOMPLETEDโ€ status (can take 5-60 minutes)
  3. Try broader search terms
  4. Re-upload documents if status is โ€œFAILEDโ€
Symptom: require_payment call takes too longPossible Causes:
  • Network congestion (Base blockchain)
  • CDP Facilitator API slow
  • User hasnโ€™t signed MetaMask prompt
Solution:
  • Payment tools have 30-second timeout
  • Check Base network status: https://status.base.org
  • Ensure user completes MetaMask signature promptly
  • For testnet, use Base Sepolia (faster, free)

Whatโ€™s Next?


Additional Resources

Need Help? Contact us at [email protected] for assistance with tool development and custom implementations.