# Deploy an AI agent on Arm with llama.cpp and KleidiAI

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/servers-and-cloud-computing/ai-agent-on-cpu/)
- [Introduction to AI Agents and Agent Use Cases](https://learn.arm.com/learning-paths/servers-and-cloud-computing/ai-agent-on-cpu/ai-agent/)
- [Set Up Your Local Environment to Run an AI Application](https://learn.arm.com/learning-paths/servers-and-cloud-computing/ai-agent-on-cpu/set-up/)
- [AI Agent Application](https://learn.arm.com/learning-paths/servers-and-cloud-computing/ai-agent-on-cpu/ai-agent-backend/)
- [Explore and Test Your AI Agent](https://learn.arm.com/learning-paths/servers-and-cloud-computing/ai-agent-on-cpu/agent-output/)
- [Next Steps](https://learn.arm.com/learning-paths/servers-and-cloud-computing/ai-agent-on-cpu/_next-steps/)

## About this Learning Path

|  |  |
| --- | --- |
| Skill level: | Introductory |
| Reading time: | 45 min |
| Last updated: | 12 Nov 2026 |

|  |  |
| --- | --- |
| Author: | Andrew Choi |
| Arm IP: | [Neoverse](https://support.arm.com/?tab=compute-ip&Product%20Type=Infrastructure%20Processors) |
| Tags: | [Agentic AI](https://learn.arm.com/tag/agentic-ai/) [AWS Graviton](https://learn.arm.com/tag/aws-graviton) [Microsoft Azure Cobalt](https://learn.arm.com/tag/microsoft-azure-cobalt) [Google Axion](https://learn.arm.com/tag/google-axion) [Oracle Cloud Infrastructure (OCI) Ampere Compute](https://learn.arm.com/tag/oracle-cloud-infrastructure-oci-ampere-compute) [Linux](https://learn.arm.com/tag/linux) [Python](https://learn.arm.com/tag/python) [AWS Graviton](https://learn.arm.com/tag/aws-graviton) [AI](https://learn.arm.com/tag/ai) |

### Who is this for?
This is an introductory topic for software developers and ML engineers looking to deploy an optimized AI agent application.

### What will you learn?
After completing this Learning Path, you'll be able to perform the following tasks:
- Set up llama-cpp-python optimized for Arm servers.
- Run optimized Large Language Models (LLMs).
- Create custom functions for LLMs.
- Deploy optimized AI agents for applications.

### Prerequisites
Before starting, you'll need the following prerequisites:
- An [Arm-based instance](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/) from a cloud service provider or an on-premise Arm server.
- Basic understanding of Python and prompt engineering.
- Understanding of LLM fundamentals.

### Summary
You’ll build and run a function-calling AI agent on Arm servers using `llama.cpp` and the `llama-cpp-agent` framework with KleidiAI optimizations. After preparing an Arm-based Ubuntu environment and obtaining a quantized Llama 3.1 8B model, you’ll create `agent.py` to connect the model to tool functions and structured outputs. You’ll learn how the agent selects functions based on input intent, then test the end-to-end workflow to observe tool invocation and responses. By the end, you’ll run an AI agent backed by an optimized LLM, verify that the model loads, and inspect outputs that demonstrate function selection and result handling.
