#Thread

1 messages · Page 1 of 1 (latest)

acoustic stump
#

get the id from the response, then patch your agent.

acoustic stump
#

Have just updated the API ref to make this clearer!

ivory rampart
#

Thanks, i have uploaded the knowledge base. so you reckon is not possible to create an agent directly with knowledge base?
Because currently i have a call to create the agent, one to upload the knowledge base and the final to patch the agent.
seems an overkill of calls.

swift root
#

Did some more digging and found out I can PATCH with a payload like this

payload = {
    "conversation_config": {
        "agent": {
            "prompt": {
                "knowledge_base": [
                    {"id": "3BiI1PlZRqB62g7q4Tir", "name": "ui_test", "type": "file"},
                    {"id": "gmtY2TEnf5vgl0AKYvRc", "name": "markdown_test", "type": "file"}
                ]
            }
        }
    }
}

@acoustic stump Might be interesting to update the "Update Agent" API Reference (https://elevenlabs.io/docs/conversational-ai/api-reference/agents/update-agent), since does not mention anything related to Knowledge Bases?

Also, I'm wondering, besides unlinking from the agent with another PATCH, how to delete a knowledge item?

acoustic stump
#

Thanks @swift root ! I have just added this - I'm doing a big overhaul of all our docs at the moment which I'm excited to share soon!