Build an AI Agent That Uses Tools with Vultr Serverless Inference

Give a language model a few real tools, let it decide when to call them, and keep it safe, cheap and honest.

+120

POINTS

What you will build

An assistant that does not just talk: it checks, fetches and calculates things by calling code you wrote, and tells the user what it did.

Starting point: you only need a Vultr account. This challenge is self-contained, so you can do it without having done any other.

The requirements

  • A Vultr Serverless Inference subscription and API key kept in an environment variable
  • At least three tools with clear JSON Schema definitions, for example a calculator, a weather or exchange-rate lookup and a read-only check of a website's status
  • The full loop implemented: send the question with the tool definitions, run the requested function, send the result back, return the final answer
  • Input validation: reject missing or malformed arguments instead of passing them to your code
  • A maximum number of tool calls per question so it cannot loop forever
  • Only safe, read-only tools: nothing that deletes, spends or changes anything
  • A small web or chat interface hosted on a Vultr instance, or a command-line tool with a recorded session

How the loop works

  1. Send the user's message together with your tool definitions
  2. If the response asks for a tool, run it and capture the result
  3. Send the original messages, the assistant's tool request and the tool result back to the model
  4. Repeat until the model returns a normal answer, or stop at your maximum
  5. Show the user the answer and which tools were used
BASH
curl https://api.vultrinference.com/v1/chat/completions \
  -H "Authorization: Bearer $VULTR_INFERENCE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "MODEL", "messages": [...], "tools": [...], "tool_choice": "auto"}'

Try to break it

  • Ask a question that needs two tools in a row
  • Ask for something no tool can do and check that it says so instead of guessing
  • Send a prompt that tries to make it call a tool with dangerous arguments
  • Ask it the same thing ten times quickly and check your limits hold

How you will be judged

  • The tool-calling loop works end to end, with tool use shown to the user
  • Bad input and prompt tricks are handled, with evidence
  • You measured usage and can explain the cost per conversation

Never put the API key in the page or the repository. Treat anything the model asks you to run as untrusted input. Delete the subscription and the instance when you are done.

Requirements

Serverless Inference key kept in an environment variable

At least three tools with JSON Schema definitions

Full tool-calling loop implemented

Arguments validated and tool calls capped per question

Only read-only tools

Interface others can try, or a recorded session

Resources

Submit Your Build

Challenge Questions

No questions about this Challenge yet
Ask anything about this Challenge prep, agenda or joining.