עבריתLog in

Connect OneLi to any agent

Pick a framework, copy the code, and run a sample call.

OneLi is a tool your agent calls: it sends a call task, OneLi makes the call in Hebrew and returns the transcript, questions during the call, and the result. Here is how it looks in each framework.

How it connects

Pick your agent

  1. 1
    An API key

    Create one at oneli.io/app/connect and keep it in ONELI_API_KEY.

  2. 2
    Install
    Terminal
    npm i @mastra/core @mastra/mcp zod
  3. 3
    Connect
    TypeScript
    import { MCPClient } from '@mastra/mcp'
    import { Agent } from '@mastra/core/agent'
    
    const mcp = new MCPClient({
      id: 'oneli',
      servers: {
        oneli: {
          url: new URL('https://mcp.oneli.io/mcp'),   // url => Streamable HTTP
          requestInit: { headers: { Authorization: `Bearer ${process.env.ONELI_API_KEY}` } },
        },
      },
    })
    
    export const callAgent = new Agent({
      id: 'call-agent', name: 'Call Agent',
      instructions: 'Use OneLi to place and follow phone calls.',
      model: 'openai/gpt-5.6-sol',            // any model id you use
      tools: await mcp.listTools(),           // names are namespaced: oneli_create_call_task, …
    })

Full Mastra guide →

Run a sample call

  1. Queued
  2. Dialing
  3. Ringing
  4. On the call
  5. Done

Press “Run a sample call” to see what your agent sends and what OneLi returns, step by step.

A demo only: nothing is sent. The tool and event names are the real ones.

Next steps

Each framework’s code was checked against its docs on 22 October 2026. Model ids are examples: use the model you work with.