diff --git a/example/coroutine-example.cpp b/example/coroutine-example.cpp
new file mode 100644
index 0000000..8cfa0f4
--- /dev/null
+++ b/example/coroutine-example.cpp
@@ -0,0 +1,81 @@
+#include <sdbusplus/async.hpp>
+
+#include <iostream>
+#include <string>
+#include <variant>
+#include <vector>
+
+auto runner(sdbusplus::async::context& ctx) -> sdbusplus::async::task<>
+{
+    // Create a proxy to the systemd manager object.
+    constexpr auto systemd = sdbusplus::async::proxy()
+                                 .service("org.freedesktop.systemd1")
+                                 .path("/org/freedesktop/systemd1")
+                                 .interface("org.freedesktop.systemd1.Manager");
+
+    // Call ListUnitFiles method.
+    using ret_type = std::vector<std::tuple<std::string, std::string>>;
+    for (auto& [file, status] :
+         co_await systemd.call<ret_type>(ctx, "ListUnitFiles"))
+    {
+        std::cout << file << " " << status << std::endl;
+    }
+
+    // Get the Architecture property.
+    std::cout << co_await systemd.get_property<std::string>(ctx, "Architecture")
+              << std::endl;
+
+    // Get all the properties.
+    using variant_type =
+        std::variant<bool, std::string, std::vector<std::string>, uint64_t,
+                     int32_t, uint32_t, double>;
+    for (auto& [property, value] :
+         co_await systemd.get_all_properties<variant_type>(ctx))
+    {
+        std::cout
+            << property << " is "
+            << std::visit(
+                   // Convert the variant member to a string for printing.
+                   [](auto v) {
+                       if constexpr (std::is_same_v<
+                                         std::remove_cvref_t<decltype(v)>,
+                                         std::vector<std::string>>)
+                       {
+                           return std::string{"Array"};
+                       }
+                       else if constexpr (std::is_same_v<
+                                              std::remove_cvref_t<decltype(v)>,
+                                              std::string>)
+                       {
+                           return v;
+                       }
+                       else
+                       {
+                           return std::to_string(v);
+                       }
+                   },
+                   value)
+            << std::endl;
+    }
+
+    // Try to set the Architecture property (which won't work).
+    try
+    {
+        co_await systemd.set_property(ctx, "Architecture", "arm64");
+    }
+    catch (const std::exception& e)
+    {
+        std::cout << "Caught exception because you cannot set Architecture: "
+                  << e.what() << std::endl;
+    }
+
+    co_return;
+}
+
+int main()
+{
+    sdbusplus::async::context ctx;
+    ctx.run(runner(ctx));
+
+    return 0;
+}
