https://retellai.com/?utm_source=discord&utm_medium=seo logo
<@1145576664366055464> how do i call conversation_...
# ❓・ai-evy-support
l
@AI Evy how do i call conversation_flow create through sdk?
a
Thanks for tagging me @luckyeva_. I'll look through relevant sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [SDKs]() * [Conversation Flow Overview]() * [Retell AI | Unlocking Complex Interactions with Retell AI's Conversation Flow]() -----------------------------
### Answer I cannot find a direct code example for creating a conversation flow agent through the SDK in the provided documentation. While conversation flow agents are a feature of Retell AI [(1)]() , the documentation indicates that you should create them through the Dashboard interface . You can select a pre-built template to get started and modify it to your needs - all changes are auto-saved . The only agent creation example shown in the SDK documentation is this basic example:
Copy code
typescript
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
});

async function main() {
  const params: Retell.AgentCreateParams = {
    response_engine: { 
      llm_id: 'llm_234sdertfsdsfsdf',
      type: 'retell-llm'
    },
    voice_id: '11labs-Adrian',
  };
  const agentResponse = await client.agent.create(params);
}
[(2)]() Would you like me to provide a general explanation of conversation flows based on the available documentation?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
we need to dynamically attach different knowledge base to the conversation flow
@AI Evy we need to dynamically attach different knowledge base to the conversation flow
a
Thanks for the follow-up, @luckyeva_. I'll get back to you soon.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Dynamic Variables]() * [Knowledge Base]() * [Retell AI | Unlocking Complex Interactions with Retell AI's Conversation Flow]() * [2025 B2B Guide to AI Phone Calls & Voice Agents | Retell AI | Retell AI]() -----------------------------
### Answer Based on the available documentation, knowledge bases can be linked to agents and will be used automatically without needing to change your prompt [(1)]() . You can create multiple knowledge bases to overcome the limits, and an agent can have more than one knowledge base linked to it . The knowledge base integration allows you to [(2)]() : - Upload documents - Help center pages - Product manuals - PDFs as live data sources However, I don't see specific SDK examples for dynamically attaching knowledge bases to conversation flows in the provided documentation. I'd recommend checking the official API documentation or reaching out to Retell AI support for the specific implementation details. Would you like me to provide more general information about knowledge bases or conversation flows based on the available documentation?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
@AI Evy what does exit code 422 Unprocessable Entity mean?
a
Thanks for the follow-up, @luckyeva_. I'll get back to you soon.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Retell Python API library]() * [Retell Node API Library]() * [422 error Cannot find call under given api key.]() * [Creating agent, llms with apis makes me bugs.]() -----------------------------
### Answer Based on the available documentation, a 422 Unprocessable Entity error can occur in several scenarios: 1. When the API key is incorrect or the call ID does not exist [(1)]() 2. When attempting to create a call with an agent that cannot be found under the given API key [(2)]() 3. When trying to use a phone number that is not found under the given API keys [(3)]() The error code 422 is classified as an
UnprocessableEntityError
in both the Python and Node.js SDKs [(4)]() [(5)]() . To handle these errors, you can implement error catching in your code. Here's an example using the Node.js SDK:
Copy code
typescript
async function main() {
  const agentResponse = await client.agent
    .create({
      response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
      voice_id: '11labs-Adrian',
    })
    .catch(async (err) => {
      if (err instanceof Retell.APIError) {
        console.log(err.status); // 400
        console.log(err.name); // BadRequestError
        console.log(err.headers); // {server: 'nginx', ...}
      } else {
        throw err;
      }
    });
}
[(5)]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.